✍ Kashif M
Trends

Sunday, 26 January 2014


Load last n records of file into target table – Informatica


By on January 26, 2014



SQ->SG->AGG->ROUTER->TGT



AGG-> MAX(SNO)

ROUTER->MAX(SNO)-N The default port in router will give u the last n records.

Kashif
mkashu: Load last n records of file into target table – Informatica
Review : Kashif | Kashif
Update: January 26, 2014 | Rating: 4.5

Comment for "Load last n records of file into target table – Informatica"

5 comments:

  1. Use aggregator without any group by ports which will give last record by default--Sadik

    ReplyDelete
  2. use sequence generator t/r in exp t/r. use sorter t/r for descending . and use filter t/r to get n top numbers.

    ReplyDelete
  3. Is it possible to this with Rank tr. ?

    ReplyDelete
  4. Use SNO=CURVAL from SG to find out last record.
    Then select SNO-N records

    ReplyDelete
  5. use variable port to generate ids in exp trans

    variable port vid(integer) = vid+1;
    output port oid(integet)=vid;

    pass data to sorter, sort by oid desc
    now pass data to exp tr, again generate ids

    variable port vidN(integer) = vidN+1;
    output port oidN(integet)=vidN;

    pass data to filter on oidN=M

    we can do through Rank trans also, after generating ids in exp trans... pass data to Rank trans and select top M ranks, rank port need to be oid port

    ReplyDelete

Blog Archive