I would like to use flow variables in a join node that is inside a loop to always join two tables.
This is my workflow:
Table 1 has columns Date, A, B, C
Table 2 has columns Date, A, B, C, User, Comment
I would like to left join the tables based on the matching criterion of columns A, B, and C and merge all join columns.
So far, I established to join the columns based on the matching criterion. The flow variable that I created in the column filter is called leftCol. Can someone help me to adjust the settings so that all join columns are merged? Thank you!
Please see my current settings below:
Hi @jana_knime ,
If you always want to merge the join columns, you could just tick it in the Joiner Settings screen, and then you won’t need to set it using a flow variable. So I assume you sometimes want to merge and sometimes you don’t, based on a variable? If this is the case you will need to create a Boolean variable that will have either a value of true (merge) or false (don’t merge).
The set of columns that you wish to join on, if that’s what you are also trying to do needs to be in the form of two String arrays (one for each table) and supplied to the “joinPredicate” flow variables settings as shown here:
I have attached a basic workflow demonstrating the join using variables
Joining using flow variables.knwf (17.4 KB)
Thank you very much for your help @takbb!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.