Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision |
transformations:merge [2021/05/12 14:52] – [Remarks] dmitry | transformations:merge [2023/10/11 20:49] – [Remarks] craigt |
---|
For an inner join use the [[transformations:keepremovematching|Keep/remove matching]] action before merging to keep only the overlapping subset of values in the matching columns. | For an inner join use the [[transformations:keepremovematching|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. | |
| |
\\ | \\ |
| |
| |
**Objective:** Merge the "Outflow" column of Table 2 into Table 1 based on matching values in the "Rivers" columns in both tables.\\ | **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 1:** The longest rivers in the world\\ |
| |
> Add columns from table: Table 2 | > Add columns from table: Table 2 |
> Where values in the Table 1 "River" column match values in the Table 2 "River" column | > 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) | > Merge mode: Left join (add all matching rows from Table 2 to Table 1) |
> Return column: Outflow | > Return column: Outflow |
| |
\\ | \\ |
**Result:**\\ | **Result table:**\\ |
| |
^River ^Length (km) ^Continent ^Outflow ^ | ^River ^Length (km) ^Continent ^Outflow ^ |
| Mississippi | 6275|North America |Gulf of Mexico | | | Mississippi | 6275|North America |Gulf of Mexico | |
| |
| \\ |
| ====Community examples==== |
| * [[https://community.easymorph.com/t//1273/8|Split Excel spreadsheets into multiple spreadsheets]] ([[https://community.easymorph.com/uploads/short-url/klG62NjaDDRQ2VXvo1xtFZJUYjK.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Spreadsheet A.xlsx//;\\ Action position: //2//) |
| * [[https://community.easymorph.com/t//1489/3|How to calculate YoY change using self-join]] ([[https://community.easymorph.com/uploads/short-url/40p81AvBk4V0GKWU3IHpy1evo2K.morph|Project]]; Module: //Main//; Group: //Self-join//; Table: //This year//; Action position: //2//) |
| * [[https://community.easymorph.com/t//1652/2|Which technique for grouping many columns of data together (i.e. 50+ columns)]] ([[https://community.easymorph.com/uploads/short-url/ub3zV5WsGF4rWqJQMb7oEtPReqy.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 2//; Action position: //4//) |
| * [[https://community.easymorph.com/t//2041/6|Join 2 tables with multi criterions equal and not equals in where]] ([[https://community.easymorph.com/uploads/short-url/kNkqMsDYMJjzjiN4C5g8O4g3YlA.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Join//; Action position: //2//) |
| * [[https://community.easymorph.com/t//2421/8|“Merge another table” action - merge all columns (independently of the column name)]] ([[https://community.easymorph.com/uploads/short-url/jHsMLkfW9YZVmGYNYtayhOt1VkJ.morph|Project]]; Module: //Merge//; Group: //Merge//;\\ Table: //Merge tables//; Action position: //2//) |
| |
\\ | \\ |