How do you load alternate records into different tables through mapping flow?



How do you load alternate records into different tables through mapping flow?..

Answer / Ashwani Kumar Singh

To load alternate records (for example, every nth record) into different tables, you can use the 'Modulo' function and the 'Filter' transformation in Informatica.nnMapping steps:
1. Create two target tables for storing alternate records.
2. Add your source and a 'Source Qualifier' transformation (to cleanse and filter data if necessary).
3. After the 'Source Qualifier', add a 'Modulo' function to create a new column that calculates the record number modulo a specified value (for example, `MOD(ROW_NUMBER(), n)` where n is the number of records you want to skip between tables).
4. Add a filter transformation after the 'Modulo' function, with conditions to select every nth record based on the new column.
5. Route the selected records to one target table and route the remaining records to another target table.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

What is workflow variable? When we use workflow variable? Can any one explain me with one example???

2 Answers   TCS,


my source having the records like ram 3 sam 5 tom 8 and i want to load into target like ram record 3 times,sam record 5 times, tom record 8 times

3 Answers   Satyam,


in my source table one of column contains the data like vishnraju@gmail.com,suresh@yahoo.com,krishna@hotmail.com these records i need to send in target table as below format. vishnuraju,suresh,krishna

5 Answers   Cap Gemini,


How to send duplicates to one target and unique rows to one target?target is empty

9 Answers   Amazon, IBM, Wipro,


What is the difference between a router and a filter transformation?

1 Answers   TCS,


What is the reusable transformation?

1 Answers  


I have table with ID,PRD_DT,PRD_FLAG,CUST_DT,CUST_FLAG I need to get max date and its corresponding flag for both the date columns. Ex:- 1A,10/3/2015,AC,10/3/2015,XY 1A,10/4/2015,AB,10/2/2015,XZ Output needed 1A,10/4/2015,10/3/2015,XY I have 100 million + in the table so avoid self-join...

2 Answers   Amex,


When do we use dynamic cache and static cache in connected and unconnected lookup transformations?

3 Answers  


what is the exact meaning of domain?

3 Answers  


If I have 10 flat files with same name abc.txt files with different timestamps as source I need to load them in tgt table oracle. in between job execution fails and rows are not loaded into tgt. how can I make them load in that target even if my job fails?

1 Answers  


explain about session partitions ?

1 Answers  


Which transformation should u need while using the cobol sources as source defintions?

2 Answers  


Categories