How to get top 5 records to target without using rank ?
Solution:
- Drag the source to mapping and connect it to sorter transformation.
- Add the next value of sequence generator to expression.(start the value from 1 in sequence generator).
Connect the expression transformation to a filter or router. In the property set the condition as follows
- Finally connect to the target.
Hi kareem, I am new to informatica. I tried above mapping but the data is not loaded into target but session n workflow is successful, could you please reply me.
ReplyDeleteThanks,
Anusha
Hi Anusha,
Delete1. First drag the ports from SQ to Sorter T/R.
2. here Sorter t/r, Sort the data based on Sal in Descending Order.
3. Crete a Sequence Transformation, Connect NEXTVAL port to Expression T/R(Create )
4. Create a Filter t/R and give the filter condition as NEXTVAL<=5
5. Connect the ports to the target.
Diffidently you will get top5 records from source.
Check the target table what u define in mapping designer.
Thanks
kareem
This comment has been removed by the author.
ReplyDeleteHi kareem your is too good and so informative. I have one question faced in interview could you please answer it
ReplyDeleteHow to remove duplicates in flatfiles with out using sorter transformation.
waiting for ur reply
Thanks in advance
Hi Anuradha,
Deletecheck the fallowing ways to removing duplicates
1. Using sorter( Check DISTINCT option)
2. Aggrigator (Group by)
3.Rank (Group by)
4.Expression (By using variable port)
5. Dynamic Lookup cache
6.Using Source Qualifier (DISTINCT)
Note: In case Source is a file Distinct property cant work it is disabled.
Thanks
kareem
Hi Kareem,
ReplyDeleteThis is Haritha. I have one question faced in interview. could you please answer it
How to load Max 2 salaries based on dept wise in Informatica?
This article is very nice and informative to learners
ReplyDeleteInformatica training, informatica training in bangalore, informatica online training
Hi Kareem.
ReplyDeleteThis is shobha.my doubt is if a source has n records,then how to load n+5 records into target without using SQL override.
Waiting for it reply.
Hi Kareem.
ReplyDeleteThis is shobha.my doubt is if a source has n records,then how to load n+5 records into target without using SQL override.
Waiting for it reply.
Hi Kareem.
ReplyDeleteThis is shobha.my doubt is if a source has n records,then how to load n+5 records into target without using SQL override.
Waiting for it reply.