Problem parameterizing Column Rename Node with variable


I am trying to change the name of a column by parameterizing the Column Rename node with a workflow variable. (KNIME 2.5.1 64-bit)
I select the Flow Variables tab in the Configuration dialog and navigate to the column whose name I want to change.
Then I use the drop-down of the "new column name" to select the variable holding the new column name.

The problem is that once the Column Rename node is executed once:
1) the list of columns in the Flow Variables tab of the config dialog no longer contains the original name of the column, only the renamed name.
2) There is no workflow variable associated with the (now renamed) column in the Workflow Variables tab.

The net effect is that the Column Rename node can be successfully parameterized and run one time, but not the second time.
The second time, if the value of the workflow variable has changed, the column will not be renamed to reflect the new value.
(Note: I noticed the Flow Variables tab also supports specifying the old (original) column name using a variable and I tried specifying that as well, thinking it might help, but no luck).

Any ideas on a workaround? Any help greatly appreciated.


How about using the Column Rename (Regex) node, does this help you.

In the node choose the option "Literal", and then you could create a variable of the original column name and pass this into the flow variable section "SearchString", and with the variable containing the new column name, you can pass this in to the section "ReplaceString".

You can then repeat the above process as many times as desired.


Hi Simon, your suggestion works great. Thanks! I forgot all about the regex version of this node.

Hopefully the bug in the column rename node described above will be logged.


This is a great node! I can replace a column name with vaviable value in a table.