Skip to main content
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

join_type: <type>

Properties

join_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

Examples

Create LEFT JOIN with always_left
- 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
Create LEFT JOIN with left_right type
- 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
Create RIGHT JOIN with right_left type
- 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