RULE ENGINE

Good afternoon guys, how are you?

I would like in the rule engine, I have values ​​less than 10, if they are less than 10 I would like to concatenate with the current value.

Example :

A<10=>0&A

Hi @Gabriel2020 , unfortunately Rule Engine won’t work for you here as Rule Engine cannot perform concatenations. You would need to use a different node such as Column Expressions or String Manipulation, but how you do it depends a little on the data type of A, and whether you are trying to append a new column or replace the existing column.

I’m guessing that A is an Integer Column, but if you are trying to prefix a zero on the front then you are trying to generate a String. But if that is the case, what do you want to generate when A is >= 10 ?

And if A is a string column, that you wish to replace, then are we to assume it always contains a numeric value? We’d need to allow for String comparison not working the same way as numeric comparisons, as in string terms “9” is greater than “10” for example. Instead of comparing with 10, can we perhaps test its length < 2 ?

Perhaps you can provide more context.

3 Likes

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