Skip to main content

Trim

Remove excess whitespace at the start and end of text.

Remove excess whitespace at the start and end of text. Can accept multiple columns.

note

Non-string values pass through unaltered.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of the input column.string, integer, array—Yes
outputName of the output column.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:
- format.trim:
input:
- col1
output: col1 trimmed
col1
Hello World
col1col1 trimmed
Hello WorldHello World
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID38
Catalog keyformat.trim
Recipe keyformat.trim
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespaceformat
Documentation groupformat
AliasesNone
Runtime symbolwrangles.recipe_wrangles.format.trim
Legacy UUIDaf16b3c1-c230-4868-8ebe-f574904a0c76

Sources