StreamableKNIME Math Expression Node version 3.6.0.v201807061247 by KNIME AG, Zurich, Switzerland
The Math Formula (Multi Column) node is an extension of the Math Formula
node which evaluates a mathematical expression based on
the values in a row for a set of selected columns. It allows the user to
do with a single node what would otherwise require multiple nodes. If
you wanted to evaluate the same expression for more than one column with the Math Formula
node, you would need to string several Math Formula nodes together. For these cases,
the Math Formula (Multi Column) allows you to write a formula that refers to
the current column in a set of selected columns.
E.g. to add 1 to the values of columns A, B, and C, you would select columns A, B, and C and enter the formula "
$$CURRENT_COLUMN$$ + 1" into the Expression editor.
The computed results can be either appended as new columns or be used to replace the selected input columns.
Available variables to use in the expression are the values in the corresponding row of the table (left list in the dialog).
Commonly used functions are shown in the list "Mathematical Functions". There are also some constants available, such as pi (the ratio of the circumference of a circle to its diameter), e (the base of the natural logarithms), the total number of rows in the table, and some other column based constants (
constant category of functions).
This node uses JEP, the Java Math Expression Parser.
Column based constants such as COL_MIN(col_name) will be calculated in advance (if necessary).
You can reference the integer flow variables like this:
the floating point flow variables like this:
The set of selected columns can be referenced using the CURRENT_COLUMN placeholder which looks like this:
$$CURRENT_COLUMN$$. In each iteration of the node (looping over the set of selected columns) this
placeholder will be replaced with the column name from the current iteration.
Reference the columns with the form:
When any of the used columns contains a missing value, the result is missing, just like when the result would be NaN, infinite value, or outside of the 32 bit signed integer range when that is requested.
NaN values act as value true in boolean expressions and compared to anything (including NaN) in any way (including ==, but not !=, which is like !(... == ...)) is false (0).
Please note the expressions are case sensitive.
To use this node in KNIME, install KNIME Math Expression Node from the following update site: