You are here: Strings > ListDuplicateRemover

ListDuplicateRemover

Removes all duplicate values from a list attribute. In the resulting list, only distinct values for the list attribute will be present.

Note: If the input list has gaps within it, these are eliminated from the output list.

When looking for duplicates, null, missing and empty values are considered equivalent so will be treated as duplicates of each other. The first null, missing or empty string value will be kept.

If there were other attributes in the list “parallel” to the attribute being operated on, these will also be moved in the list to stay in “parallel” with the key attribute. Similarly, if there were other attributes in the list “parallel” to an entry that is a duplicate (so will be removed), those attributes will also be removed.

For matching purposes, a list entry is considered ‘missing’, only if it has a parallel attribute. For example, if list{0}.a exists, then list{0}.b will be considered missing. However if there are no list{0} entries, then list{0}.b will not be considered missing. It rather will be considered to represent a ‘gap’ in the list.

Parameters

Example

If this feature enters this transformer:

somelist{0}.kind = 'paved'

somelist{1}.kind = 'smooth'

somelist{2}.kind = 'smooth'

somelist{3}.kind = 'rough'

somelist{4}.kind = 'smooth'

somelist{5}.kind = 'smooth'

somelist{6}.kind = 'paved'

somelist{8}.kind = <Null>

and the list name is set to somelist{}.kind, the feature leaving the transformer will have these attributes:

somelist{0}.kind = 'paved'

somelist{1}.kind = 'smooth'

somelist{2}.kind = 'rough'

somelist{3}.kind = <Null>

As another example, if the input feature had these attributes:

somelist{0}.kind = 'paved'

somelist{0}.id = 'A3'

somelist{1}.kind = 'smooth'

somelist{1}.id = 'B7'

somelist{2}.kind = 'smooth'

somelist{2}.id = 'B8'

somelist{3}.kind = 'rough'

somelist{3}.id = 'C9'

somelist{4}.kind = 'smooth'

somelist{4}.id = 'B9'

somelist{5}.kind = 'smooth'

somelist{5}.id = 'B2'

somelist{6}.kind = 'paved'

somelist{6}.id = 'A7'

and the list name is set to somelist{}.kind, the feature leaving the transformer will have these attributes:

somelist{0}.kind = 'paved'

somelist{0}.id = 'A3'

somelist{1}.kind = 'smooth'

somelist{1}.id = 'B7'

somelist{2}.kind = 'rough'

somelist{2}.id = 'C9'

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Transformer Categories

Data Quality

Strings

Search FME Knowledge Center

Search for samples and information about this transformer on the FME Knowledge Center.