How do I keep BI metrics consistent across tools?
Define each metric once in code and have every BI tool read that definition. In Bruin's dashboards as code, a metric is declared in YAML with its SQL expression and time dimension and exposed through a query interface that different BI tools call, so it returns the same value in every report and notebook.
Command
bruin runDefined in
YAML + SQL
Works with
Bruin + your warehouse
What you get
How it works in code
metrics:
- name: gross_margin
label: Gross Margin
source: analytics.finance_daily
expression: (revenue - cost) / NULLIF(revenue, 0)
time_dimension: report_dateRun bruin run and every connected tool reads the same metric value.
Related use cases
Define a dashboard as code
How do I define a dashboard as code?
Dashboards as codeBuild a metrics layer so metrics stay consistent
How do I build a metrics layer so metrics stay consistent?
Dashboards as codeBuild dashboards directly from dbt models
How do I build dashboards directly from dbt models?
Dashboards that live in git
Bruin CLI and ingestr are on GitHub.
A demo walks through your own data.