List as flow variable in Rule Engine node


I have made a list of unique values of a column (columnA for example) with the Groupby node.
Now I want to check if the values in the columnB are in that list.
I try with the Rule Engine node (IN function) but it doesn’t work (I try to pass the list as a flow variable, I also manipulate the concatenated list with string manupulation and pass it as flow variable and as a new column …)
Finally I use the Python node to do the task, but is there a more KNIME way to do this?

It will be very useful if the IN function in the Rule engine node (which is intended to check if the values are contained in the list) accept a list (flow variable) as an argument (a list from Groupby node or made with other nodes like String manipulation,…)

Thank you

1 Like

Hi @andrejz

You can use subset matcher node.
I know it is not what you ask for but it does the same thing.
Here is an example for you.
KNIME_project5.knwf (11.1 KB)



Hello @andrejz,

I agree with you and have added +1 on corresponding ticket. (Internal reference: AP-13371)

However for your use case isn’t Reference Row Filter a way to go? Or Splitter? (And you don’t need a GroupBy node to get unique values)


1 Like

Hi @ipazin

Thank you for the ticket and the suggestion for Reference row filter (I will look at it).
What I want is to compare if any of the values in column A exist (is present) in column B and put the result (yes or no) in column C… in this case is easier with two rows of python code :grinning:.


1 Like

Hi @andrejz,

I see. Makes sense. Then Filter is not a way to go and Splitter messes your row order. What you can do is to use Cell Replacer and append new column which will have missing values where value from column B is not in column A. Follow it with Rule Engine to replace missing value with no and where there is value with yes.

Honestly I’m still not sure which node would be the best one where such functionality would be added. Cell Replacer with user defined output? (Adding list flow variable support to Rule Engine still requires GroupBy node, and conversion to flow variable so I consider it to be a workaround…)



Thank you @ipazin Cell Replacer in combination with Group by and Constant Value Column do the job :clap:



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