How to check one data contained by another table

Hello,
I have two tables both containing country info. Format of TABLE1 is “Bulgaria; Denmark; Estonia; Finland;” and the TABLE2 is just columns with country names like;
Bulgaria
Denmark
Estonia
Finland

I want to check whether one of the values on TABLE1 is included on the TABLE2 how can i check that?

Do you want to select a single value from Table 1 to check against Table 2?

I developed a quick and dirty workflow which assumes you want to match one value in Table 2. A more elegant approach would probably use some form of error trapping, but this works,



3 Likes

Hi,
@rfeigel solution is brilliant!
If you need a non graphical solution you can try this:

4 Likes

hi @rfeigel let me explain myself better;

I have values on cells like table1 cell1 “Bulgaria; Denmark; Estonia; Finland;” and on different row (table1 cell2) values may change like “Bulgaria; USA; Turkey;” etc.
What I’m trying to do is If one of the countries on cells of table1 is in table2 return “yes” if none of the values on the cells exist in the table2 return “no”

And as you can guess both tables are bigger than given examples

Hi @svmetehan , if you want a true/false result for each row, you could do it like this I think

2 Likes

Can you post some sample data? That would help a lot.

If @takbb solved your problem, please mark as “solved” so others know this is the solution and he gets well deserved credit.

Hi @rfeigel ,
Please find the sample data below.

Sample data.xlsx (10.2 KB)

Hi @takbb

Thank you for the suggestion, I can see the result of your work on the last “column filter” looks like it worked but I can not edit the process since there is an error on joiner which I don’t know how to solve:

And also since I’m using my company pc I can not download all the nodes as I want, I’m having trouble with the “Value Lookup” node as well.

Try this. Without the Value Lookup node life gets more complicated. I think this does what you want. I used the data you posted.


1 Like

Hi @svmetehan , what version of KNIME are you using?

The errors are because the workflow is a later version of KNIME than the one you are on, and both the value lookup and the joiner node in 5.4 are not backward compatible with your version.

If I know which version you are using I can write the equivalent using that version of KNIME but I’ll always assume people are using the latest version unless they specifically say otherwise.

My last workflow uses the new Joiner node. Here’s one with the deprecated Joiner node which should work on earlier versions of KAP.

2 Likes

Did my last workflow work for you?