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
# Using concatenate to combine multiple columns
wrangles:
- merge.concatenate:
input:
- Col1
- Col2
- Col3
output: Join Col
char: ', '
| Col1 | Col2 | Col3 |
|---|---|---|
| A | B | C |
| Join Col |
|---|
| A, B, C |
# Using concatenate to join a column that is a list
wrangles:
- merge.concatenate:
input: Col1
output: Join List
char: ' '
| Col1 |
|---|
| ['A', 'B', 'C'] |
| Join List |
|---|
| A B C |
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