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
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the input column. | string, integer, array | — | Yes |
output | Name of the output column. | string, array, null | null | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values 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 |
| col1 | col1 trimmed |
|---|---|
| Hello World | Hello World |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 38 |
| Catalog key | format.trim |
| Recipe key | format.trim |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | format |
| Documentation group | format |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.format.trim |
| Legacy UUID | af16b3c1-c230-4868-8ebe-f574904a0c76 |
Sources