Skip to main content

In the reader file I have multiple full names “John Doe”. 

 

I want to ensure my Writer 1 / Output 1 should only have the first entry of John Doe and the rest of the John Doe entry should be mapped to Writer 2 / Output 2. 

 

Ex.

Name Address
John Doe 31 xxx st
John Doe 41 yyy st
John Doe 51 zzz st

 

John Doe on 31 xxx st should go to output 1, and other two John Doe should go to output 2

Sounds like the DuplicateFilter might do what you want.

You could also use a Sorter followed by a Sampler set to First N Feature, Sampling Rate of 1, with Group Processing grouping on the “Name” attribute.

You could also use a Matcher, lots of ways to do this one. Just need to send the two different output ports to your two different writers and you should be good to go.


Hi ​@aashnaparikh Use a Sampler, grouping by Name, Sampling Rate of 1 and Sampling Type ‘First N Features’.


Reply