Skip to main content

Lists

Compare multiple lists and return the intersection, difference, or union.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputList of input columns containing lists to compare.array—Yes
outputName of the output column.string—Yes
Options
methodType of comparison to perform.string; one of:
  • intersection
  • difference
  • union
"intersection"No
remove_duplicatesRemove duplicates from the result.booleanfalseNo
ignore_caseIgnore case when comparing string items.booleanfalseNo
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name.array, object—No

Examples​

wrangles:
- compare.lists:
input:
- col1
- col2
output: Difference
method: difference
Col1Col2
[A, B, C][C, D, E]
[H, I, J, K][H, I, J]
[X, Y, Z][1, 2, 3]
Difference
[A, B]
[K]
[X, Y, Z]
wrangles:
- compare.lists:
input:
- col1
- col2
output: Intersection
method: intersection
Col1Col2
[A, B, C][C, D, E]
[H, I, J, K][H, I, J]
[X, Y, Z][1, 2, 3]
Intersection
[C]
[H, I, J]
[]
wrangles:
- compare.lists:
input:
- col1
- col2
output: Union
method: union
Col1Col2
[A, B, C][C, D, E]
[H, I, J, K][H, I, J]
[X, Y, Z][1, 2, 3]
Union
[A, B, C, D, E]
[H, I, J, K]
[X, Y, Z, 1, 2, 3]
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID1
Catalog keycompare.lists
Recipe keycompare.lists
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecompare
Documentation groupcompare
AliasesNone
Runtime symbolwrangles.recipe_wrangles.compare.lists
Legacy UUIDa393225e-7ccf-4708-83f8-d5abd6ba9b1e

Sources