Search for value and return entire row

Hello KNIMErs,

I have a dataset with dynamic number of rows and static number of columns.
I would like to filter out all rows that contain FALSE Boolean value in:
a) 1 or more of columns of Boolean type, where there are 200+ such columns;
OR
b) any column.
Both approaches would lead to the expected results, because FALSE Boolean values don’t exists in columns other then Boolean type.

Any suggestions are more then welcome.

BR,
Kaz

Hi @Kazimierz

Can you please try and adapt that WF to your data? Does it do what you want it to do?
Exclude_row_with_FALSE_in_any_bool_column.knwf (17.9 KB)

Alice

3 Likes

Hello @Kazimierz
You can take a look at the final section of this WF (from column aggregator onwards). I think that this regexMatcher() in String Manipulation can handle the query:

BR

1 Like

Hi @Alice_Krebs

Your solution brings my workflow much closer to the expected result.
After additional joining and filtering, I’m getting what I expected.

Thank you so much,
Kaz

1 Like

Hello @gonhaddock

Thank you for your proposal. It doesn’t do what I expected. In my opinion, String Manipulation node creates incorrect outcome in appended FILTER column: there are only ‘False’ values in FILTER column, while there should be mixture of ‘False’ and ‘True’ values there.

Best regards,
Kaz

1 Like

Hello @Kazimierz

I can accept your valuation. I am sorry if my post lacked of explanations; but I don’t agree with the conclusions. As this approach, with different nodes, can handles many complex logic requirements.

The original workflow was built aiming to filter trues; Since your case requires to filter false, With very little adjustment the expected outcome can be achieved. Just for the records:

20230125_Exclude_row_with_FALSE_in_any_bool_column.knwf (57.2 KB)

BR

2 Likes

Hello @gonhaddock

You are right: both your solutions works OK.
After small modification in configuration on my side, both your proposals generate the expected outcomes.

To anybody who reads this topic: you can use either @Alice_Krebs’ or @gonhaddock’s solutions.

Happy KNIMEing,
Kaz

2 Likes

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