Databricks logoDatabricks integration

Your Databricks lakehouse holds the numbers. KPI Tree explains the movement, names the owner and proves the fix.

Connect a Databricks SQL warehouse with a personal access token or a service principal.

Governed in Unity Catalog. Explained in KPI Tree. One SQL warehouse, two ways in.

A Databricks connection is a SQL warehouse endpoint and a principal that can only read. On it, a metric can be written as SQL against any table Unity Catalog lets that principal see, or synced from a Unity Catalog metric view so that Databricks computes the measure with MEASURE(). Either way KPI Tree treats the lakehouse as the source of truth: one aggregation query per metric at day grain, returned as Arrow, with every comparison, rollup and driver test computed in memory rather than as another warehouse query. dbt metrics that build into Databricks run on the same connection.

What your lakehouse 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 lakehouse 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.

Two ways to define a metric, one read-only principal

Write the SQL yourself against your Unity Catalog tables, or sync a metric view and let Databricks compute each measure. Both end in the same tracked metric with the same owner and the same nightly driver tests.

Sync a Unity Catalog metric view

Create Dimension Metrics · on
Unity Catalog metricmain.sales.sales_mv

DESCRIBE TABLE EXTENDED main.sales.sales_mv AS JSON

MEASURErevenueSUM(order_total)sum
MEASUREordersCOUNT(1)sum
MEASUREactive_customersCOUNT(DISTINCT customer_id)last
DIMENSIONregionSTRING
DIMENSIONorder_dateDATEday grain

Databricks computes every value. Rollup inferred from each expression.

One query per metric, everything else in memory

Each metric is one aggregation query at day grain, returned as Apache Arrow and cached for a TTL you set. Comparisons, rollups, breakdowns and the nightly correlation and causality sweep run in KPI Tree’s own engine, so the warehouse only works during a sync.

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

Sync a metric view with Create Dimension Metrics on 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, within a cardinality limit you control.

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.

Unity Catalog decides what we can read, and nothing else

Every query runs under your principal through the SQL warehouse, so Unity Catalog grants, row filters and column masks apply as written. A personal access token or an OAuth service principal, read access only, credentials encrypted at rest.

Databricks SQL warehouse

Connected · SELECT 1 ok
Server hostnamedbc-a1b2c3.cloud.databricks.com
HTTP path/sql/1.0/warehouses/9f2c…
Catalog · schemamain · sales
AuthService principal · OAuth M2M
Unity Catalog permissions applyRead-onlyServerless cold start retried

Connected in three steps. A hostname, an HTTP path, a principal that can read.

No agent to install and no data to export. The connection runs a live SELECT 1 and is only saved once it authenticates and reaches your tables. Databricks connections are switched on per workspace, so ask us to enable it for yours.

Choose an authentication method

Use a personal access token with read access to the schemas you want to track, or a service principal through OAuth machine-to-machine with a client ID and secret. The service principal path suits workspaces that disallow personal tokens: the Databricks SDK mints and refreshes the token for each pooled connection.
  • Personal access token or OAuth M2M service principal
  • Read access only, no write and no admin scope
  • Credentials encrypted at rest, never logged

Databricks SQL warehouse

Connected · SELECT 1 ok
Server hostnamedbc-a1b2c3.cloud.databricks.com
HTTP path/sql/1.0/warehouses/9f2c…
Catalog · schemamain · sales
AuthService principal · OAuth M2M
Unity Catalog permissions applyRead-onlyServerless cold start retried

Point it at a SQL warehouse

Enter the workspace hostname, the HTTP path of the SQL warehouse, and optionally a default catalog and schema. KPI Tree opens the connection, runs a SELECT 1 and saves it only when the query returns. A serverless warehouse that is still waking up is retried, not failed.
  • Serverless, pro or classic SQL warehouses
  • Cold starts retried automatically
  • Results returned as Arrow and cached for a TTL you set
discover.sqlrun on sync

SELECT 1;

-- Metric views the principal can see

SELECT table_catalog, table_schema, table_name

FROM main.information_schema.tables

WHERE table_type IN ('VIEW', 'METRIC_VIEW');

-- Measures, dimensions and comments, as JSON

DESCRIBE TABLE EXTENDED main.sales.sales_mv AS JSON;

DESCRIBE … AS JSON needs a Databricks SQL warehouse or Runtime 16.2 or later.

Write SQL or sync a metric view

Write SQL against any table the principal can read, one query per metric at day grain. Or pick a Unity Catalog metric view from the list, choose its measures and dimensions, and let Databricks compute each one with MEASURE(). The Unity Catalog page has the detail.
  • SQL metrics against your Unity Catalog tables
  • Metric view sync with native MEASURE() queries
  • Dimension metrics created automatically for the dimensions you choose

Sync a Unity Catalog metric view

Create Dimension Metrics · on
Unity Catalog metricmain.sales.sales_mv

DESCRIBE TABLE EXTENDED main.sales.sales_mv AS JSON

