How to load records alternativly into multiple targets in informatica? Implement mapping logic for this.
I
have a source file which contains N number of records. I want to load
the source records into two targets, such that first row goest into
target 1, second row goes into target2, third row goes into target3 and
so on.Let see how to create a mapping logic for this in informatica with an example. Consider the following source flat file as an example:
Products --------- Informatica Datastage Pentaho MSBI Oracle Mysql
The data in the targets should be:
Target1 ------- Informatica Pentaho Oracle Target2 ------- Datastage MSBI Mysql
Solution:
The mapping flow and the transformations used are mentioned below:SRC->SQ->EXP->RTR->TGTS
- First create a new mapping and drag the source into the mapping.
- Create an expression transformation. Drag the ports of source qualifier into the expression transformation. Create the following additional ports and assign the corresponding expressions:
v_count (variable port) = v_count+1 o_count (output port) = v_count
- Create a router transformation and drag the ports (products, v_count) from expression transformation into the router transformation. Create an output group in the router transformation and specify the following filter condition:
MOD(o_count,2) = 1
- Now connect the output group of the router transformation to the target1 and default group to target2. Save the mapping.
In
the above solution, I have used expression transfromation for
generating numbers. You can also use sequence generator transformation
for producing sequence values.
Informatica online training - Informatica Jobs
Nice blog great information you shared thanks a lot.
ReplyDeleteKnow more about Informatica Online Training