Scenario:
I HAVE A SRC TABLE AS :
A
B
C
C
B
D
B
I HAVE 2 TGT TABLES UNIQUE AND DUPLICATE :
The first table should contain the following output
A
D
The second target should contain the following output
B
B
B
C
C
hOW DO I DO THIS :
Solution:
Try the following approach.
AGG-->
SRC-->SQ--------------> JNR--> RTR-->TGT1
-->TGT2
from source pass all the data to aggregator and group by source column. one one out put port count(column)
so from agg you have two ports out puts
COLUMN,COUNT
A,1
B,2
C,2
D,1
Now join this data with source based on column.
Out put of joiner will be like below
COLUMN,COUNT
A,1
B,3
C,2
C,2
B,3
D,1
B,3
In router create two groups one for Unique and another one for duplicate
Unique=(count=1)
Duplicate=(count>1)
Comments
Post a Comment