Home > Software > Data-Warehouse > Informatica
Interview Questions   Tutorials   Discussions   Programs   

Informatica - Suppose if we have duplicate records in a table temp n now i want to pass unique values to t1 n duplicate values to t2 in single mapping? How?




519
views
asked marvit September 20, 2014 08:02 AM  

Suppose if we have duplicate records in a table temp n now i want to pass unique values to t1 n duplicate values to t2 in single mapping? How?


           

1 Answers



 
answered By vishnoiprem   0  
giving one example, lets say my table temp is having
following -

col1 col2
1 2
1 2
1 2
3 4
3 4
5 6

In the SQL Qualifier, override the query as
select col1,col2,count(1) total from temp group by col1,col2

which shows the output as
col1 col2 total
1 2 3
3 4 2
5 6 1

Now, use one router transformation where one condition is
where total >=1
and second condition where total>1

So first condition will return you all the unique records
1 2
3 4
5 6


and second condition will return you duplicate records
1 2
3 4
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert