# 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="/pages/skX9QoSAm5SzA7U542O9" %}
[Understanding the Join options in the Cascade Join tool](/cascade/cascade-faqs/knowledge-based/understanding-the-join-options-in-the-cascade-join-tool.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cascade.io/cascade/tools/combine/join.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
