User Tools

Site Tools


transformations:crossmerge

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
transformations:crossmerge [2018/08/23 07:37] dmitrytransformations:crossmerge [2021/07/19 02:28] (current) – [Examples] craigt
Line 1: Line 1:
-===== Cross merge =====+{{ transformations:CrossMergeAction.png}} 
 +====== CROSS MERGE ====== 
 +Category: Transform / Advanced \\
  
-This action creates a table with all possible combinations (i.e. Cartesian product) of rows in two table +\\  
 +=====Description===== 
 +This action creates a table with all possible combinations (i.e. Cartesian product) of rows in two tables.\\
  
-It can be helpful in a number of cases: generating a custom calendar, or for performing a complex merging/matching, where all possible combinations are later filtered using a complex condition. Note that this action can produce extremely large tables, so make sure that you’re not cross-merging large tables. To estimate the number of rows in the resulting table multiply the number of rows in both source datasets.+\\ 
 +=====Use cases===== 
 +//Cross Merge// can be helpful in a number of cases: 
 +  * Generating a custom calendar 
 +  *Performing a complex merging/matching, where all possible combinations are later filtered using a complex condition.
  
-Note that EasyMorph can handle tables with up to 536 million records only.  +\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Merge table|Select the table to merge with the current dataset.| 
 +|Columns|Select whether to merge all columns in the second dataset, or just selected columns.  Options:  //All columns// or\\ //Selected columns// (choose which columns to include in the merge).| 
 +The reference to the second table will appear as a dotted line connecting this action to the second dataset in the application window.\\
  
-EXAMPLE+\\  
 +=====Remarks===== 
 +This action can produce extremely large tables, so make sure that you’re not cross-merging large tables. To estimate the number of rows in the resulting table, multiply the number of rows in both source datasets.\\ 
 + 
 +EasyMorph can handle tables with up to 536 million records only. \\ 
 + 
 +\\  
 +=====Examples===== 
 + 
 +**Example:** Create a custom calendar with quarters in years 2016-2017.
  
 **Table: Years** **Table: Years**
- 
 ^  Year  ^ ^  Year  ^
-|  2016  +|  2016| 
-|  2017  | +|  2017|
  
 **Table: Quarters** **Table: Quarters**
- 
 ^  Quarter  ^ ^  Quarter  ^
- Q1  | +|Q1  | 
- Q2  | +|Q2  | 
- Q3  | +|Q3  | 
- Q4  |+|Q4  | 
 +\\  
 +**Action parameters:** 
 +>  Merge table:  "Quarters" 
 +>  All columns
  
 +(The resulting dataset will contain 8 rows.  Table "Years" 2 rows x Table "Quarters" 4 rows.)\\
  
-**Objective:** Create a custom calendar with quarters in years 2016-2017. +\\  
- +**Result table:**
-**Transformation:** Cross-merge. +
-Table "Years" has 2 rows, table "Quarters" has 4 rows. Therefore, the resulting dataset will have 2 x 4 = 8 rows. +
- +
-**Result:** +
 ^  Year  ^  Quarter  ^ ^  Year  ^  Quarter  ^
-|  2016   Q1  | +|  2016|Q1 
-|  2016   Q2  | +|  2016|Q2 
-|  2016   Q3  | +|  2016|Q3 
-|  2016   Q4  | +|  2016|Q4 
-|  2017   Q1  | +|  2017|Q1 
-|  2017   Q2  | +|  2017|Q2 
-|  2017   Q3  | +|  2017|Q3 
-|  2017   Q4  |+|  2017|Q4  |
  
-===See also===+\\  
 +====Community examples==== 
 +  * [[https://community.easymorph.com/t/adding-a-repeat-function/677/2|Example of using the "Crosse merge" action]] 
 +  * [[https://community.easymorph.com/t//1941/3|Breaking change in v4.4: Aggregate with Concatenate and grouping]] ([[https://community.easymorph.com/uploads/short-url/6UIlnnY1s4AzDsB6IzTS2bXQjlP.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Sample data//;\\ Action position: //3//) 
 +  * [[https://community.easymorph.com/t//2711/2|My first experiment API + conditional workflow + iteration]] ([[https://community.easymorph.com/uploads/short-url/jG4qopOtRfSxDo0UFJkNbBaKvac.morph|Project]]; Module: //Process Network ID//; Group: //Create company data table//; Table: //Tabular Data//; Action position: //6//)
  
 +\\ 
 +=====See also=====
 +  * [[transformations:intervalmerge|Interval merge]]
   * [[transformations:merge|Merge another table]]   * [[transformations:merge|Merge another table]]
-  * [[transformations:intervalmerge|Interval merge]] +  * [[transformations:repeatrows|Repeat rows]]
-  * [[https://community.easymorph.com/t/adding-a-repeat-function/677/2|Download a similar example from EasyMorph Community]] +
transformations/crossmerge.1535024238.txt.gz · Last modified: 2018/08/23 07:37 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki