Skip to main content

Coalesce

Take the first non-empty value from a series of columns or lists.

Take the first non-empty value from a series of columns.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputList of input columns or a single column containing lists.array—Yes
outputName of the output columns. This is required if multiple input columns are provided.string, nullnullNo
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:
- merge.coalesce:
input:
- Col1
- Col2
- Col3
output: Output Col
where: Col2 = E
Col1Col2Col3
ABC
DEF
GHI
Output Col
D
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID40
Catalog keymerge.coalesce
Recipe keymerge.coalesce
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacemerge
Documentation groupmerge
AliasesNone
Runtime symbolwrangles.recipe_wrangles.merge.coalesce
Legacy UUID25c1a60d-fa48-4b9a-8c03-0921d5b31049

Sources