Wednesday 29 June 2011

If i had source like unique & duplicate records like 1,1,2,3,3,4 then i want load unique records in one target like 2,4 and i want load duplicate records like 1,1,3,3


For Unique and Duplicate , we can go for same flow :
 
Source-->SrcQualifier-->Aggregator(group by this column and find count also)--> then use joiner (use 
the column from Source qualifier and join the data from Aggregator as source qualifier.col=aggregator.col) --> Router (insert into t1 for count>1 and for count=1 insert into t2). t1 is for duplicate records and it will cintain 1,1,3,3 and t2 will have 2,4.
 
Records in Source Q :
col 
1,1,2,3,3,4
 
The records after agregator will look like this :
col   count
1     2
2     1
3     2  
4     1
 
Records after Joiner : source q.col=aggregator.col
col count
1   2
1   2
2   1
3   2
3   2
4   1
 
These records will flow in router and we define two groups; one for count>1 (for duplicates record) and second for count=1 ( for unique record)

No comments:

Post a Comment