Column Expressions issue with certain column names

The Javascript validation for the new Column Expressions node parses column names for keywords and this causes issues if you have a column name that contains a reserved word. For instance, if you have a column named like “min revenue”, it will not validate the expression

column("min revenue") > 10

A workaround is to change the column name to, for instance, “Min revenue”. But, the parser/validator should not validate the contents of string literals.

Thank you for looking into this. BTW, this node is a wonderful addition to Knime! Just a few bugs to work out.

2 Likes

Hi,

this is indeed a bug when parsing the expression (an rather an annoying one).
We will fix that as soon as possible.

As an alternative workaround you can either access the column by its index (starting at 0 for the first column)
or do something like

col = "m" + "in revenue" // also works with: join("m", "in revenue")
column(col) > 10

so that you don’t have to rename the column.

Thank you for your feedback,
Moritz

5 Likes

Many thanks!

-Michael