transformations:merge
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
transformations:merge [2015/04/18 23:08] – dmitry | transformations:merge [2017/05/01 22:53] – dmitry | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Blend in/ Merge table ===== | + | ===== Merge another |
This transformation appends one or more columns from another table where certain columns in both tables match. | This transformation appends one or more columns from another table where certain columns in both tables match. | ||
- | There are two possible merge modes: | + | There are three possible merge modes: |
* Lookup Mode -- get **first** matching combination from the other table. If there are other combinations they are ignored. | * Lookup Mode -- get **first** matching combination from the other table. If there are other combinations they are ignored. | ||
* Left Join Mode -- get **all** matching combinations from the other table. It can increase number or rows in the current table. | * Left Join Mode -- get **all** matching combinations from the other table. It can increase number or rows in the current table. | ||
- | + | * Full Join Mode -- include all combinations of keys from both tables. Equivalent to the full outer join in SQL. | |
- | To make full outer join, first, append rows that exist in the other table but are missing in the current table using [[transformations: | + | |
EXAMPLE | EXAMPLE | ||
Line 35: | Line 34: | ||
* Add columns from table: Table 2 | * Add columns from table: Table 2 | ||
* Column: Outflow | * Column: Outflow | ||
- | * Merge mode: Add more rows to this table and all all matching rows from Table 2 (i.e. do left join) | + | * Merge mode: Add more rows to this table and all matching rows from Table 2 (i.e. do left join) |
**Result:** | **Result:** |
transformations/merge.txt · Last modified: 2024/04/11 23:55 by craigt