Semantic Model Setup
Building a robust analytics layer starts with a clear, reusable semantic model. This guide shows how to turn raw synced tables into business-ready entities, link them together, and expose trusted metrics.
Key concepts
| Term | Definition |
|---|---|
| Entity | A logical representation of a table or dataset. Contains dimensions, measures, and relations. |
| Dimension | A descriptive attribute — date, company name, status, etc. |
| Measure | A numeric metric, usually aggregated — sales amount, deal count, … |
| Relation | A logical link between two entities. Always declared in both directions. |
| Semantic model | A connected set of entities forming a domain graph. |
Only users with the Admin role can manage the semantic model.
Interface overview
Here is a quick tour of the modeling workspace.

Opening the semantic model
Click the Semantic Model icon (two connected circles) in the sidebar to open the modeling area from anywhere in the app.
Cubes tab
Lists all cubes deployed to your organization. Click any row to open the read-only cube definition.

Graph tab
An interactive map of all cubes and their relations.

Managing cubes
Cubes are authored and deployed with the RevOS CLI. See the RevOS CLI docs.
Relation types and when to use them
| Type | Quick description | Example | How to set |
|---|---|---|---|
one_to_one | Each A has exactly one B | Company ↔️ Company profile | "relationship": "one_to_one" |
one_to_many | One A owns many B | Company → Invoices | "one_to_many" |
many_to_one | Many A refer to one B | Invoice → Company | "many_to_one" |
Declare each relation in both entities. If deals have many_to_one to companies, companies must have the mirror one_to_many to deals. Otherwise RevOS can't find a path between them.
Modeling many-to-many
A direct many_to_many relation is not supported. Instead, create a junction entity — a link table with pairs of keys. Both original entities connect to it with one-to-many / many-to-one relations, which keeps the source tables clean and avoids duplicates.
Example (HubSpot deals ↔️ companies):
- Create the entity
company_deal_linkbased on the companies table. - In SQL, unnest the
deal_idsJSON array:UNNEST(deal_ids) AS deal_id. - Relations:
companies↔️company_deal_link—one_to_many/many_to_one.deals↔️company_deal_link—one_to_many/many_to_one.
Dimensions and measures
For the full reference on defining dimensions, measures, and their types, see the RevOS CLI docs.