Transforms keys and/or values within a dictionary. Values can be accessed with {__value}
, keys analogously with {__key}
.
Example

Example Input
dim_A | dim_B | Potential |
AAA | DDD | [3, 4, 5, 6] |
BBB | EEE | ([1, 2, 3], [3, 2, 1]) |
CCC | FFF | {'jack': 4098, 'sape': 4139} |
Example Output
dim_A | dim_B | Potential |
AAA | DDD | [3, 4, 5, 6] |
BBB | EEE | ([1, 2, 3], [3, 2, 1]) |
CCC | FFF | {'jack': 4098, 'sape': 4139} |
I Ain't Afraid of No Code!
[
[
"convertpacked",
{
"subtable": null,
"format": "json",
"fieldname": "Potential",
"expression": "float({__value})",
"_comment": null
}
]
]
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param str fieldname: Field with dictionary.
param str expression: Arbitrary function, method invocation or dictionary translation.
param str format: Select dictionary: json , yaml. Default is json.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.