Unique / List Layer

Get unique values from variable-length lists while maintaining order. Similar to Python's dict.fromkeys() or R's unique(). Creates a new list with duplicate values removed, preserving the order of first occurrence.

Example transformation:

listsunique
[1, 2, 2, 1, 2, 3][1, 2, 3]
[a, b, a, c][a, b, c]
[2, 2, 2][2]
[1, null, 1, null, 2][1, null, 2]
[][]

Common applications:

  • Extracting unique user interactions
  • Finding distinct categories in tags
  • Deduplicating event sequences
  • Creating unique identifier lists
  • Removing duplicate log entries
  • Finding unique transaction types

Note: Lists can have any length. Output list length will vary based on number of unique values. Preserves order of first occurrence. Empty lists remain empty. Particularly useful for finding distinct elements in sequences while maintaining temporal order.

Table
0
0
Table

Select

column

The variable-length list column to deduplicate. Examples:

  • Event sequences: [click, view, click, buy] → [click, view, buy]
  • Tag lists: [urgent, high, urgent, critical] → [urgent, high, critical]
  • ID sequences: [1, 2, 1, 3, 2] → [1, 2, 3]
  • Status changes: [active, inactive, active] → [active, inactive] Lists can have different lengths. Supports any comparable type.

Name for the new column. If not provided, the system generates a unique name. If AsColumn matches an existing column, the existing column is replaced. The name should follow valid column naming conventions.