dbt Semantic Layer logodbt Semantic Layer integration

Your dbt Semantic Layer defines the metric. KPI Tree explains the movement, names the owner and proves the fix.

Connect the dbt Semantic Layer from dbt Core or dbt Cloud. KPI Tree imports every governed metric exactly as MetricFlow defines it, creates a child metric for every dimension value you care about, and never re-implements a calculation.

What the dbt Semantic Layer is, and where it stops.

A definition first, because the integration only makes sense against it.

The dbt Semantic Layer is a governed set of metric definitions, written as version-controlled YAML in your dbt project and compiled by MetricFlow, that tells every downstream tool exactly how each metric is calculated: which semantic model it comes from, which measure it aggregates, and over which dimensions and time grains it can be queried. It replaced the earlier dbt metrics layer, and dbt Cloud serves it through the Semantic Layer API, while a dbt Core project produces the same definitions as a semantic manifest.

It is the cleanest answer a business can have to "what is Revenue?". It is not designed to answer why Revenue fell, who owns the driver, or whether the fix worked. Those questions live in a layer above the semantic layer, and that is the layer this integration adds. The definitions stay in dbt. The causal tree, the owners and the verified outcomes live in KPI Tree, and Canopy hands all of it to your people and your agents.

Governed in dbt. Explained in KPI Tree. One semantic layer, the whole loop.

KPI Tree is a first-class consumer of the dbt Semantic Layer. From dbt Core it reads semantic_manifest.json and renders the SQL with an in-process MetricFlow engine. From dbt Cloud it reads the catalogue through the Semantic Layer API. Either way the SQL runs on the warehouse your models build into, with your definitions as the source of truth. Nothing is re-declared, re-mapped or copied into a second semantic layer.

What the dbt Semantic Layer does not know is why Revenue fell, who owns Conversion, or whether Monday's release moved it. That is the layer KPI Tree adds: a causal metric tree re-tested every night, RACI ownership on every node, action plans measured against a forecast, and Canopy, the business context layer that hands all of it to your people and to the agents they already use over MCP. Your dbt project stays the single source of truth for how a metric is calculated. KPI Tree becomes the source of truth for what to do about it.

Every definition, as defined, nothing re-declared

Metrics, dimensions, entities, measures, labels and descriptions come across from the dbt Semantic Layer intact. Sum, average, first and last are read from each definition, so weekly and monthly rollups behave the way your YAML says.

Choose metrics to sync

4 of 5 selected

Revenue

dimensions: region, channel

sum

Orders

dimensions: region, channel, plan

count

Average order value

dimensions: region

ratio

Active customers

dimensions: plan

count distinct

Cumulative bookings

dimensions: none

cumulative

Aggregation read from each definition. Nothing re-declared.

One query per metric, everything else in memory

Each metric is one query at day grain, on your warehouse or through dbt Cloud. Comparisons, rollups, breakdowns and the nightly correlation and causality sweep run in KPI Tree’s own engine, so no bill grows with the tree.

Warehouse queries · last sync

4 total
Revenue1 query · 1.8s · 412 rows
Orders1 query · 1.2s · 412 rows
Average order value1 query · 1.6s · 412 rows
Active customers1 query · 2.3s · 412 rows

0 warehouse queries for

period comparisons, weekly and monthly rollups, dimension breakdowns, nightly correlation and causality tests. All computed in memory from those four results.

Dimension metrics, created automatically

Switch on Create Dimension Metrics and every dimension you chose becomes a child metric per value: Revenue (Region: EMEA), Revenue (Region: APAC), and so on. Each child gets its own owner, baseline and nightly driver tests. No YAML changes.

Revenue

Create Dimension Metrics · on

dimensions: region, channel · 5 child metrics created

Revenue (Region: EMEA)£612k4%
Revenue (Region: APAC)£318k21%
Revenue (Region: UK)£350k2%
Revenue (Channel: Web)£880k1%
Revenue (Channel: App)£400k9%

Each child has its own owner, baseline and nightly driver tests. No YAML changes.

Re-sync as a diff, trees and owners untouched

Every sync is compared with the last. New metrics appear, changed ones update in place, removed ones retire with their history kept. Ownership, trees and action history stay exactly where you left them.

Sync summary

Completed 06:14

