1.alternate target loadingreal time scenarios

Upload: vivek-bansal

Post on 09-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/22/2019 1.Alternate Target LoadingReal Time Scenarios

    1/1

    http://informaticaconcepts.blogspot.in

    Informatica Real Time Scenarios:

    Q1) Alternate Target Loading

    My source is a flat file which contains N number of records. I want to load the source data into

    two targets such that first five records should loaded into the first target, next five records intothe second target table. Again the next source five records into the first target table and so on.

    How to implement a Informatica mapping logic for this?

    Solution:

    Connect the source qualifier transformation to the expression transformation. In theexpression transformation, create the below additional ports:

    v_cnt (variable port) = v_cnt+1

    o_cnt (output port) = v_cnt

    Connect the expression transformation to the router transformation. Create twooutput groups in the router transformation and specify the following filter conditions:

    --Filter condition for first output group

    DECODE(substr(o_cnt,-1,1),1,TRUE,2,TRUE,3,TRUE,4,TRUE,5,TRUE,FALSE)

    --Filter condition for second output group

    DECODE(substr(o_cnt,-1,1),6,TRUE,7,TRUE,8,TRUE,9,TRUE,0,TRUE,FALSE)

    Connect the router transformation output groups to the appropriate targets.