Skip to main content

To YAML

Convert an object to a YAML representation.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputName of the input column.string, integer, array—Yes
outputName of the output column. If omitted, the input column will be overwritten.string, array, nullnullNo
Formatting
sort_keysIf sort_keys is true (default: False), then the output of dictionaries will be sorted by key.booleanfalseNo
allow_unicodeAllow Unicode value accepted by the runtime.booleantrueNo
indentSpecify the number of spaces for indentation to specify nested elements.integer—No
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:
- convert.to_yaml:
input: column 1
indent: 2
{
'Product Specs': {
'length': '6 inch',
'voltage': '24V',
'weight': '3lb'
}
}
Product Specs:
length: 6 inch
voltage: 24V
weight: 3lb
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID11
Catalog keyconvert.to_yaml
Recipe keyconvert.to_yaml
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
Namespaceconvert
Documentation groupconvert
AliasesNone
Runtime symbolwrangles.recipe_wrangles.convert.to_yaml
Legacy UUID4cd6252f-ce47-4a9d-8272-3d87e875b72a

Sources