MEASURErevenueSUM(order_total)sum
MEASUREordersCOUNT(1)sum
MEASUREactive_customersCOUNT(DISTINCT customer_id)last
DIMENSIONregionSTRING
DIMENSIONorder_dateDATEday grain

Databricks computes every value. Rollup inferred from each expression.

SQL metrics, or a Unity Catalog metric view. Same connection, same layer above. Start where your definitions live.

Both paths run on the same read-only principal and produce the same trees and ownership. The difference is who owns the definition: you, in a query, or Unity Catalog, in a metric view.

SQL metrics

This page

Metrics you write against any table or view the principal can read.

Definition
A SQL query per metric
Runs
On your SQL warehouse, one query per metric at day grain
Rollups
Chosen per metric in KPI Tree
Needs
A SQL warehouse and a principal with SELECT

Unity Catalog metric views

Governed measures synced from a metric view, computed by Databricks with MEASURE().

Definition
The metric view, read with DESCRIBE TABLE EXTENDED AS JSON
Runs
On your SQL warehouse, one MEASURE() query per measure
Rollups
Inferred from each expression, adjustable
Needs
A SQL warehouse or Runtime 16.2 or later

What a Databricks metric is. One query at day grain, however it was defined.

Every metric on a Databricks connection resolves to a single aggregation query that returns a daily series. KPI Tree keeps that series, never the rows behind it, and computes everything else itself.

SQL metrics your query, your tables

Any SELECT the principal can run, returning a date and a value. Results come back as Arrow and are cached for a TTL you set on the connection. Weekly, monthly and quarterly rollups are computed by KPI Tree, with the rollup method you choose.

Metric view sync Databricks computes every measure

Pick a Unity Catalog metric view and every measure becomes a tracked metric queried with MEASURE(), so the number here is the number Databricks gives every other consumer. Measure comments come across as descriptions. Dimension metrics are created for the dimensions you choose.

Governance Unity Catalog, as written

Grants, row filters and column masks apply to every query because it runs as your principal through the SQL warehouse. No parallel permission model, no raw rows copied out, and the connection is enabled per workspace so it is never on by accident.
The layer above

Unity Catalog 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 Agentic 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 lakehouse, once on Canopy above it.

You already point an agent at your SQL warehouse, or ask a Genie Agent over a metric view, 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. It ran on Snowflake; the Cortex Analyst arm is the closest stand-in for Genie on a metric view.

The semantic layer alone

A correct number, and a dead end.

An agent on the SQL warehouse writes SQL from scratch every time. A Genie Agent over a metric view gets the definition right. Neither 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 connection details do I need?

The workspace hostname, the HTTP path of a SQL warehouse, a personal access token or a service principal’s client ID and secret, and optionally a default catalog and schema. The connection is tested with a live SELECT 1 before it is saved.

What authentication is supported?

A personal access token, or a service principal through OAuth machine-to-machine with a client ID and secret. The service principal path suits workspaces that disallow personal tokens, and the Databricks SDK mints and refreshes the token for each pooled connection. Browser-based user OAuth is not used.

Can KPI Tree sync Unity Catalog metric views?

Yes. Pick a metric view and every measure becomes a tracked metric queried with MEASURE(), so Databricks computes each value. Discovery reads DESCRIBE TABLE EXTENDED AS JSON, which needs a SQL warehouse or Runtime 16.2 or later. The Unity Catalog page covers the sync in detail.

Is the Databricks connector generally available?

It is enabled per workspace rather than on for every account by default. Ask us and we will switch it on for yours.

Does KPI Tree respect Unity Catalog governance?

Yes. Every query runs under your principal through the SQL warehouse, so grants, row filters and column masks are enforced by Databricks. There is no parallel permission model.

How does KPI Tree affect Databricks costs?

One aggregation query per metric on your schedule, returned as Arrow and cached for a TTL you set. Every comparison, rollup, correlation and drill-down runs in KPI Tree’s own engine, so the warehouse only works during a sync and its own auto-stop setting keeps it idle between them.

Which SQL warehouse should I use, and does serverless work?

Any SQL warehouse, serverless, pro or classic. A small one handles hundreds of metrics because each is one lightweight query. A serverless warehouse that is still waking up is retried rather than failed.

Does KPI Tree work with dbt on Databricks?

Yes. Connect dbt Core or dbt Cloud through the dbt Semantic Layer integration and link this Databricks connection as the execution warehouse. Definitions stay in dbt and the SQL runs here.

Does KPI Tree use Genie or the Databricks MCP servers?

Not at present. KPI Tree reads Databricks through SQL under your principal and syncs Unity Catalog metric views natively. Genie One, Genie Agents, AI/BI dashboards, Unity Catalog lineage and the Databricks MCP servers are not read.

Does KPI Tree copy data out of Databricks?

No. Each metric’s daily series is fetched, computed on in KPI Tree’s encrypted in-memory engine and cached only briefly. Raw rows are never persisted outside your workspace.

You built the lakehouse. Now build the layer above it.

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

The guide

Semantic layer vs business context layer: what a definition settles, and what it cannot.

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