Compare tables rows values

Hi,

I want to know how would be the workflow if I want to get the differences between two tables in Knime and output in a new table or csv.

I have tried with the join node but with this I could not get that difference.

Any ideas?

Cheers

Hi @jacec2ce,

Could you please be a bit more specific about what you are trying to achieve? Are you looking for different entries in the cells of two tables or do you want to compute the mathematical difference between columns? How do you identify the rows that should be compared?

Best,
Stefan

First of all, thanks for your reply. I have 2 tables with the sames number of columns and rows.

I want to create a new table with the rows where the entries are differents for the same column and row comparing the two tables.

Regards,
Juan.

Do they also have the same names and same types, i.e. is the structure/spec of the two tables exactly the same?

If you looking to do this with just one column, you can use the Reference Row Filter and select the columns to check against each other (also select Exclude rows from reference table to get your desired outcome).

1 Like

I had a similar need. What I did was created a COLLECTION column from all the columns in the table except the natural key. Then I joined the tables together on the natural key. Finally I used a rule-based filter where the collection column of table 1 was not equal to the collection column of table 2.

3 Likes

Hi,

I want to know how to get the next result:

image

Any ideas?

Thanks.

Hi @cristian_g33,

In your case, you can use the Missing Values node. In the Column Setting tab, double click Column_1 and select Previous Value in the Do nothing dropdown.

Best,
Stefan