Column Expression X Expression

Hello everyone,

With the update to version 5.4, the “column expression” node has become legacy.
It’s not a problem.

I use the column expression a lot, and it might be the node I use the most for setting up rules.

For me, one of the great advantages of the column expression is the ease of creating multiple columns or replacing values in multiple columns.

However, in version 5.3, we have the new “expression” node.
I thought about starting to learn how to use it, but to me, it seems like it doesn’t allow the creation of multiple columns in the same node.

My question is: is that correct?
If I want 10 columns, will I have to use 10 expression nodes?

Best regards…

1 Like

Hey there,

learning the new Expressions node is a good idea as it sort of is the successor of Column Expressions.

With 5.4 it also allows you to create multiple Expressions (i.e. multiple columns):

You just click on the Add new Expressions Button.

Also it now allows you to reference a previously created expression in one that follows… that used to be one of the reasons I needed multiple column expressions nodes in the past…

2 Likes

Hi @Felipereis50 , you may also be interested in this discussion on the “old” and the “new”…

2 Likes

Thanks for all information guys

I really wanted this functionality to create an expression linked to another column where the column expression did not exist.

Therefore, I will start the habit of using the “Expression node,” which seems to be more powerful.

:fist_right: :sparkles: :fist_left:

:grin:

2 Likes

Thank you for the information. Of course the environment evolves and old needs to be replaced with the new.

The only problem I face in upgrading is that I have literally hundreds of column expression nodes. Replacing them individually would be very labourious and may inevitably lead to bugs. Meanwhile my entire workspace is littered with “Column Expression (Legacy”) headings. And if you stop supporting it, I’m in trouble.

Any chance we could see a utility that helps automate the process? Or at least replaces a single legacy node with the new one?

Thank you, KNIME is awesome!

3 Likes

I would say you are not alone @harrytuttles , and therefore there is safety in numbers! I would very much doubt that support for the Column Expressions node will cease any time soon. Move to newer nodes for new workflows where you can but don’t lose any sleep over the places you’ve used the older nodes.

There will be times when the new nodes don’t (yet) do what the old ones can do, so I would say continue using all of the features on offer whether they be “legacy” or not.

4 Likes

Ditto on my end. The one saving grace is that when I finally get around to replacing the hundreds of Column Expressions nodes, they will likely be replaced by dozens of Expressions nodes because they support multiple expressions in a series. I would like to see a mindset shift of tackling the difficult challenge of “updating” existing nodes (even when translating them is could cause errors because of major changes), instead of depreciating old nodes and creating new ones which creates user challenges. At least make it a built in option to try and migrate to the newer node replacements by utilizing KAI. Likely wouldn’t nail it every time, but should get us a decent starting point with way less work.

3 Likes

Thank you both @takbb and @iCFO for your encouragement, most appreciated :+1:

2 Likes

On another note: Does someone have an example of an if then else syntax with the new expression node. Maybe more than two options since of course you can use if() function for two options.

1 Like

@mlauber71

Here you go…

I actually like the syntax and how you can make the logic more easy to understand by keeping different conditions on different lines…
WF

Expression:

Prototype:
expressionsmultipleiftest.knwf (74.3 KB)

4 Likes

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