Skip to main content

Clean Whitespaces

Condense multiple spaces to a single space and convert special space characters to a standard space.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName or list of input columns.string, integer, array—Yes
outputName or list of output columns.string, array, nullnullNo
Options
trimWhether to trim leading and trailing spaces. Default True.booleantrueNo
remove_literalsWhether to remove special space characters such as new lines etc. Default True.booleantrueNo
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:
- clean_whitespaces:
input: Products
Products
Hello world!
Hello universe!
Products
Hello world!
Hello universe!
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID72
Catalog keyclean_whitespaces
Recipe keyclean_whitespaces
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
NamespaceRoot-level
Documentation groupformat
AliasesNone
Runtime symbolwrangles.recipe_wrangles.main.clean_whitespaces
Legacy UUIDe36e15c4-f0ad-43f8-8555-ef683a8ab892

Sources