Transform a table, mapping fields arbitrarily between input and output.
Example

Example Input
dim_A | dim_B | metric_1 | url_1 |
AAA | DDD | 111 | https://www.adverity.com/ |
BBB | EEE | 222 | |
CCC | FFF | 333 | https://goo.gl/cr88B2 |
Example Output
new_name | web_address |
DD | https://www.adverity.com/ |
EE | |
FF | https://goo.gl/cr88B2 |
I Ain't Afraid of No Code!
[
[
"fieldmap",
{
"failonerror": false,
"subtable": null,
"mappings": [
[
"new_name",
"{dim_B}[:2]"
],
[
"web_address",
"url_1"
]
],
"errorvalue": "error",
"_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 dict mappings: Key/Value-pairs of "New_field":"Value_of_new_field".
param errorvalue: Value to use if mapping fails.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.