joiner node duplicates values

I don’t understand the joiner node. I joined two tables via the ID num column. As a result knime triplikates the values. Even if I reduce the columns only to key column and one of the value column at the end it appears the same. Here is a pic of the tables:

Any suggestions?

Hi,
A join connects all matching rows. Because you have 00033 multiple times in both tables, it connects each row with each other, i.e.:

  • Table 1 Row 1 with Table 2 Row 1
  • Table 1 Row 2 with Table 2 Row 1
  • Table 1 Row 3 with Table 2 Row 1
  • Table 1 Row 1 with Table 2 Row 2
  • Table 1 Row 2 with Table 2 Row 2
  • Table 1 Row 3 with Table 2 Row 2
  • Table 1 Row 1 with Table 2 Row 3
  • Table 1 Row 2 with Table 2 Row 3
  • Table 1 Row 3 with Table 2 Row 3

It does not look at row numbers or how often a certain value appears. All it cares about if the values are the same or not.
Kind regards,
Alexander

And as for a solution: you could for each table first run a Group Loop Start with the join column as the group column, then use a Counter Generation node to add a running number to each row. Then end the loop with a Loop End and use both the ID num and the counter as join columns. You may lose rows that way if one table has more rows for a certain ID num than the other table, though.
Kind regards,
Alexander

Edit: more likely you need to add another of your columns to the join columns so that there are unique matches.

1 Like

Thanks. It is more complicated as I thought. I’l try it out.

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