Skip to main content

Length

Calculate the lengths of data in a column. The length depends on the data type e.g. text will be the length of the text, lists will be the number of elements in the list.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of the input column(s).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

Examples​

wrangles:
- select.length:
input: Part Code
output: Part Code Length
Part Code
6202
Part Code Length
4
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID56
Catalog keyselect.length
Recipe keyselect.length
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespaceselect
Documentation groupselect
AliasesNone
Runtime symbolwrangles.recipe_wrangles.select.length
Legacy UUID4d7a5f66-0a4a-40e0-8298-d5c55754423d

Sources