Rule Engine used for Formulas not String Solution

I have seen the examples used for the Rule Engine but nothing for conditional Formulas based on satisfying the rule for a condition. I am not disappointed with the String condition, but is there a Formula condition to satisfy the rule available? If not, is there a Work Around for the challenge?

I’m not sure what exactly your issue is.
Would you please explain a bit more and provide some examples?

If I understand you correctly, you want to use the regular expressions’ groups in the result of the rule. That is not possible. As I remember when it was originally implemented the named groups were not supported by the bundled Java and would be also hard to refer to them when there are multiple regular expressions in the conditions. Also PMML Rulesets do not support formulae in the result. (Though I should add that adding support to this would probably not very hard, but would be hard to use/document in my opinion.)

Thanks so much.

I am looking at a challenge with the “Rule Engine Node”
For Example…

When the values in Col0 are greater than 0, we [assign]

This is a comment $Col0$ > 0 => “Positive”

When the values in Col0 = Active and less or equal to 5 then, we [assign]
$Col0$ = “Active” AND $Col1$ <= 5 => “Outlier”

It appears to apply rules and will allow for the condition to be a “String” like Positive or Outlier.

I am needing the condition to be a Formula from the Columns in the table instead.

When the values in Col0 are greater than 0, we [assign]

This is a comment $Col0$ > 0 => $Col1$ * 5

When the values in Col0 = Active and less or equal to 5 then, we [assign]
$Col0$ = “Active” AND $Col1$ <= 5 => $Col1$ / $Col4$

Is there a node for this?
I was thinking that maybe I have to apply the Rule Engine 1st, then use the results of the Rule Engine to use a calculation from a certain column? I appreciate any insight into this challenge.

For this purpose you need to use

1 Like

Hi izaychik63,

Do you have any examples of how this would work? I can’t seem to find any good examples of this in action. I found Column Expressions - NodePit
But I wondered if you know of any videos that walk thru the thought process? Thanks for your feedback, I find it to be on the right track.

Thanks for the help, I got a pulse with the Column Expression Node. Here is an example…


q = (a)+((b)*(v))

if (a > 0)
q = (a)+((b)*(v)+(v/c))

The “Column Expressions” node suggested by @izaychik63 does exactly what you asked for.

Regarding your secondary question,

Take a look at this blog post:



This was a very interesting, “Deep Dive”, thanks for sharing.
After getting the Column Expression to perform properly I am now down to formatting the data for output. I have a table made up of products that fall into Categories/Cphases/Uses. I am wanting to aggregate the data such that I have sub-Totals for each Category/Cphases and Grand Totals at the end. Do you know of any examples with this type of formatting for output data? Thanks again…

1 Like

Please create a new topic for this new question and provide an example of the input and your desired output.


1 Like

OK, Thanks

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