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
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name 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 |
output | Name of the output column(s). | 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 |
| Errors | ||||
default | Set the default value to return if the specified element doesn't exist. | string, number, array, object, boolean, null | null | No |
Examples
wrangles:
- select.element:
input: Column A[0]
output: First Element
| Column A |
|---|
| [A, 0.9] |
| [B, 0.8] |
| First Element |
|---|
| A |
| B |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 51 |
| Catalog key | select.element |
| Recipe key | select.element |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | select |
| Documentation group | select |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.select.element |
| Legacy UUID | 223d2f4e-3247-4189-8b6c-e73fe44c4266 |
Sources