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

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.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

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.