Hi all,
I have to tables which I want to join. However, the column I want to join on in the second table depends on the value per each row in the first table.
Does anyone has an idea how to realise this?
Many thanks!
Hi all,
I have to tables which I want to join. However, the column I want to join on in the second table depends on the value per each row in the first table.
Does anyone has an idea how to realise this?
Many thanks!
Hi @PeterV99, welcome to the forum.
In this situation, you’ll need to unpivot your 2nd table to give a table with 3 columns: year, code, and planet.
Once this is done, then you can join this table with table 1 on year and code.
Hi @PeterV99,
below a small example how to do it.
As @elsamuel said the Unpivot Node should do most of the work you need to do
(@elsamuel you were a bit faster just put my example here so the work is not wasted :P)
Workflow Overview:
Table 2 (as Table Creator)
Unpivot config:
Joining with prepared columns
Result:
Example Workflow:
KNIME_project30.knwf (13.5 KB)
Hi both of you,
This does the trick! Thank you both for your swift support!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.