Results 1 to 2 of 2

Thread: Load half records into one table and another half into other table - informatica

  1. #1
    Senior Member vijay's Avatar
    Join Date
    May 2012
    Location
    Hyderabad
    Posts
    514

    Load half records into one table and another half into other table - informatica

    I have flat file as source. It contains N number of rows. I want to load half of the records from the flat file into one target table and the other half of the record into another table.

    How to implement a mapping logic for this in informatica etl tool?

  2. #2
    Member
    Join Date
    Nov 2012
    Posts
    34
    The first step is to find the number of records, then only it is possible to know exactly what the half number is.

    Your mapping structure should e SRC->SQ->EXP->SORTER->EXP->ROUTER->TGT(s).

    Follow the below steps to solve your problem:

    Connect the ports of source qualifier to the expression transformation. In the expression transformation, generate the sequence numbers by adding the below ports
    Code:
    v_count (variable port) = v_count+1
    o_count (output port  ) = o_count
    Connect the expression transformation to the sorter transformation and sort the data on o_count port in descending order.
    Connect the sorter to expression transformation and add the below ports in expression transformation:
    Code:
    v_count (variable port) = v_count+1
    v_total_records (variable port) = IIF(v_count =1, o_count, v_total_records)
    o_count1 = v_count
    o_total_records = v_total_records
    Connect the expression transformation to the router and create a output group and assign the condition as o_count1 < o_total_records/2.
    connect the output group to one target and the default group to another target.

Similar Threads

  1. Replies: 2
    Last Post: 12-02-2013, 10:29 AM
  2. Replies: 0
    Last Post: 12-22-2012, 02:54 AM
  3. What is half-duplex?
    By Shoban in forum Networking and Telecom
    Replies: 1
    Last Post: 09-14-2012, 06:58 AM
  4. Replies: 1
    Last Post: 08-01-2012, 11:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •