Is there a way to rename a variable in Knime?

All,

I am a new Knime user and I'm trying to figure out how to rename a flow variables in Knime. Currently every flow variable in my workflow is using a default name ... something like this >"Row0".  I would like to rename this variable to a more meaningful name.

Any help would be much appriciated.

 

Thanks!

 

 

2 Likes

Hi,

As far as I know, there is no way to rename a variable in KNIME. Therefore you should endeavor to start with the desired variable name if possible. In your case, you might rename the ROW IDs to the desired variable name before creating the variables (see the RowID node).

If that's not possible, another (less desirable) approach is to create new variables with the desired names by copying values from the old variables, using the Java Edit Variable node, for example. However, I dislike this option because you'll have 2 sets of variables, which creates confusion and increases the probability of errors.

Hope this helps,

Don

1 Like

You could always transform your flow variables into a table, then use rename and convert back to flow variables. However, getting it right from the start with RowID might be a cleaner approach.