Rule-Based Row Filter and Flow Variable

Hi,

I'm trying to filter some rows using a condition based on the value of a flow variable.

I used something like

$Location$  LIKE "*$${SV_SYSDATE}$$*" => TRUE

where the column Location is a folder path and the flow variable value is "20141030". The output table is empty no matter what. 

I tried also to generate the entire condition using a Java Snippet and the assigning it in the node variables, but it gives me this error

Errors loading flow variables into node : Expected a number, boolean, string, column, a table property or flow variable reference.

Any advice?

Thanks.

Hi,

The flow variable reference should not be within a String. That is just a String (and I am not surprised you do not have such an exotic location ;-) ).

I would create the "*" + yourFlowVariable + "*" as a new flow variable (for example locationLikePattern) and use a similar rule:

$Location$ LIKE $${SlocationLikePattern}$$ => TRUE

Hope this helps.

Cheers, gabor

It's working!

Thanks Gabor.

Angelo.

Hi,

I have a differen problem with Rule-based row filter. when I use it for my data and then I use Logistic Regression node, I got the error

 Execute failed: ("NullPointerException"): null

this is my code for filtering: 

$TEN$ =1 OR $TEN$ =2 => TRUE

I have 6 valuse (0,1,2,3,4,5) for this TEN variable.

How can I solve this problem?

Thanks

Laleh

It is not clear for me which node produces the NullPointerException. As you put this question to a Rule-based Row Filter topic, I assume that was causing the problem, though I could not reproduce it. Could you share your workflow demonstrating the problem of the Rule-based Row Filter? (Also version information is appreciated.)

Thanks, gabor