Converts a single field in the table using a common function or mapping.
Example 1
Example Input 1
dim_A | dim_B | metric_1 |
AAA | ddd | 111 |
bbb | EEEeee | 222 |
cccCCC | FFF | 333 |
Example Output 1
dim_A | dim_B | metric_1 |
aaa | DDD | 111 |
BBB | eeeEEE | 222 |
CCCccc | fff | 333 |
Example 2
Example Input 2
dim_A | dim_B | metric_1 |
AAA | ddd | 111 |
BBB | EEEeee | 222 |
cccCCC | FFF | 333 |
Example Output 2
dim_A | dim_B | metric_1 |
XXXX | ddd | 111 |
YYYY | EEEeee | 222 |
ZZZZ | FFF | 333 |
I Ain't Afraid of No Code!
Example 1
[
[
"convert",
{
"failonerror": false,
"subtable": null,
"field": [
"dim_A",
"dim_B"
],
"converter": "swapcase",
"_comment": null
}
]
]
Example 2
[
[
"convert",
{
"failonerror": false,
"subtable": null,
"field": [
"dim_A"
],
"converter": {
"AAA": "XXXX",
"bbb": "YYYY",
"cccCC": "ZZZZ"
},
"_comment": null
}
]
]
param boolean failonerror: Default is false.
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param list field: Name of field(s) to be converted.
param dict converter: Common function or mapping keys to be converted to values.
param errorvalue: Default is None.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.