Match value in one column with every value in other column

I have 2 columns name and father’s name. I want to see if value in column “name” exists in column father’s name.

NAME FATHER’S NAME
anil kumar
sunil sumant
amit anil
sumit rahul

So I want an output like row 1 col NAME value “anil” matches with row 3 col FATHER’S NAME value “anil” and matching % like 100% matching or 80% matching etc.

Hi @pujappathak and welcome KNIME Forum

See this wf match_values.knwf (29.3 KB). It checks every possible combination between name and fatherś name. With the String Similartiy node you can calculate a kind of matching percentage.
Schermafdruk van 2022-09-23 17-17-38
gr. Hans

2 Likes

Hi @pujappathak , and welcome to the Knime Community.

I think you can just do a join between the NAME and FATHER’S NAME columns:
image

Same input as yours:
image

Join on the 2 columns:

And here’s the result:
image

So the row containing {“anil”, “kumar”} matches with the row containing {“amit”, “anil”}, there the NAME “anil” on 1 row matched with FATHER’S NAME “anil” on the other row.

You can also see through the Row ID which rows matched.

For similarity search, you can use a Cross Join and then filter based on similarity comparison.

You can also use a virtual db to do joins with LIKE, for example:

2 Likes

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