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 |
What are the diffrences between joiner transformation and source qualifier transformation?
what is data driven?
How to go to the older version for a mapping?
Name 4 output files that informatica server creates during session running?
What is sql query override? When did u use sql query override?
what is the size of u r project? and what is the size of source file?
what is mapping performence?
Input is like 1 1 1 2 2 3 and out put should be 1 2 3 How can u acheive using rank transformation ??
what is workflow varible
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?
Can we use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?