← Back to the journal

DataFocus · Journal

Business Ontology vs dbt Semantic Layer: How Each Defines Metrics

The dbt Semantic Layer defines metrics as code and compiles them to SQL. A business ontology such as DataFocus OT keeps metric definitions next to rules, actions, permissions and approvals. Here is where each fits.

The dbt Semantic Layer and a business ontology both aim to give every consumer the same number for the same metric, but they define different amounts of the business. dbt defines metrics as code on top of dbt models: semantic models, entities, dimensions and measures that MetricFlow compiles into SQL. A business ontology such as DataFocus OT defines the metric together with the objects it describes, the policy documents and rules that govern it, the actions people can take on it, and who may see or change it, with changes going through approval. If your need is a code-first metrics pipeline owned by the data team, dbt is the closer fit; if metric definitions must sit alongside rules, permissions and human-approved actions for people and AI agents, an ontology covers more of that ground.

What does the dbt Semantic Layer document (as of November 2026)?

Everything in this section comes from dbt Labs' own Developer Hub, as documented in November 2026.

  • Semantic models. dbt's semantic models page describes them as "nodes connected by entities in a semantic graph", configured through metadata annotations on dbt models. Dimensions are the group-by parameters for metrics.
  • Metrics. The metrics overview lists five metric types: simple, ratio, cumulative, derived and conversion. A derived metric can compute, for example, gross profit as revenue minus cost.
  • MetricFlow. About MetricFlow calls it "a SQL query generation tool"; it uses entity types to navigate joins and avoid fan-out and chasm joins, and it is distributed under Apache 2.0.
  • Consistency. The dbt Semantic Layer page states that moving metric definitions out of the BI layer into the modeling layer lets business units work from the same definitions, and that "if a metric definition changes in dbt, it's refreshed everywhere it's invoked."
  • Access. The Semantic Layer APIs overview lists a GraphQL API, a JDBC API and a Python SDK. The Semantic Layer page also says AI tools can connect through the dbt MCP server, and that defining and querying metrics requires a dbt Starter or Enterprise-tier account.

In short, dbt's scope is the metric: how to calculate it, which dimensions slice it, and how to generate correct SQL for it.

What does a business ontology add beyond metrics?

DataFocus's product brief describes an ontology as a model of one business area with five parts: objects and relationships, rules and knowledge, indicators, actions, and permissions. Its built-in purchase-approval ontology is the worked example.

