Merge wrangles, with recipe examples, parameters, and behavior.
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
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
Concatenate
Concatenate a list of columns or a list within a single column.
If the input is a list of columns, concatenate multiple columns into one as a delimited string. If the input is a single column, concatenate a list within that column into a delimited string.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|
| I/O | | | | |
input | Either a single column name or list of columns. | string, integer, array | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | | | | |
skip_empty | Whether to skip empty values, defaults to false. | boolean | false | No |
| Formatting | | | | |
char | (Optional) Character to add between successive values. | string | "," | 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.concatenate:
input:
- Col1
- Col2
- Col3
output: Join Col
char: ', '
wrangles:
- merge.concatenate:
input: Col1
output: Join List
char: ' '
Access
| Requirement | Value |
|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|
| Catalog ID | 41 |
| Catalog key | merge.concatenate |
| Recipe key | merge.concatenate |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.concatenate |
| Legacy UUID | 6ff76728-e1f6-4d3d-8946-6aa3b7524b3f |
Sources
Dictionaries
Take dictionaries in multiple columns and merge them to a single dictionary.
For duplicate keys, the last key in the input list takes precedence in the merged dictionary.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|
| I/O | | | | |
input | List of input columns. | array | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | | | | |
skip_empty | Whether to skip empty dictionaries when merging. | boolean | false | 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.dictionaries:
input:
- Dict 1
- Dict 2
output: Merged
| Merged |
|---|
| {'First': 'One', 'Second': 'Two'} |
wrangles:
- merge.dictionaries:
input: Dict *
output: Merged
| Merged |
|---|
| {'First': 'One', 'Second': 'Two'} |
wrangles:
- merge.dictionaries:
input:
- Dict *
- -Dict 2
output: Merged
Note the extra dash in front of Dict 2 excludes that column from the wildcard selection.
| Dict 1 | Dict 2 | Dict 3 |
|---|
| {'First': 'One'} | {'Second': 'Two'} | {'Third': 'Three'} |
| Merged |
|---|
| {'First': 'One', 'Third': 'Three'} |
Access
| Requirement | Value |
|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|
| Catalog ID | 42 |
| Catalog key | merge.dictionaries |
| Recipe key | merge.dictionaries |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.dictionaries |
| Legacy UUID | 93e27737-e966-4ba9-8777-4e96724ebfc4 |
Sources
Key Value Pairs
Create a dictionary from keys and values in paired columns e.g. COLUMN_NAME_1, COLUMN_VALUE_1, COLUMN_NAME_2, COLUMN_VALUE_2 ...
Create a dictionary from keys and values in paired columns.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|
| I/O | | | | |
input | Matched pairs of key and value columns. | object | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | | | | |
skip_empty | Whether to skip empty keys or values when creating the dictionary. | boolean | false | 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.key_value_pairs:
input:
Letter: Number
output: Pairs
| Pairs |
|---|
| {'A': 1} |
| {'B': 2} |
| {'C': 3} |
wrangles:
- merge.key_value_pairs:
input:
key*: value*
output: Object
| Object |
|---|
| {'A': 'a', 'One': 'First'} |
| {'B': 'b', 'Two': 'Second'} |
| {'C': 'c', 'three': 'Third'} |
Access
| Requirement | Value |
|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|
| Catalog ID | 43 |
| Catalog key | merge.key_value_pairs |
| Recipe key | merge.key_value_pairs |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.key_value_pairs |
| Legacy UUID | 8a2cd37c-8ef7-4b05-8264-36512f5dd837 |
Sources
Lists
Take lists in multiple columns and merge them to a single list.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|
| I/O | | | | |
input | List of input columns. | array | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | | | | |
remove_duplicates | Whether to remove duplicates from the created list. | boolean | false | No |
ignore_case | Ignore case when removing duplicates. | boolean | false | No |
include_empty | Whether to include empty values in the created list. | boolean | true | 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.lists:
input:
- col1
- col2
output: Combined Col
remove_duplicates: false
| Combined Col |
|---|
| ['A', 'B', 'D', 'E'] |
Access
| Requirement | Value |
|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|
| Catalog ID | 44 |
| Catalog key | merge.lists |
| Recipe key | merge.lists |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.lists |
| Legacy UUID | d9978f00-b3d4-4583-884e-a53b98a43e9a |
Sources
To Dict
Take multiple columns and merge them to a dictionary (aka object) using the column headers as keys.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|
| I/O | | | | |
input | List of input columns. | array | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | | | | |
include_empty | Whether to include empty columns in the created dictionary. | boolean | false | 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.to_dict:
input:
- Col1
- Col2
output: Dict Col
| Dict Col |
|---|
| {'Col1': 'A', 'Col2': 'B'} |
Access
| Requirement | Value |
|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|
| Catalog ID | 45 |
| Catalog key | merge.to_dict |
| Recipe key | merge.to_dict |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.to_dict |
| Legacy UUID | 9b869210-0d89-403b-8409-7cecdb5f9c7c |
Sources
To List
Take multiple columns and merge them to a list.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|
| I/O | | | | |
input | List of input columns. | array | — | Yes |
output | Name of the output column. | string | — | Yes |
| Options | | | | |
include_empty | Whether to include empty columns in the created list. | boolean | false | 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.to_list:
input:
- Col1
- Col2
- Col3
output: List Col
Access
| Requirement | Value |
|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|
| Catalog ID | 46 |
| Catalog key | merge.to_list |
| Recipe key | merge.to_list |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | merge |
| Documentation group | merge |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.merge.to_list |
| Legacy UUID | d5300fe7-c8a4-4a41-8f12-f2c1698678cc |
Sources