Table of Contents
MERGE ANOTHER TABLE
Category: Transform / Basic
This action appends one or more columns from another table where the values in certain columns in both tables match. The action is similar to the SQL join.
There are three possible merge modes:
Retrieve the first matching combination from the other table. Any subsequent combinations are ignored.
Left Join Mode
Retrieve all matching combinations from the other table. This mode can increase the number of rows in the current table as rows are duplicated to hold any multiple matches from the second dataset.
Full Join Mode
Include all combinations of keys from both tables. Similar to the full outer join in SQL.
- (Lookup Mode) Look up replacement values for common misspellings or abbreviations.
- (Left Join Mode) Blend in additional data from other tables into the primary dataset.
- (Full Join Mode) Combine two entire datasets to be cleaned and consolidated downstream.
|Add columns from table||Select table that will return columns to the current dataset where values match.|
|Where all these columns match||Select the columns within the current dataset (left drop-down) and the second dataset (right drop-down) where
values will match. To define multi-columnar matches, use the Add more matching columns to select additional matching columns in each dataset.
Lookup (for each row in this table, get any one matching row from the second table and ignore other matches),
Left join (for each row in this table add all matching rows from the second table),
Full join (add matching and non-matching rows from both tables).
|Return columns||From the list, select the columns from the second dataset that will be appended to the current dataset.|
The reference to the second table will appear as a dotted line connecting this action to the second dataset in the application window.
Matching is case-sensitive.
Values must be identical (equal) in order to be matched. If another matching mode is needed (e.g. "Starts with") use the Match action first to do the matching.
For an inner join use the Keep/remove matching action before merging to keep only the overlapping subset of values in the matching columns.
The resulting table after Merge can't have more than 134,217,728 rows.
Example: Merge the "Outflow" column of Table 2 into Table 1 based on matching values in the "Rivers" columns in both tables.
Table 1: The longest rivers in the world
Table 2: The outflow
|Yangtze||East China Sea|
|Mississippi||Gulf of Mexico|
Add columns from table: Table 2
Where values in Table 1 "River" column match values in Table 2 "River" column
Merge mode: Left join (add all matching rows from Table 2 to Table 1)
Return column: Outflow
|Amazon||6400||South America||Atlantic Ocean|
|Yangtze||6300||Asia||East China Sea|
|Mississippi||6275||North America||Gulf of Mexico|
- Split Excel spreadsheets into multiple spreadsheets (Project; Module: Main; Group: Tab 1; Table: Spreadsheet A.xlsx;
Action position: 2)
- Which technique for grouping many columns of data together (i.e. 50+ columns) (Project; Module: Main; Group: Tab 1; Table: Table 2; Action position: 4)
- Join 2 tables with multi criterions equal and not equals in where (Project; Module: Main; Group: Tab 1; Table: Join; Action position: 2)
- “Merge another table” action - merge all columns (independently of the column name) (Project; Module: Merge; Group: Merge;
Table: Merge tables; Action position: 2)