I have two tables (A and B) coming from different nodes that have some common columns. Table B contains values that should be filled in table A if those columns are empty.
For example table A has the following 2 rows:
and table B has:
I want to check if the column
Eng_Prepared in table A is empty, and if so, I want to fill it with values from the same column in table B.
I would be able to do it with
column expressions node but it doesnt have a provision to add additional tables.
Is there a way to do this? If someone could just direct me to as to the method and nodes I should use, I would greatly appreciate it!
I assume you have the same row id in both tables. There are two ways to achieve that:
- In a loop:
A. Connect table A to chunk start loop node with number of rows in a chunk equal 1.
B. Next add missing column filter node to remove columns without values - connect it to table A.
C. Add reference column filter node and connect table B to upper port and table A to the second port.
D. Join table A with table B using joiner node - using row id as key- table A to upper port table B to lower port - join type - left outer join.
E. End loop with end loop node.
- By join and aggregate columns:
A. Join table A and table B using joiner node -using row id as key- table A to upper port table B to lower port - join type - left outer join.
B. Add aggregate column node - one for each pair of column you want to be filled with non empty value. Choose two columns to aggregate, set First as aggregation type, uncheck missing value option in aggregation type, check remove aggregation column and change name of aggregated column to desired name.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.