dbt Cloud logodbt Cloud integration

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

Paste an Environment ID and a read-only service token.

Governed in dbt Cloud. Explained in KPI Tree. One token, the whole loop.

The dbt Semantic Layer is where a metric stops being a matter of opinion: one definition, compiled by MetricFlow, served to every tool through one API. KPI Tree is one of those tools. It lists your metrics with their dimensions, grains and aggregation through the Semantic Layer API and asks dbt Cloud to compile the SQL, so the number here is the number dbt gives everyone else. Link the warehouse your project builds into and that compiled SQL runs there instead, which keeps your Queried Metrics usage down.

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 compiled, nothing re-declared

Names, labels, descriptions, dimensions, queryable grains and measures come across through the Semantic Layer API. 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 compiled query at day grain, through dbt Cloud or on your own warehouse. Comparisons, rollups, breakdowns and the nightly causality sweep run in KPI Tree’s engine, so neither 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

Link a warehouse, 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, so you see which region moved and who owns it. 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

Press Sync, or call the API, and the catalogue is compared with the last run: created, updated, retired and skipped, with the reason for every skipped dimension. Ownership, trees and action history stay where they were.

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

Connected in three steps. A token, an environment, a sync.

A dbt Cloud connection holds a read-only service token and reads your dbt Semantic Layer catalogue live. Nothing is uploaded to start, and nothing is written back.

Create a read-only service token

In dbt Cloud, create a service token with the Semantic Layer Only and Metadata Only permission sets. Both are read-only. Note the Environment ID of the environment your Semantic Layer is configured on, and the host if you are not on the default multi-tenant endpoint.
  • Semantic Layer Only and Metadata Only, nothing broader
  • Any host: the default endpoint, the EMEA or AU region, or a single-tenant instance
  • The token is encrypted at rest and never leaves the connection

dbt Cloud Semantic Layer

Connected
Environment ID218 407
Service tokendbtc_••••••••••••
Hostsemantic-layer.cloud.getdbt.com
Direct executionoptionalSnowflake · analytics_prod
Semantic Layer OnlyMetadata OnlyRead-only

Never writes to your project, jobs or environments.

Sync the catalogue

Save the connection and press Sync. KPI Tree lists every metric in the environment with its dimensions and grains, reads the aggregation from each definition, and reports what it created, updated, retired and skipped. Choose which metrics and dimensions to keep on the Metrics tab and sync again whenever your project changes.
  • Runs as a background job, so large catalogues complete reliably
  • Selective sync: pick metrics and dimensions one at a time
  • Re-run from the connection page, or from your own pipeline through the API

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

Optionally, run the SQL on your own warehouse

Link the Snowflake, BigQuery, Databricks, Redshift or PostgreSQL connection your project builds into and KPI Tree runs the SQL dbt Cloud compiles directly there. Definitions still come from the Semantic Layer on every sync. Only the data path moves, and dimension breakdowns become available.
  • Cuts dbt Cloud Queried Metrics usage
  • Required for dimension metrics
  • Governance unchanged: dbt still owns the definition

dbt Cloud Semantic Layer

Connected
Direct executionanalytics_prod · marts
DefinitionsSemantic Layer API · env 218 407
Last syncSync button · 06:14 · 42 metrics
Queries run on
SnowflakeBigQueryDatabricksRedshiftPostgreSQL

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

The Semantic Layer API carries everything KPI Tree needs to query a metric. The optional artifacts from your job 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. With a linked warehouse, KPI Tree probes their distinct values 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.

Bring the artifacts too. The context behind every number.

Post the target directory from your dbt Cloud job to the same connection 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

Read live through the API on every sync. Include it in the ZIP to keep the artifacts in step.

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 are posted from your job through the upload endpoint, up to 50 MB each. KPI Tree does not fetch them from dbt Cloud on its own, so add the upload as the last step of the job that builds them.

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

A dbt Cloud team usually already has an agent on the Semantic Layer API or the dbt MCP server, 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

Part of the dbt Semantic Layer integration. One connection for dbt Cloud, one for dbt Core, the same layer above.

The hub page covers what the dbt Semantic Layer is, what KPI Tree adds above it, the benchmark and the security posture. The dbt Core page covers the manifest path with no dbt Cloud account.

Common questions

Which dbt plans support this integration?

Any dbt platform plan that includes the Semantic Layer API: Starter, Enterprise and Enterprise+. The Developer plan does not expose the API. If you run dbt Core without dbt Cloud, use the dbt Core integration, which needs no dbt Cloud account at all.

What permissions does the service token need?

The Semantic Layer Only and Metadata Only permission sets, both of which are read-only. Create the token in dbt Cloud under account settings, note the Environment ID of the environment your Semantic Layer is configured on, and paste both into the connection wizard. The token is encrypted at rest and never leaves the connection.

