FME Transformers: 2024.1

Categories
Data Quality
Strings

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.

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'

Configuration

Parameters

Editing Transformer Parameters

Transformer parameters can be set by directly entering values, using expressions, or referencing other elements in the workspace such as attribute values or user parameters. Various editors and context menus are available to assist. To see what is available, click beside the applicable parameter.

For more information, see Transformer Parameter Menu Options.

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the ListDuplicateRemover on the FME Community.