FIND DIFFERENCES IN TWO DIFFERENT STRINGS

Hi all,
I am building a model where,
I have two excel sheets with the same data, sometimes could happen that in both some data are different,

after a Join node I have three tables
JOIN RESULT
LEFT UNMATCHED
RIGHT UNMATCHED

how can I find the differences into the rows and how can I find where’s the differences?

an example,
ID: AAAA455256 (LEFT UNMATCHED TABLE)
ID: ABAV455256 (LEFT UNMATCHED TABLE)

the system have to recognize the differences
ID: AAAA455256
ID: A BAV455256

Thanks in advance for you support

regards
Pasquale

Hi Pasquale,
Are the IDs in the same row, in different columns? What exactly do you want to output? The indices of the differences (e.g. [2, 4])?
Kind regards,
Alexander

Hi @Pasquale_p,

it sounds like a string distance problem rather than a joiner one.
There’s many examples on the hub you can look at, but first we need to understan the problem better.
Could you explain more in detail what you need to do?

Thank you,
Raffaello
Linkedin

2 Likes

Hi @lelloba and @AlexanderFillbrunn ,
thanks for your support

in red what is different,
is it possible to create two different excel like the example?

thanks for your help
:wave:

Hi @Pasquale_p,
This is not really possible, as KNIME does not have the ability to store individual characters in different colors. It just stores the text content of a cell.
Kind regards,
Alexander

1 Like

Hi Alexander,
not possible to show what is different?

thanks

Hi @Pasquale_p,
It is not possible in the format you require. KNIME cannot color individual letters in a cell in a different color. It is possible (using some coding) to find out where the Strings differ, but the output can most likely only be a list of indices of the letters that differ.
Kind regards,
Alexander

Table Difference Finder node?

Hi,
The Table Difference Finder only shows you which cells are different, but it does not show you any differences within the cell content.
Kind regards,
Alexander

1 Like

Hello Pasquale_p

@AlexanderFillbrunn suggested that it was possible to find out where the strings differ. I have created a flow that does that

The output looks like this:
image

I hope this helps

Frank Columbo

2 Likes

Great!
I can working on this to perform by my needs

thank you

I’ll try

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