# Join

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

<figure><img src="https://1817223046-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5mI0ilekQtcGTXKGQ2EF%2Fuploads%2F8VTDqhcAgNVQR3dJy9pg%2FProperty%201%3DJoin.jpg?alt=media&#x26;token=f33bfad3-186b-45a0-b011-c1e5bf4aec48" alt=""><figcaption></figcaption></figure>

### Input/Output

<table><thead><tr><th width="253">Input</th><th>Output</th></tr></thead><tbody><tr><td><p><strong>Left Table</strong> - any table</p><p><strong>Right Table</strong> - any table</p></td><td>Single table with merged data from <strong>Left Table</strong> and <strong>Right Table</strong></td></tr></tbody></table>

### Options

<table><thead><tr><th width="255">Option</th><th>Description</th></tr></thead><tbody><tr><td><strong>Left Field</strong></td><td>Column in the Left table that shares values with the Right table</td></tr><tr><td><strong>Right Field</strong></td><td>Column in the Right table that shares values with the Left table</td></tr><tr><td><strong>Join Type</strong></td><td><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 any unmatched rows in the Right table</li><li><strong>Right</strong>: keeps all rows in the Right table, discards any unmatched rows in the Left table</li><li><strong>Inner</strong>: discards all rows in either table that do not have a match in the other table.</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></td></tr><tr><td><strong>Match Option</strong></td><td><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></td></tr></tbody></table>
