remove-duplicate-list-values

Description

remove-duplicate-list-values adaptor removes duplicate values in a list.

The adaptor removes duplicated list values and provides a list containing only the unique values. The case-sensitive option can be used to treat uppercase and lowercase letters as different or equivalent. The duplicates output will show all removed duplicate values, not a unique list of removed values.

Inputs

list Type: list Required: Yes The list containing duplicate values to be removed.

case sensitive Type: boolean Required: No When set to True, lowercase and uppercase letters are treated as different. When set to False, lowercase and uppercase letters are treated as equivalent. If unspecified, defaults to False

Outputs

list Type: list A list containing unique values.

duplicates Type: list A list containing duplicate values.

Examples

Example 1: Default behaviour.

Inputs:

list:

  1. Bovine

  2. Mouse

  3. Gibbon

  4. Orangutan

  5. bovine

  6. mouse

  7. Bovine

case sensitive: null (empty)

Outputs:

list:

  1. Bovine

  2. Mouse

  3. Gibbon

  4. Orangutan

duplicates:

  1. bovine

  2. mouse

  3. Bovine

-> Removed duplicate values from the list. Note that the first instance of a value is the one retained - in this instance Bovine instead of bovine.

Example 2: Remove duplicate values with case sensitive set to true.

Inputs:

list:

  1. Bovine

  2. Mouse

  3. Gibbon

  4. Orangutan

  5. bovine

  6. mouse

  7. Bovine

case sensitive: True

Outputs:

list:

  1. Bovine

  2. Mouse

  3. Gibbon

  4. Orangutan

  5. bovine

  6. mouse

duplicates:

  1. Bovine

-> Removed case sensitive duplicate values from the list.

Use case

  • Use after create-list-from-datatable adaptor to identify duplicate values from a datatable column.

  • Use to create the input for an adaptor requiring a list of options.

  • If a unique list of the removed values is needed, a second remove-duplicate-list-values adaptor could be connected to the duplicates output.

Last updated