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
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | List of input columns or a single column containing lists. | array | — | Yes |
output | Name of the output columns. This is required if multiple input columns are provided. | string, null | null | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values 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
| Col1 | Col2 | Col3 |
|---|---|---|
| A | B | C |
| D | E | F |
| G | H | I |
| Output Col |
|---|
| D |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 40 |
| Catalog key | merge.coalesce |
| Recipe key | merge.coalesce |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.coalesce |
| Legacy UUID | 25c1a60d-fa48-4b9a-8c03-0921d5b31049 |
Sources