Does it work with regional or single-tenant dbt Cloud instances?

Yes. The host is a field in the wizard. It defaults to the multi-tenant endpoint and can be set to the EMEA or AU region, or to the semantic layer host of a single-tenant instance.

Do I have to redefine my metrics in KPI Tree?

No. KPI Tree reads your definitions through the Semantic Layer API and asks dbt Cloud to compile the SQL, so the number here is the number dbt gives every other tool. There is no second semantic layer to keep in sync. Your time goes into modelling how metrics drive each other and who owns them, not into re-entering definitions.

How does KPI Tree query the Semantic Layer, and what does it cost in dbt Cloud?

It uses the Semantic Layer GraphQL API to list metrics and to compile or run one query per metric at day grain, with results returned as Apache Arrow. dbt counts each compiled or run query as a queried metric. To keep that usage down, link a warehouse connection and KPI Tree runs the compiled SQL on your own infrastructure instead, while definitions still come from dbt Cloud on every sync.

How often does the catalogue sync?

On demand. Press Sync on the connection page after your project changes, or call the sync endpoint from the last step of the dbt Cloud job that builds your project so the catalogue refreshes with every deployment. Each sync runs as a background job, compares the catalogue with the previous run and reports what was created, updated, retired and skipped. Trees, ownership and action history are preserved.

What are dimension metrics, and why do they need a linked warehouse?

With dimension metrics on, KPI Tree probes the distinct values of each dimension you chose for a metric and creates a child metric per value, so Signups with a Plan dimension gains a node for each plan with its own owner and tracking. The probe runs on your warehouse, so a linked warehouse connection is required. The default limit is 15 values per dimension, adjustable between 2 and 200 at connection, dimension or metric level, and any dimension above its limit is skipped with the reason shown in the sync report.

How does KPI Tree decide whether to sum or take the last value across a week or a month?

It reads the aggregation from the definition first: sum, count, average, min and max map straight from the measure, a ratio or cumulative metric rolls up as its last value, and a non-additive dimension marks a stock that takes its first or last value. Where the definition leaves it open, the metric type and name decide, and the sync report says which rollups were declared and which were inferred. To settle it yourself, add meta.kpi_tree.aggregation to the metric or measure in your YAML and the derivation never overrides it.

Which metric types come across?

Simple, ratio, cumulative, derived and conversion metrics, as long as the metric is queryable at day grain. Metrics offered only at weekly or coarser grains are listed as skipped in the sync report rather than guessed at. Every other grain, from week to quarter, is computed by KPI Tree from the daily series.

Can I add dbt artifacts to a dbt Cloud connection?

Yes. Post manifest.json, catalog.json, run_results.json and sources.json from your job’s target directory to the connection’s upload endpoint, ideally as the last step of the job that builds them. They add model lineage and data model exploration, warehouse column types, build history with each metric’s refresh cadence, and source freshness on the metric itself. KPI Tree does not fetch artifacts from dbt Cloud on its own.

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 an export table can be tracked as a SQL metric on the warehouse connection. dbt tests and exposures are not read, and lineage from an uploaded manifest is kept at model level.

Does it work with the dbt Fusion engine?

KPI Tree only talks to the Semantic Layer API, so the engine behind your environment does not change the connection. Metrics defined under the modernised YAML spec that Fusion and dbt Core 1.12 use are read the same way as metrics defined under the earlier spec.

Does KPI Tree write to my dbt project?

No. The service token carries the Semantic Layer Only and Metadata Only permission sets and nothing broader. Nothing is written back to the project, no jobs are triggered and no models or environments are touched.

Is this the dbt metrics layer?

The dbt Semantic Layer is the successor to the dbt metrics layer. It keeps the idea of metrics defined once in YAML and adds semantic models, entities and MetricFlow, which compiles the SQL. KPI Tree reads it through the Semantic Layer API, so it works with the current spec rather than the retired metrics package.

Can I combine several dbt environments or projects on one tree?

Yes. Each environment is its own connection, and metrics from several of them sit on the same tree with their own calculation sources. The tree carries the drivers, owners, targets and actions across them.

Can dbt metrics share a tree with metrics from other sources?

Yes. Metrics from several dbt environments, from Snowflake Semantic Views or Databricks Unity Catalog, from SQL on a warehouse connection and from spreadsheets all sit on the same tree. Each keeps its own calculation source while the tree carries the drivers, owners, targets and actions across them.

Should I use this or the dbt Core integration?

Use this one if you have a dbt platform plan with the Semantic Layer and want the catalogue read live with no uploads. Use the dbt Core integration if you run dbt Core without dbt Cloud, or if you want every query to run on your own warehouse with no dbt Cloud usage at all.

You governed the definition. Now govern the decision.

Connect your dbt Cloud 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