Skip to main content
This parameter ensures that joins that fan out the result set (i.e., many orders for a single user) do not impact counts or sums. Properly defining the relationship type is crucial for accurate metric calculations.

Syntax

Properties

relationship_type
string
required
The cardinality of the relationship between the joined tables. Can be:
  • one_to_one - Each row in the source view matches exactly one row in the joined view
  • many_to_one - Multiple rows in the source view can match one row in the joined view
  • one_to_many - One row in the source view can match multiple rows in the joined view
  • many_to_many - Multiple rows in the source view can match multiple rows in the joined view
  • assumed_many_to_one - Omni-generated. This is a default join generated by Omni based on naming convention. For example, an orders table with a user_id and a users table with an id or user_id. These joins are intended to accelerate the initial exploration of a data source and can therefore be modified or deleted. To accept the joins as canonical to the model, remove the assumed_ prefix from the relationship type.

Examples

One-to-one relationship between buyers and buyer_facts
Omni-generated assumed_many_to_one