Variables in Join node

Hi everyone,

I have two tables one is a code list that I want to insert according to the three columns in the data table.
With three columns I used three join nodes, but what if I have n columns …

Can this be done using a loop?
How to use the flow variable “currrentColumnName” in the Join node?

KNIME_project3.knwf (41.9 KB)
How to setup the loop so the result of the loop will be the same as at the end of the three joins.

Thank you
Andrej

hi @andrejz ,

the trick is to rename your selected column just before the join and re-rename it afterwards.
However, the second step is optional as the output table would get more complex. If you leave it renamed, I think it’s more straight-forward.

See attched.KNIME_project3.knwf (23.4 KB)

Hope, that helps
Tommy

Hi @tommy

Thank you for your answer the idea is good, but the result is not as aspected because the result with Joiner nodes has 6 rows but with the loop it has 18 rows.

1 Like

Hello @andrejz,

Yes.

leftTableJoinPredicate is the setting under Flow Variables which you are looking for.

Check this workflow example.
KNIME_project3_ipazin.knwf (59.1 KB)

Also I prefer Cell Replacer node over Joiner node in such cases. Find it easier to configure and think it’s faster :slight_smile:

Br,
Ivan

2 Likes

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