PartWhat it holds (per DataFocus's brief)Rough dbt counterpart
Objects and relationshipsTables from different systems organized under the ontology, with what each relationship means, shown in an ontology graphSemantic models and entities
Rules and knowledgeA document center with policies, rules and metric definitions, linked to the data they governMetric YAML and descriptions; policy documents live elsewhere
IndicatorsMetrics pushed to the right people on a scheduleMetrics; scheduled delivery is not described in the Semantic Layer pages cited here
ActionsExecutions (scripts that calculate, check and write back) and business actions on control panelsNot in scope of the Semantic Layer
PermissionsExisting users, roles and resource permissions; agents granted access one ontology at a timedbt platform account and warehouse permissions

Two mechanisms matter for metric definitions specifically.

Definitions live next to their policies. In the purchase-approval example, the document center holds compliance rules, SLA and bottleneck rules, event-log definitions, and the procedure for writing back and auditing tasks. A metric such as "approvals breaching SLA" is stored alongside the SLA rule document it depends on, not only as a formula.

Meaning can stay unconfirmed. DataFocus states that each field has a source and each definition an owner, and that uncertain relationships remain unconfirmed. In its homepage demo (simulated data), agents do not treat two similar customer names in CRM, ERP and contracts as one company until the identifier mapping is confirmed. A semantic layer join, by contrast, is whatever the entity keys say.

Where do definitions live, and who owns them?

This is the sharpest practical difference.

In dbt, metric definitions are YAML in a dbt project, reviewed and deployed like the rest of the code. The data team owns them, and a change propagates everywhere once deployed. For engineers this is a strength: diffs, pull requests, CI and version history come for free from Git.

The illustrative snippet below shows the shape of a dbt metric definition; it follows the structure on dbt's metrics overview page but was not run for this post.

# illustrative, not run
metrics:
  - name: gross_profit
    type: derived
    type_params:
      expr: revenue - cost
      metrics:
        - name: revenue
        - name: cost

In DataFocus OT, definitions are owned by business owners inside the product. DataFocus documents a change flow of draft, diff, validation, approval, commit and read-back; approval applies to a specific plan and base version, and must be confirmed again if either changes. When AI wants to change something it can only submit a draft that takes effect after a person approves it. DataFocus also states that business-effective time is kept distinct from approval time and that unapproved rules cannot become active knowledge. In its homepage demo (simulated data), a support policy moves from a 24-hour to a 4-hour response time; agents keep answering under v1 until the owner approves v2, and answers given under v1 stay on record.

So both approaches version definitions. dbt versions them as code reviewed by engineers; the ontology versions them as business records approved by an owner, with the effective date as part of the definition.

How do AI agents get at the definitions?

Both now offer an MCP route, which makes the comparison more about what the agent can do once connected.

dbt Semantic Layer (as documented on November 2026)DataFocus OT
Query interfacesGraphQL API, JDBC API, Python SDK; dbt MCP server for AI toolsStandard MCP server (Streamable HTTP) with OAuth
What agents readGoverned metrics and dimensionsOntologies, resources and the graph; read-only queries within an ontology
Evidence per answerGenerated SQL via MetricFlowDataFocus states every query returns the SQL that ran, the tables used and a data fingerprint
WritesNot documented as part of the Semantic LayerDrafts for control panels and other changes, applied after human approval
Scopedbt platform account permissionsAgent gets only what the authorizing user may see; out-of-scope requests do not reveal whether data exists
Hostingdbt platform (Starter or Enterprise tier)Self-hosted on your own servers; no public MCP endpoint

On the DataFocus side, MCP access is available in both OT Flash and OT Heavy. DataFocus also says a definition set once is used by search analysis, dashboards, control panels, the ontology agent and external agents, which all get the same figures, which is the same consistency goal dbt states for BI tools.

When should you pick dbt, an ontology, or both?

Pick the dbt Semantic Layer when:

  • Your metrics are owned by a data team that already works in dbt, Git and CI.
  • The consumers are BI tools and applications that need metrics and dimensions through GraphQL, JDBC or Python.
  • You want a managed service and MetricFlow's join handling, and you do not need write-back or approval workflows in the same layer.

In that situation dbt is the better fit: it is code-first, the definitions sit next to the transformations that produce the data, and the MetricFlow engine is open source.

Pick a business ontology when:

  • Metric definitions depend on policy documents and rules that business owners, not engineers, maintain.
  • Agents need to act (create a corrective task, request evidence, close a deviation) as well as read, with a person approving changes.
  • You need permissions per user and per ontology, and answers that trace to the SQL that ran and the definition version in force.
  • You must self-host. DataFocus OT runs on your own servers with an administrator-configured model service.

Consider both when the data team already maintains dbt models and the business needs governed rules and actions on top. Nothing in DataFocus's public material describes a dbt integration, so treat that as a design you would build and verify yourself: for example, OT reading dbt-built tables in your warehouse through its external data source connections. That combination is a hypothetical arrangement, not a documented one.

Trade-offs to check before choosing an ontology

  • Edition fit. OT Flash runs on a single Apache Doris engine that is both compute and warehouse; OT Heavy builds on Hadoop, Hive, Trino and Iceberg and suits enterprises with an existing big-data platform. Choose by where your data already sits.
  • Ownership cost. Self-hosting means you pay for servers, model calls and operations, and business owners have to take on approving definitions.
  • Code-first habits. Teams that want every definition change in a pull request will find dbt's workflow more familiar.

Next step

Read DataFocus's OT product brief for the five ontology parts and the edition table, and the permissions documentation for the draft-to-approval change flow. Both editions are free: download them from datafocus.ai/download or the OT Flash and OT Heavy GitHub repositories, where the release notes list system requirements and supported platforms. On the dbt side, start with the dbt Semantic Layer overview.