Home › Data engineering › Metric views › 2 · Three products
Data engineering · BI and analytics · free guide · 2 · Three products
One idea, three products: metric views, dbt, Power BI
Three products, three homes. A metric view lives in the Databricks catalog. A dbt semantic model lives in your dbt project and compiles to SQL for whatever warehouse dbt runs on. A Power BI semantic model lives in Power BI or Fabric and runs on Power BI's own engine. All three build the same ten parts.
Same idea, three places to keep it.
Side by side
How each product builds the ten parts
| Part | Unity Catalog metric view | dbt Semantic Layer (MetricFlow) | Power BI semantic model |
|---|---|---|---|
| 1 Grain | source: one table, view or SQL query per metric view | each dbt model with a semantic_model block; primary entity | each table in the model; relationships set the direction |
| 2 Relationships | joins: under the metric view (star, nested snowflake, one_to_many, rely); relationships between metric views (Beta) | entities (primary, foreign, unique, natural); MetricFlow finds join paths at query time | relationships drawn in the model, with cardinality and filter direction |
| 3 Dimensions | fields: SQL expressions; time grains as separate fields | dimensions: categorical and time, with granularity; time spine | columns, hierarchies, a marked date table |
| 4 Measures | measures: any SQL aggregate | simple metrics with agg (sum, count, average, median ...) | DAX measures (SUM, COUNTROWS ...) |
| 5 Metrics | composed with MEASURE(other); window measures (trailing, cumulative, offset, semiadditive) | ratio, derived, cumulative and conversion metrics; offset windows | DAX: DIVIDE, CALCULATE, time intelligence; calculation groups |
| 6 Scope | filter: at the top | filter on a metric, or where on the model | filters in measures or the model; RLS is not scope |
| 7 Access | Unity Catalog grants; row filters and masks on source tables | none of its own: the warehouse decides, as the identity the query runs under | RLS and object-level security roles inside the model |
| 8 Business names | comment, display_name, synonyms, format (agent metadata); UC tags and certification | label, description, meta config | display folders, descriptions, format strings, synonyms for Q&A/Copilot |
| 9 Query interface | SQL with MEASURE(); dashboards, Genie, alerts, JDBC/ODBC | Semantic Layer APIs (JDBC, GraphQL, SDK), dbt MCP server, partner tools; mf / dbt sl CLI | Power BI reports, Excel, XMLA endpoint, DAX queries |
| 10 Speed layer | materialization: managed materialized views with query rewrite | caching and exports to tables (dbt platform) | Import (VertiPaq in memory), aggregations, Direct Lake |
The same metric, three times
Net revenue and margin % in each language
Metric view (YAML inside CREATE VIEW ... WITH METRICS)
version: 1.1
source: main.sales_gold.fact_sales_line
filter: status <> 'CANCELLED'
joins:
- name: dealer
source: main.sales_gold.dim_dealer
on: source.dealer_id = dealer.dealer_id
fields:
- name: region
expr: dealer.region
- name: invoice_month
expr: DATE_TRUNC('MONTH', invoice_date)
measures:
- name: net_revenue
expr: SUM(net_amount)
- name: gross_margin
expr: SUM(net_amount - cost_amount)
- name: margin_pct
expr: MEASURE(gross_margin) / NULLIF(MEASURE(net_revenue), 0)dbt Semantic Layer (latest YAML spec, dbt 1.12+ or Fusion)
models:
- name: fact_sales_line
semantic_model:
enabled: true
agg_time_dimension: invoice_date
columns:
- name: line_id
entity: { type: primary, name: sales_line }
- name: dealer_id
entity: { type: foreign, name: dealer }
- name: invoice_date
granularity: day
dimension: { type: time }
metrics:
- name: net_revenue
type: simple
agg: sum
expr: net_amount
filter: "{{ Dimension('sales_line__status') }} != 'CANCELLED'"
- name: gross_margin
type: simple
agg: sum
expr: net_amount - cost_amount
- name: dim_dealer
semantic_model:
enabled: true
columns:
- name: dealer_id
entity: { type: primary, name: dealer }
- name: region
dimension: { type: categorical }
metrics:
- name: margin_pct
type: ratio
numerator: gross_margin
denominator: net_revenueIn the latest spec, simple metrics sit inside the model; ratio and derived metrics sit in a top-level metrics list. Older projects use separate semantic_models with measures and type_params; check the spec your dbt version runs.
Power BI (DAX)
-- Power BI: tables fact_sales_line, dim_dealer, dim_date with relationships; -- scope (no cancelled rows) is usually applied in the source view or Power Query. Net Revenue := SUM ( fact_sales_line[net_amount] ) Gross Margin := SUMX ( fact_sales_line, fact_sales_line[net_amount] - fact_sales_line[cost_amount] ) Margin % := DIVIDE ( [Gross Margin], [Net Revenue] )
Asking for it
-- Metric view: plain SQL SELECT region, invoice_month, MEASURE(margin_pct) AS margin_pct FROM main.sales_gold.sales_mv GROUP BY ALL; # dbt: a metric request, MetricFlow writes the SQL mf query --metrics margin_pct --group-by dealer__region,metric_time__month # open-source MetricFlow dbt sl query --metrics margin_pct --group-by dealer__region,metric_time__month # dbt platform // Power BI: a DAX query (or simply drag Margin % onto a visual) EVALUATE SUMMARIZECOLUMNS ( dim_dealer[region], dim_date[month], "Margin %", [Margin %] )
How they feel
The real difference in one paragraph each
Metric view
Lives where the data and the permissions already are. No extra server. Every Databricks surface (SQL, dashboards, Genie, alerts, notebooks) reads it natively, and Unity Catalog row filters apply. Outside Databricks, tools must send MEASURE() through custom SQL until their connectors learn it.
dbt Semantic Layer
Lives in git next to the models that build the tables, and is warehouse-neutral. MetricFlow, the compiler, is open source (Apache 2.0) since Oct 2025; the serving parts (APIs, caching, MCP server for agents) need a paid dbt platform plan. It has no access rules of its own.
Power BI semantic model
The richest calculation language (DAX) and a very fast in-memory engine. Business users already know it. But the logic lives inside Power BI/Fabric; Genie, agents and other tools can only reach it through XMLA or Power BI APIs, and an Import copy needs its own security.
The common pattern
Keep one home for definitions and make the others thin readers. On a Databricks platform that home is the metric view; Power BI keeps a thin model whose measures match it one to one, checked by a test. See Power BI vs Databricks AI/BI.
Also on the map
Other semantic layers worth knowing
| Product | What it is | When it fits |
|---|---|---|
| Cube (Cube Core, open source) | A semantic layer server: YAML or JS models, SQL/REST/GraphQL APIs, pre-aggregations and row-level rules in the server. Works over many databases. | Good when the data is not on one lakehouse, or for embedded analytics. |
| LookML (Looker) | Looker's modeling language; also served to other tools through Looker's semantic layer connectors. | Strong where Looker is already the BI tool. |
| Snowflake semantic views | Snowflake's native object for metrics and dimensions, used by Cortex Analyst. | Snowflake's equivalent of metric views. |
| Apache Ossie (incubating) | Was Open Semantic Interchange (OSI), started by Snowflake in Sept 2025 with dbt Labs, Salesforce and others; joined the Apache Incubator in 2026; Databricks is listed among its 50+ backers. A neutral YAML format to move semantic models between tools. | Watch it: a common file format would reduce lock-in for all three products here. |
← 1 · The idea · Next: 3 · Limits →
FAQ
Questions people ask
Is MetricFlow open source?
Yes. dbt Labs open-sourced MetricFlow under Apache 2.0 in October 2025. It compiles metric requests to SQL. Serving metrics to BI tools and agents through the Semantic Layer APIs, caching and the MCP server is part of the paid dbt platform.
Can Power BI read a Databricks metric view?
Yes, with limits. Today you send MEASURE() through the Databricks connector's native query in DirectQuery mode, or read a wrapper view. Publishing a metric view as a Power BI semantic model is in Private Preview. Check the current Databricks BI tools page.
Which one should I pick?
Where the data lives decides most of it. Databricks-centred: metric views. Several warehouses, or dbt already central: the dbt Semantic Layer. Power BI is the only consumer and data fits in Import: a Power BI model can be enough. Whatever you pick, keep definitions in one home.
Sources
Checked against (11 Nov 2026)
- Databricks: Unity Catalog metric views and the YAML reference
- Materialization · Advanced techniques · Relationships · BI tools · Feature availability
- Row filters and column masks · ABAC evaluation through views (KB)
- dbt semantic models · MetricFlow open-sourced · Apache Ossie
Metric views change every few months. Confirm runtime minimums and preview status before a design depends on them.