Q) I want to load all the records from my source, which is a file, except the last 5 records. This question can be asked interview as "How to remove the footer record which is last record"
Example: My source file contains the following records:
Solution: Follow the below steps
Example: My source file contains the following records:
Name ---- A B C D E F GAfter excluding the last 5 records, i want to load A,B into the target. How to implement a mapping logic for this in informatica?
Solution: Follow the below steps
- Connect the source qualifier transformation, NEXTVAL port of sequence generator to the sorter transformation.
- In the sorter transformation, check the key box corresponding to NEXTVAL port and change the direction to Descending.
- Create one more sequence generator transformation and a filter transformation.
- Connect the NEXTVAL port of the second sequence generator transformation to the filter and Name port of sorter transformation to filter.
- Specify the filter condition as NEXTVAL > 5.
- Save the mapping. Create a workflow and session. Save the workflow and run the workflow.
Thanks
Ur's Hari
If you like this post, please share it by clicking on g+1 Button.
No comments:
Post a Comment