How do you load first and last records into target table?



How do you load first and last records into target table?..

Answer / Baldau Lal Srivastava

To load only the first and last records of a source table into a target table, you can use the 'Rank' transformation in Informatica.nnMapping steps:
1. Create a target table with columns corresponding to the source table.
2. Add your source and a 'Source Qualifier' transformation (to cleanse and filter data if necessary).
3. After the 'Source Qualifier', add a 'Rank' transformation.
4. Set the Rank Expression for the column you want to rank: `ROW_NUMBER() OVER(ORDER BY <column_name>)`. This will assign a unique row number to each record based on the specified column.
5. Add a filter transformation after the 'Rank' transformation, with conditions to select only rows ranked as 1 (first) and the last record (based on the total count of records in the source table).
6. Load the filtered data into your target table.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

What are the diffrences between joiner transformation and source qualifier transformation?

2 Answers  


what is data driven?

1 Answers  


How to go to the older version for a mapping?

1 Answers  


Name 4 output files that informatica server creates during session running?

1 Answers  


What is sql query override? When did u use sql query override?

1 Answers   TCS,


what is the size of u r project? and what is the size of source file?

1 Answers   HP,


what is mapping performence?

2 Answers   Cap Gemini,


Input is like 1 1 1 2 2 3 and out put should be 1 2 3 How can u acheive using rank transformation ??

3 Answers   IBM,


what is workflow varible

1 Answers   HP,


what is meant by lookup caches?

2 Answers   Cap Gemini, Informatica,


What will happen if the select list columns in the custom override sql query and the output ports order in sq transformation do not match?

1 Answers  


Can we use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

1 Answers  


Categories