hi all hi have flat file like below my requirement is
empid,ename,sal,loc
101,vamshi,5000,hyd
101,vamshi,5020,hyd
201,raju,5000,hyd
202,ram,4000,hyd
203,kumar,3500,pune
203,kumar,3500,pune
203,kumar,5000,hyd
203,kumar,6000,hyd
i want the o/p like this
in one target
201,raju,5000,hyd
202,ram,4000,hyd
and in second target
101,vamshi,5000,hyd
101,vamshi,5020,hyd
203,kumar,3500,pune
203,kumar,3500,pune
203,kumar,5000,hyd
203,kumar,6000,hyd

Answer Posted / kamleshmishra291

After SQ Take Aggr group by empid and create a variable port Rows_count=count(1)
Take a router after aggr and create two groups one for uniqe and one for duplicate
in uniqe condition = Rows_count=1
duplicate group condition= Rows_count>1
connect unique group to tgt1
connect duplicate group to java transformation---
add following codes
for (int i=0;i<count;i++)
{
o_empid=i_empid;
o_ename=i_ename;
o_loc=i_loc;
o_sal=i_sal;
generateRow();
}

connect java transformation to tgt2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain dynamic target flat file name generation in informatica

731


How are indexes created after completing the load process?

1094


What is rank index in rank transformation?

690


In what scenario we use to improve session performance by pushdown optimization?can any one give example?

5444


Which transformation is needed while using the Cobol sources as source definitions?

816






Explain direct and indirect flat file loading (source file type) - informatica

951


source : xml file target: xml file how can we check data loaded into target xml file using writing sql query. pls help on this asap.

2382


hi friends ... i have insurance project(informatica),can you please tell me how many table and mappings we need to use?and explain me.. thank you

9285


Explain sql transformation in script mode examples in informatica

682


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

1418


What is the Rank index port in Rank transformation?

759


What is joiner transformation?

659


How union transformation is used?

670


What are the main issues while working with flat files as source and as targets ?

746


What is a repository manager?

739