42

Found

3

Created

38

Updated

1

Archived

0

Skipped

Dimension metrics created118

customer__customer_id skipped: 48,211 values, above the 50 value limit

Trees, owners and action history preserved · gross_margin renamed in place

dbt Core or dbt Cloud. Same sync, same layer above. Start where your project lives.

Both connections to the dbt Semantic Layer produce the same metrics, the same trees and the same ownership. The difference is where the definitions come from and where the SQL runs.

dbt Core

Your project compiles the manifest. KPI Tree renders the SQL with an in-process MetricFlow engine and runs it on your warehouse.

Definitions
semantic_manifest.json, uploaded from CI or by hand
SQL
Rendered in-process, run on your linked warehouse
Sync
Automatic on every upload
Needs
A linked warehouse connection. No dbt Cloud account.

dbt Cloud

KPI Tree reads your catalogue through the Semantic Layer API and runs queries there, or on your own warehouse.

Definitions
Read live from the Semantic Layer API
SQL
Compiled by dbt Cloud, run there or on a linked warehouse
Sync
On demand from the connection page or the API
Needs
An Environment ID, a read-only service token and a host

What comes across from the dbt Semantic Layer. And what stays exactly where it is.

The semantic layer carries everything KPI Tree needs to query a metric. The optional dbt artifacts add the context that explains a change. Nothing is written back to your project.

Metrics simple, ratio, cumulative, derived, conversion

Every dbt Semantic Layer metric with a day-level time dimension, with its label, description, type and filters. Metrics defined only at coarser grains are reported as skipped rather than guessed at, and a conversion metric can carry a declared rollup so nothing is assumed.

Dimensions and entities child metrics created for you

Pick the dimensions that matter for each metric. KPI Tree probes their distinct values on your warehouse and creates a child metric per value automatically, within a cardinality limit you set by connection, by dimension or by metric. Entities come across too, so an assistant can follow the joins.

Aggregation and rollups read, inferred, or declared

Sum, count, average, min and max map straight from the measure. Stocks and flows are inferred from the metric type and any non-additive dimension, and you can pin the answer in your YAML with meta.kpi_tree.aggregation so the derivation never second-guesses it.

Five artifacts, one ZIP. The context behind every number.

Post the target directory from your build, dbt Core or dbt Cloud, and every metric gains its own lineage, column context, build history and freshness. An assistant can then check whether a movement is a business change or a stale source before anyone acts on it.

semantic_manifest.json

Metric definitions

optional

Required for a dbt Core connection, where it starts the sync. Read live through the API on dbt Cloud.

manifest.json

Model lineage

optional

Models, seeds and sources with their dependencies. Unlocks data model exploration in the app and over MCP.

catalog.json

Column context

optional

Every warehouse column with its real data type, merged over the descriptions you wrote.

run_results.json

Build history

optional

Last build status and timing on every model, and each metric’s refresh cadence worked out from your run history.

sources.json

Source freshness

optional

Freshness status and loaded-at times, so stale upstream data shows on the metric itself.

Artifacts arrive through the upload endpoint from your own pipeline, up to 50 MB each. Tests and exposures are not read, and lineage is kept at model level.

The layer above

The dbt Semantic Layer governs the calculation. KPI Tree adds causation, ownership and proof.

Above your governed definitions sits one causal model of the business, with the org chart, the recorded context and the outcome of every action attached. People read it as a tree. Agents read the same graph over MCP.

For humans

Answers, briefings and pushes

KPI Tree web appSlack@

Read and write over MCP

Anthropic: 21% → ~95% with curated context

ClaudeOpenAIGeminiCopilot

Canopy Agent Workflows the metrics start them, humans gate them

Canopy Agents four out of the box, any model, your keys

Canopy

The business context layer

Structural context The causal tree, the org chart

Temporal context What was true when, plan against actual

Behavioural context What people did, what worked

Operational context RACI, workflows, approvals

Strategic context Objectives, key results, initiatives

Map & Measure

Metric Trees

Business Models

Prove & Act

Root Cause

Ownership

Verified Impact

Strategy

Grounded in proven causality

Verified proof

Meta spend → Revenue, +£32k vs forecast, q < 0.01

Personalised Action Plans 31 experiments running

