Skip to main content

FME 2020: What does the “unique” output of the “DuplicateFilter” tool refer to?

 

In the screenshot below, I couldn’t figure out how the “unique” output of the “DuplicateFilter” tool is 1. What does this mean? What does the “duplicates” mean?

Clip_248

From the Help for the DuplicateFilter:

"This transformer outputs to the Duplicate port any feature whose key attribute value is the same as one previously encountered. Any feature whose key value has not yet appeared is output via the Unique port.

The first feature with a unique key value is outpout via the Unique port — and subsequent features that have the same key value are output via the Duplicate port."

 

So where there are features with the same key value, the first to enter the DuplicateFilter will exit via the Unique port and all of the rest via the Duplicate port. Therefore the order that features enter the transformer can be important.


But does this mean in terms of numbers?

 

For example, in the screenshot below, 8 records are split into 1 + 7. 1 is unique and 7 are duplicates. What does this mean?

Clip_270Clip_271 

 

 

 

 

 


But does this mean in terms of numbers?

 

For example, in the screenshot below, 8 records are split into 1 + 7. 1 is unique and 7 are duplicates. What does this mean?

Clip_270Clip_271 

 

 

 

 

 

If you have eight features with the same value in the key attribute, the first one that arrives at the transformer will be output through unique and the remaining seven will be output through the duplicate port.

 

If on the other hand you had 4 features with value A, 2 features with value B and one feature each with value C and D, you would end up with 4 features in the unique port (1st A, 1st B, C, D) and 4 features in the duplicate port (2nd-4th A, 2nd B)


What @jdh​ said!


Many thanks guys for the help

Best

Jamal


Reply