Tips& Tricks: Dynamic column names - The "Column Expressions" node can work with columns specified by position.

Hi, Today’s Tips and Tricks is very exciting, yet I could not find how The “Column Expressions” node can work with columns specified by position.
Can Some one Clarify ? and possibly put it in the tips & tricks page


Hi @Safak , I just did a quick check in the Column Expressions node. You can use the column(<column_index>) function.

I put something together for you.

This is my input data:

I used some dummy column names so that there is no pattern to show that their names are irrelevant and independent.

You access each column in the Column Expressions like this:

The Expression (enclosed in red rectangle) column shows you the expression I used (essentially column(0) points to the first column, column(1) to the second column, column(2) to the third column, etc), and the Output column (enclosed in green rectangle) shows the new column I am creating off the expressions.

Basically, I’m accessing the data of each input column and adding them to new columns, where each new column has name to show where the data is coming from.

Here are the results:

And here is the workflow: Dynamic column names with column expressions.knwf (6.7 KB)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.