Hey all, KNIME newbie trying to transition from Alteryx to KNIME.
Is there a document anywhere that breaks down how Expression Syntax works in KNIME? Every time I need to write a formula/expression I find myself struggling.
Also, I am writing a Rule-Based Row Filter using an ‘IN’ expression. There are about 30 strings that need to be present for the IN. Rather than have on massive continuous line is it possible to do a line break to write each string on a separate line? I do this in VBA sometimes and was wondering if it it possible in KNIME.
I really appreciate any guidance on expression/formula writing!
Like in other programming languages, called functions are evaluated starting from the innermost, i.e. if you have an expression like
column(“a”) will be evaluated first and feeding its result (in this case the content of the column called “a”) into the function surrounding it. This way you can combine multiple functions to build a more complex one.
As these expressions get more and more complex and results of calculations may be re-used to feed different functions, you can store values into variables using
col_a = column(“a”)
res = sqrt(col_a)
Now you can re-use col_a and res in the lines to follow. The evaulation of an expression is always from top to bottom.
In addition to what has been said I would add that line break in Rule Engine nodes are not possible as each rule is either line or comment. In order to have each string in its own line you should do 30 rules.
Also considering you are in transition from Alteryx to KNIME I suggest you to check this forum topic: