How it works
When you runlightdash deploy (or lightdash compile / lightdash preview), the CLI reads your project’s compiled manifest.json, which contains everything MetricFlow knows about your project: the semantic_models (entities, dimensions, measures) and the metrics defined on top of them.
These metrics can then be used everywhere Lightdash metrics work (charts, dashboards, the API, AI agents).
If you define a metric with the same name in both MetricFlow and your model’s
meta.metrics, the meta.metrics (Lightdash YAML) definition will take precedence.Use the latest MetricFlow spec
Lightdash supports the latest and legacy spec, though it’s recommended to use the latest spec.- Legacy spec (dbt Core 1.6+): top-level
semantic_models:andmetrics:blocks withtype_params. - Latest spec (dbt Fusion engine, dbt platform, dbt Core 1.12+):
semantic_model:enabled inline on the model, with entities/dimensions on columns and metrics using top-levelagg/exprkeys.
Supported features
simple metrics, and measures flagged create_metric: true, translate into Lightdash:
Also carried over:
- Measure
expr: bare column references and SQL expressions both become the metric’s SQL. - Labels and descriptions: from the metric, falling back to the measure’s.
What’s not supported yet
These are skipped with a warning on deploy (details under--verbose):
And these parts of the semantic model are currently skipped:
- Entities / joins. MetricFlow joins semantic models implicitly at query time through shared entity keys. Lightdash joins are explicit and authored per-explore (joining tables).
- Dimensions and
agg_time_dimension. Lightdash generates dimensions from your model’s real columns, so all of your columns are already available as dimensions, and metrics can be grouped by any of them — the MetricFlow dimension definitions aren’t needed.
Example
A complete working example (both specs, with a reproducible test) lives in the Lightdash repo underexamples/metricflow-demo. The short version, in the legacy spec:
orders explore two metrics, Total revenue (SUM("orders".amount)) and unique_customers (COUNT(DISTINCT "orders".customer_id)), with no Lightdash-specific YAML.