Rule-based Row Filter via list

Hi guys,

I have a new question to you. :slight_smile:

If I don’t want add for each word a new line in this note.
How can i handle that with a separate list .e.g. via table creator?

Tahnks in advance for your help.

BR

Andre

Hi @AndreP

There is an easier and more generic way of doing this, using the reference row filter:

You would just need to create by hand a table with the -Table Creator- node:

in which you have a column with all the values of your conditions, one per cell.

This hand made table should be used as second entry to the -Reference row filter- node to filter in your desired rows. If you need to filter out rows based on this second hand made table, then rather use the -Row Splitter- node.

If this is not clear enough, please share your workflow or data and I’ll take it from there.

Hope this helps,

Ael

1 Like

Hi @AndreP

Sorry I just noticed that you were not using “=” condition but “LIKE” in your conditions. This changes all since previous solution only works when using the equality condition “=”.

The alternative in this case is to use instead the -Rule-based Row Splitter (Dictionary)- node:

You would need to create in advance your conditions, either using a -Create Table- node or automatically with a few nodes which will compose automatically your conditions.

If this is not clear enough, please share your workflow or data and I’ll take it from there.

Hope this helps,

Ael

Ps: Although not appropriate in this case of figure, I’m still leaving my first answer since it may also be of help to the forum to solve similar problems.

4 Likes

Hi @aworker

I should have known this node earlier. Some time ago I needed something similar too, but I found a way by using a flow variable which overrides the actual rules in the Rule-based Row Filter node.

When applied to the issue of @AndreP it would look like this.

34523.knwf (15.7 KB)

There are often more than one solutions for a problem :slight_smile:

3 Likes

Additional tip: don’t use the rule based row filter. Use the rule based dictionary row filter:

The normal rule based filter is very slow in comparison with the dictionary version. Whenever you can, use the dictionary version (I use it all the time).

4 Likes

with the dictionary version, you can also manage it with the table creator.

Have fun!

1 Like

hi guys, thanks for replay! That’s amazing. :slight_smile:

I testing the last our and I found a other solution via the loop nodes what I want to share with you.

Example.knwf (14.7 KB)

BR

Andre

4 Likes

Hi @ana_ved

Does the same apply to the Rule Engine node? Is the dictionary one better performing compared to the non-dictionary one?

1 Like

Hi Andre,

Your solution will work! But it will be slow on the long run. Maybe try if this could work? Less nodes too :slight_smile: and it will be faster.

2 Likes

I have never tried or test with the rule engine! Worth checking. I personally am a big fan of the dictionary nodes because they can make it much easier to manage rules using a similar logic like my one above.

But about performance: this is my experience particularly with the rule based row filter. It is a beloved node, but I always recommend people to try the dictionary one when possible. With large datasets it pays off in the end.

1 Like

Hi @ana_ved

The proof of the pudding is in the eating…

Roundabout 1 million records for input going in to this:
afbeelding

Ran the two rule engines (containing the same 16 rules each) several times and this was the time info result:
afbeelding

In every run the Rule Engine was a bit faster compared to the Dictionary one. So no clear cut winner or loser in this performance contest ;-).

2 Likes

Bom dia @ana_ved
Hi @AndreP & @JanDuo

I’m amazed of all these possibilities to achieve the same thing ! Now @AndreP you have as we say in french “l’embarras du choix” :smile: !

Complementary to all these informations, a node I like a lot to compare performance of different solutions is the -Timer Info- node:

@AndreP you could now gather all the solutions together in a same workflow and use the -Timer Info- node to evaluate which one is the most performant solution in terms of speed.

Hope this helps too.

Best

Ael

PS: Haha ha @JanDuo, you were faster than me ! And you tought me a nice english saying:

“The proof of the pudding is the eating” :grinning: :+1: !

3 Likes

Perfecto! :slight_smile:

Works and really fast.

Thank you!

1 Like

Appreciate it! I would love to have an overview site which explores in detail the performance of nodes

1 Like

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