transformations:modifycolumnnames
Table of Contents
MODIFY COLUMN NAMES
Category: Transform / Basic
Description
This action adds prefixes and/or suffixes to existing column names.
Use cases
- This action can be used to distinguish columns merged from another table.
- Use this action to distinguish datasets' columns prior to merging, when the datasets contain columns with similar names.
Action settings
Setting | Description |
---|---|
Add prefix* | Check this option to prepend text to column names, and enter the prefix text. |
Add suffix* | Check this option to append text to column names, and enter the suffix text. |
Modify columns | Options: Modify all column names or Modify all column names except selected (and select the columns that will not be modified). |
* Setting can be specified using a parameter.
Remarks
Use this action early in the workflow to ensure accurate column selection downstream. Using this late in the workflow build can result in downstream actions being disabled as set column names are no longer found.
Examples
Example #1
Use a prefix to label the "Prov" and "City" columns as coming from Table 2 ("tbl2").
Before (source table)
ID | LName | Prov | City |
---|---|---|---|
E1 | Pelletier | ON | Toronto |
E2 | Bergeron | ON | Ottawa |
E3 | Lavoie | ON | Toronto |
E4 | Gagnon | QC | Montreal |
E5 | Simard | QC | Quebec City |
After (result table)
ID | LName | tbl2-Prov | tbl2-City |
---|---|---|---|
E1 | Pelletier | ON | Toronto |
E2 | Bergeron | ON | Ottawa |
E3 | Lavoie | ON | Toronto |
E4 | Gagnon | QC | Montreal |
E5 | Simard | QC | Quebec City |
Action parameters
Add prefix (tbl2-)
Modify all columns except selected (ID, LName)
See also
transformations/modifycolumnnames.txt · Last modified: 2025/01/26 13:28 by craigt