Skip to main content

Element

Select elements of lists or dicts using python syntax like col[0]['key'].

Select elements of lists or dictionaries using Python syntax like col[1:3]['key'].

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of the input column and sub elements This permits by index for lists or dict and by key for dicts e.g. col[0]['key'] // [{"key":"val"}] -> "val".string, integer, array—Yes
outputName of the output column(s).string, array, 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
Errors
defaultSet the default value to return if the specified element doesn't exist.string, number, array, object, boolean, nullnullNo

Examples​

wrangles:
- select.element:
input: Column A[0]
output: First Element
Column A
[A, 0.9]
[B, 0.8]
First Element
A
B
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID51
Catalog keyselect.element
Recipe keyselect.element
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespaceselect
Documentation groupselect
AliasesNone
Runtime symbolwrangles.recipe_wrangles.select.element
Legacy UUID223d2f4e-3247-4189-8b6c-e73fe44c4266

Sources