Skip to main content

Column

Create column(s) with a user defined value. Defaults to None (empty).

Create column(s) with a user defined value. Defaults to None (empty). If you need to copy an existing column, use the copy wrangle instead.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
outputName or list of names of new columns or column_name: value pairs.string, array—Yes
Options
value(Optional) Value(s) to add in the new column(s). If using a dictionary in output, value can only be a string.string, number, object, array, boolean, nullnullNo
value_if_existsDetermines behaviour when the output column already exists. existing (default): leave the column unchanged. coalesce: fill empty/null cells with the new value, keeping non-null cells. new: overwrite the entire column with the new value.string; one of:
  • existing
  • coalesce
  • new
"existing"No
coalesce_valueOnly used when value_if_exists is coalesce. Determines which side is preferred when both the existing and new values are non-empty. existing (default): keep the existing value, only fill empty/null cells with the new value. new: keep the new value, only fall back to the existing value where the new value is empty/null.string; one of:
  • existing
  • new
"existing"No
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:
- create.column:
output: New Column
value: new value # Optional, otherwise empty
where: column > 1
column
1
2
3
New Column
new value
new value
wrangles:
- create.column:
output:
- New Column 1: new value 1 # Optional, otherwise empty
- New Column 2: new value 2
- New Column 3: new value 1
column
1
2
3
New Column 1New Column 2New Column 3
new value 1new value 2new value 1
new value 1new value 2new value 1
new value 1new value 2new value 1
wrangles:
- create.column:
output:
- New Column:
- 4
- 5
- 6
column
1
2
3
New Column
[4, 5, 6]
[4, 5, 6]
[4, 5, 6]

Columns of empty lists can also be created by passing an empty list ([]) as the column value.

Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID13
Catalog keycreate.column
Recipe keycreate.column
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespacecreate
Documentation groupcreate
AliasesNone
Runtime symbolwrangles.recipe_wrangles.create.column
Legacy UUID5a18e2c8-ec7c-45f5-88fd-bb5c358a8b40

Sources