Aggregator Stage and Filter Stage with example

If we have a data as below 

table_data

Sno name
10 Jeff
10 Mike
10 Sam
20 Tom
30 Amy
20 Ron
40 John



And we need to get the same multiple times records into the one target. 
And single records not repeated with respected to Sno need to come to one target.

Take Job design as 

 

Read and load the data in sequential file. 

In Aggregator stage select group =dno 

Aggregator type = count rows 

Count output column =dno_cpunt( user defined ) 

In output Drag and Drop the columns required.Than click ok 

In Filter Stage 

—– At first where clause dno_count>1 
—–Output link =0 
—–At second where clause dno_count<=1 —–output link=0 Drag and drop the outputs to the two targets. Give Target file names and Compile and Run the JOb. You will get the required data to the Targets. 

Leave a Reply

Your email address will not be published. Required fields are marked *