hypothesis → a real person’s plan → measure the change

Causation the test cascade

ADF p 0.02 → Granger p 0.003 → q < 0.05, 87 of 1,204 survive

Correlation

22,791 pairs tested nightly, NPS – Churn r 0.71

Data warehouses

The numbers

SnowflakeBigQueryDatabricksRedshiftAzure SQLPostgreSQLGoogle Sheets

Semantic layers

The definitions

dbtLookerSnowflake Semantic ViewsDatabricks Unity Catalog metricsOpen Semantic Interchange

Business apps

Launches, decisions, blockers

SlackNotionHubSpotSalesforceJiraLinearGitHubAsanaMicrosoft TeamsGoogle WorkspaceIntercom

Org structure

Directory-synced

David MitchellSarah ChenMei-Lin WongJames Harrington

Causal drivers, tested every night

Your dbt metrics become nodes on a tree. Every edge between them is re-tested nightly, from correlation through Granger causality with false-discovery control, so a driver carries a confidence level rather than a line someone drew.
causal · q < 0.05lag 3dq < 0.01Revenue-15%Conversion-23%Traffic+2%AOV-4%Checkout-31%PricingPaidOrganicBasket sizeDiscountsPayment errorsPage speed

RACI ownership, on every metric

Each metric gets Responsible, Accountable, Consulted and Informed assignments tied to real people in your directory. When it breaches its baseline the Accountable owner hears first, in Slack or by email, with escalation if nobody acts.

Conversion rate

Marketing · daily

R
A
C
+4
I

Verified impact, not self-reported

Actions are tracked against the metric they target and measured against a counterfactual forecast when the window closes. What held becomes a driver the model trusts. What did not is retracted.

Fix checkout flow

Verified · +£32k

Linked to Revenue · measured by the actuals pipeline

Pause underperforming ad sets

Measuring…

Ask an agent the same question twice. Once on the dbt Semantic Layer, once on Canopy above it.

You already point an agent at your warehouse, or at the dbt Semantic Layer itself, and it comes back with a governed number. The fair question is what Canopy adds. The pair below shows the shape of the difference, and the benchmark beneath it measures it on eight real business questions.

The semantic layer alone

A correct number, and a dead end.

Every consumer of the dbt Semantic Layer, dbt’s own MCP server included, gets the same governed figure. None of them gets the cause, the owner or the follow-up, so the question goes back to the data team.

Why is revenue down this month?
Revenue is £1.28m month to date, 15% below last month. The metric is defined as the sum of order_total where status is complete.
I do not have information about what caused the change or who is responsible. Would you like me to break it down by region?

Canopy on top of dbt

The driver, the owner, the build check and the next step.

Canopy reads the causal tree, the RACI, the build history from your dbt artifacts and the open tasks, so the first answer is the one people act on.

Why is revenue down this month?
Conversion rate is the driver, down 23%, Granger-causal at a three day lag. Traffic and order value are flat. The drop starts the day after Monday's checkout release.
The data is sound: fct_orders built at 06:12 and every source passed freshness. Sarah Chen is Accountable and a rollback task is already open. Shall I attach this analysis to it?
driver · q < 0.05owner · Sarah Chenbuild · freshtask · open

Common questions

What is the dbt Semantic Layer?

The dbt Semantic Layer is a governed set of metric definitions written as version-controlled YAML in a dbt project and compiled by MetricFlow. It tells every downstream tool how each metric is calculated, from which semantic model, over which dimensions and time grains. dbt Cloud serves it through the Semantic Layer API, and a dbt Core project produces the same definitions as a semantic manifest. It replaced the earlier dbt metrics layer.

How does KPI Tree connect to the dbt Semantic Layer?

Two ways. A dbt Core connection reads semantic_manifest.json from your target directory, renders each metric as MetricFlow SQL with an in-process engine and runs it on the warehouse your models build into, with no dbt Cloud account. A dbt Cloud connection reads your catalogue through the Semantic Layer API with a read-only service token and can run the compiled SQL through dbt Cloud or on a linked warehouse. Both produce the same metrics, trees and ownership.

Do I have to redefine my metrics in KPI Tree?

No. KPI Tree consumes your dbt definitions as an upstream source and never re-implements a calculation, so the number here is the number dbt gives every other tool. Your time goes into modelling how metrics drive each other and who owns them, not into re-entering definitions.

