rule engine expressions

Is it possible to load an expression with "arithmetic operators" as a flow variable to rule engine node?

If I create a column with expressions such as (5.0d <= 6.0d => "1"), may I use it in rule engine node?

Hi Bora,

For your first question: No, it is not possible to use computations (I guess you meant +,-,*,/) in the rule engine expressions. You have to compute the expressions as new columns (maybe with the PMML version you can generate computed columns that are not present in the table and use them, I have not tried that yet).

You can replace a single rule by the «5 < 6 => "1"» expression, but that is just equivalent to «TRUE => "1"». If you have multiple such flow variables (from a loop or from a Table Row to Variable or from Table Column to Variablenodes), you can replace more (careful, the order of rule is important, after this rule nothing else will match, but you might get warned).

Hope this helps, gabor

Hi Gabor,

I tried your suggestion and it doesn't seem to be working properly. I attach the screenshot. Second row' prediction must be "?" , if I am not mistaken.

I am sorry, I have misunderstood you. I had an impression you tried to apply these rules to another tables. In this case you just need to loop through the table rows (with a 1-row chunk loop) and a table row to variable node should provide the input to the Rule Engine Variable node, then back to the table. See the attached workflow.

Thanks Gabor.

Works like a charm!!!