From YAML
Convert a YAML representation into an object.
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. If omitted, the input column will be overwritten. | 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 | Value to return if the row is empty or fails to be parsed as YAML. If input is a list, default may also be a list - either a single value to apply to all columns, or one value per input column. | string, array, object, number, boolean, null | null | No |
Examples
wrangles:
- convert.from_yaml:
input: column 1
Product Specs:
length: 6 inch
voltage: 24V
weight: 3lb
{
'Product Specs': {
'length': '6 inch',
'voltage': '24V',
'weight': '3lb'
}
}
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 9 |
| Catalog key | convert.from_yaml |
| Recipe key | convert.from_yaml |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | convert |
| Documentation group | convert |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.convert.from_yaml |
| Legacy UUID | b1c20004-5f80-41c2-84d2-2d4601a033b5 |
Sources