What comes across from the semantic layer?

Every metric queryable at day grain, with its label, description, type, filters, measures, dimensions and entities. Simple, ratio, cumulative, derived and conversion metrics are all read. The aggregation is taken from the definition, inferred from the metric type and any non-additive dimension where the definition leaves it open, or pinned with meta.kpi_tree.aggregation in your YAML.

What are dimension metrics?

For each metric you choose the dimensions that matter, and KPI Tree creates a child metric per distinct value automatically, so Revenue with a Region dimension gains Revenue (Region: EMEA), Revenue (Region: APAC) and so on, each with its own owner, baseline and nightly driver tests. The default limit is 15 values per dimension, adjustable between 2 and 200 at connection, dimension or metric level. On dbt Cloud the probe runs on a linked warehouse.

Can I combine several dbt projects, or dbt with other sources, on one tree?

Yes. Each dbt project or environment is its own connection, and metrics from several of them sit on the same tree alongside metrics from Snowflake Semantic Views, Databricks Unity Catalog, SQL on a warehouse connection and spreadsheets. Each metric keeps its own calculation source while the tree carries the drivers, owners, targets and actions across them.

What happens when my dbt project changes?

Each sync is compared with the previous one and the report lists what was created, updated, retired and skipped. New metrics appear, edited definitions update in place, and metrics removed from the project or deselected are retired rather than deleted, with their history kept. Trees, ownership and action history are preserved. dbt Core syncs automatically on every upload; dbt Cloud syncs from the connection page or the API.

What do the dbt artifacts add?

manifest.json brings model lineage and data model exploration in the app and over MCP. catalog.json adds every warehouse column with its real type. run_results.json records each model’s last build and works out how often each metric refreshes. sources.json adds source freshness on the metric itself. Post them from your build to the connection’s upload endpoint, from dbt Core or from a dbt Cloud job.

Are saved queries, exports, tests or exposures read?

Not at present. KPI Tree syncs the metrics themselves and you choose dimensions per metric, so saved queries are not imported. Exports land as tables in your warehouse and can be tracked as SQL metrics on the warehouse connection. dbt tests and exposures are not read, and lineage is kept at model level.

Does it work with the dbt Fusion engine and the modernised YAML spec?

Yes. A dbt Core connection reads both manifest shapes, the measures-based spec from dbt Core 1.6 to 1.11 and the modernised spec from 1.12 onwards where simple metrics replace measures. A dbt Cloud connection only talks to the Semantic Layer API, so the engine behind the environment does not change the connection.

How do AI agents use it?

Through Canopy, KPI Tree’s business context layer, over MCP. An assistant such as Claude, ChatGPT, Gemini or Copilot can analyse a dbt metric with its drivers, owners and recorded context, explore the data model behind it, see the last build and source freshness, and, with editor access, run read-only queries on the linked warehouse to test an explanation. The semantic layer tells the agent what the metric is. Canopy tells it why it moved and what to do.

Does KPI Tree write to my dbt project or my warehouse?

No. A dbt Core connection reads a manifest and runs SELECT statements with scoped, read-only credentials. A dbt Cloud connection carries the Semantic Layer Only and Metadata Only permission sets and nothing broader. Nothing is written back, no jobs are triggered and no models are touched.

Which dbt plans and versions are supported?

dbt Core 1.6 onwards for the manifest path, with no dbt Cloud account needed. For the API path, any dbt platform plan that includes the Semantic Layer API: Starter, Enterprise and Enterprise+. The Developer plan does not expose the API.

You governed the definition. Now govern the decision.

Connect your dbt Semantic Layer and see your own metrics as a causal tree with named owners and verified actions, in a demo on your data.

The guide

dbt semantic layer and metric trees: how the two layers fit together, and where each one stops.

Read the guide

Experience That Matters

Built by a team that's been in your shoes

Our team brings deep experience from leading Data, Growth and People teams at some of the fastest growing scaleups in Europe through to IPO and beyond. We've faced the same challenges you're facing now.

Checkout.com
Planet
UK Government
Travelex
BT
Sainsbury's
Goldman Sachs
Dojo
Redpin
Farfetch
Just Eat for Business