Replace one or more values in the table’s header row.
Example 1
Use the Fields to list as many rename operations as you wish to make. 

Example Input 1
dim_A | dim_B | metric_1 |
AAA | DDD | 111 |
BBB | EEE | 222 |
CCC | FFF | 333 |
Example Output 1
Name | Location | Costs |
AAA | DDD | 111 |
BBB | EEE | 222 |
CCC | FFF | 333 |
Example 2
The "old name" and "new name" operations are largely identical to the above options, with the distinction that "old name" can be identified by field index (integer) in addition to its name (string). 

Example Input 2
dim_A | dim_B | metric_1 |
AAA | DDD | 111 |
BBB | EEE | 222 |
CCC | FFF | 333 |
Example Output 2
new_name | dim_B | metric_1 |
AAA | DDD | 111 |
BBB | EEE | 222 |
CCC | FFF | 333 |
I Ain't Afraid of No Code!
-
[ [ "rename", { "oldname": 0, "newname": "new_name", "fields":{
"dim_A": "Name",
"dim_B": "Location",
"metric_1": "Cost",
} "subtable": null, "strict": true, "_comment": null } ] ]
param str oldname: Original field name.
param str newname: New field name.
param dict fields: Dictionary with "old_name":"new_name" entries.
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param boolean strict: Set to true if should raise an error when fields don’t exist.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.