> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# join_type

> Specifies the type of SQL join to perform.

This parameter defaults to left join (`always_left`) and supports several standard SQL join types, as well as two directional join types that are specific to Omni.

## Syntax

```yaml theme={null}
join_type: <type>
```

## Properties

<ParamField path="join_type" type="string" default="always_left">
  The type of join to perform. Can be:

  **Standard join types:**

  * `always_left` - Generates `LEFT JOIN`
  * `inner` - Generates `INNER JOIN`
  * `full_outer` - Generates `FULL JOIN`
  * `cross` - Generates `CROSS JOIN`

  **Directional join types:**

  * `right_left` - Generates a `RIGHT JOIN` when used in the `FROM/TO` direction, and a `LEFT JOIN` when used in the opposite direction
  * `left_right` - Generates a `LEFT JOIN` when used in the `FROM/TO` direction, and a `RIGHT JOIN` when used in the opposite direction
</ParamField>

## Examples

```yaml title="Create LEFT JOIN with always_left" highlight={4} theme={null}
- join_from_view: buyers
  join_to_view: user_facts
  join_to_view_as: buyer_facts
  join_type: always_left
  on_sql: ${buyers.id} = ${buyer_facts.id}
  relationship_type: one_to_one
```

```yaml title="Create LEFT JOIN with left_right type" highlight={4} theme={null}
- join_from_view: buyers
  join_to_view: user_facts
  join_to_view_as: buyer_facts
  join_type: left_right
  on_sql: ${buyers.id} = ${buyer_facts.id}
  relationship_type: one_to_one
```

```yaml title="Create RIGHT JOIN with right_left type" highlight={4} theme={null}
- join_from_view: buyers
  join_to_view: user_facts
  join_to_view_as: buyer_facts
  join_type: right_left
  on_sql: ${buyers.id} = ${buyer_facts.id}
  relationship_type: one_to_one
```
