# Join

Join allows for the combination of two datasets into a single table, based on a shared column.

### Input/Output

| Input                                                                                         | Output                                                                |
| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| <p><strong>Left Table</strong> - any table</p><p><strong>Right Table</strong> - any table</p> | Single table with merged data from **Left Table** and **Right Table** |

### Options

| Option           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Left Field**   | Column in the Left table that shares values with the Right table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Right Field**  | Column in the Right table that shares values with the Left table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Join Type**    | <p>Indicates how the table should be joined. Includes the following options:</p><ul><li><strong>Left</strong>: keeps all rows in the Left table, discards and unmatched rows in the Right table</li><li><strong>Right</strong>: keeps all rows in the Right table, discards and unmatched rows in the Left table</li><li><strong>Inner</strong>: discards all rows in either table that do not have a match for in the other one.</li><li><strong>Outer</strong>: keeps all rows in both tables, regardless of whether matching rows are found.</li><li><strong>Cross:</strong> combines each row from the Left table with each row from the Right table</li></ul>                                                                                                                                                                                              |
| **Match Option** | <p>By default, joins create new rows for each match found in between the Left and Right tables. This often results in a joined table with many more rows than either source table. To prevent that, for a <strong>Left</strong> or <strong>Right</strong> join you can choose to only match the first or last matched record, rather than creating a new record for each match.</p><ul><li><strong>Match All</strong> (default): creates a new row for each matched.</li><li><strong>Match First</strong>: performs like a VLOOKUP in Excel, keeping the first matching record in the table and ignoring subsequent matches. Output table will have the same number of rows as the Left (Right) table for a Left (Right) join.</li><li><strong>Match Last</strong>: performs the same way as Match First, but keeps the last matching record instead.</li></ul> |

### Suggested Articles

{% content-ref url="../../cascade-faqs/knowledge-based/understanding-the-join-options-in-the-cascade-join-tool" %}
[understanding-the-join-options-in-the-cascade-join-tool](https://docs.cascade.io/cascade/cascade-faqs/knowledge-based/understanding-the-join-options-in-the-cascade-join-tool)
{% endcontent-ref %}
