Wednesday, December 5, 2012

4. Design a mapping to load the first record from a flat file into one table A, the last record from a flat file into table B and the remaining records into table C?


4. Design a mapping to load the first record from a flat file into one table A, the last record from a flat file into table B and the remaining records into table C? 

Solution:

This is similar to the above problem; the first 3 steps are same. In the last step instead of using the filter transformation, you have to use router transformation. In the router transformation create two output groups.

In the first group, the condition should be O_count=1 and connect the corresponding output group to table A. In the second group, the condition should be O_count=O_total_records and connect the corresponding output group to table B. The output of default group should be connected to table C.


1 comment:

Thank you :
- kareem