Relationships
Relationships are the links between different entities in a ontology. They enable data from one entity to be effectively used in conjunction with data from another, creating a network of interconnected data points. These relationships reflect real-world associations between the various concepts and processes of your business.
Getting started
To create or edit relationship, navigate to the ontology page and choose the desired entity. Now, on the right panel switch the toggle to "Relationships". Then, click on the desired relationship to edit it or use the +
button to create new ones. Creating or editing a relationship requires the following inputs:

-
Name - The unique and descriptive name of the relationship.
-
Referenced entity - The entity that this relationship connects to.
-
Type - The relationship type, either 1:many or many:1.
-
Description (optional) - A description of the relationship.
-
Join keys - The logic defining how entities are related, connecting a row of the entity to a row of the referenced entity.
How are relationships defined?
Relationships are defined by connecting two entities using Join keys, as described in the following steps:
-
First, select the Referenced entity that this relationship connects to.
-
Then, choose the Relationship type, either 1:many (e.g. the entity "Account" can be associated with many "Opportunities") or many:1 (e.g. the entity "Account" can have only one owner).
-
Finally, map the Join keys (dimensions) that connect the entities. These are also known as primary and foreign keys. Briefly, primary keys are the entity's unique identifier field while foreign keys are the primary keys of other related entities.
As an example, the image above demonstrates the many:1 relationship from the "Opportunity" entity to the "Account" entity. The primary key (unique identifier) of the "Account" entity is $account.src__id
(the account prefix denotes that it's on the referenced entity). The foreign key of the "Opportunity" entity which points the "Account" - is $src__account_id
.
You can read more about defining relationships in the relationships documentation.
Advanced mode
For users comfortable with technical syntax, the Advanced mode allows you to create and edit relationships directly in SQL using our Semantic Layer syntax. Toggle the "Advanced" option to enable this feature. This mode is beneficial for those who prefer working in a pure SQL environment and provides additional flexibility.
For more information on editing relationships using SQL, check out the relationships documentation.