How do I build dashboards directly from dbt models?
A chart points at a dbt model by name and queries the table that model produces in the warehouse. When the model is rebuilt the dashboard reads the updated table without any manual export step. Bruin does this in one platform: ingestion, SQL and Python pipelines, quality checks, lineage, and an AI data analyst that answers in Slack, Microsoft Teams, Google Chat, WhatsApp, Discord, Telegram, email and the browser.
Command
bruin runDefined in
YAML + SQL
Works with
Bruin + your warehouse
What you get
How it works in code
dashboard:
name: marketing_overview
charts:
- title: Signups by channel
type: bar
model: dbt.stg_signups
query: |
SELECT channel, COUNT(*) AS signups
FROM dbt.stg_signups
GROUP BY channelRun bruin run and the dashboard reads directly from the dbt model output.
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 codeKeep BI metrics consistent across tools
How do I keep BI metrics consistent across tools?
About Bruin
What is Bruin?
Bruin is an open-source, AI-powered data platform. One project covers the whole path from source to answer: data ingestion (with ingestr), SQL and Python transformations, quality checks, column-level lineage, a data catalog and scheduling. On top of that data, an AI data analyst answers questions in Slack, Microsoft Teams, Google Chat, WhatsApp, Discord, Telegram, email or the browser, and builds dashboards from a prompt.
Pipelines are plain SQL, Python and YAML files in your own Git repository, and the work runs inside your own warehouse: Snowflake, BigQuery, Databricks, Redshift, Postgres, ClickHouse, DuckDB and others. The Bruin CLI is open source under Apache 2.0 and runs on a laptop, in CI or on-prem. Bruin Cloud is optional and adds scheduling, the AI data analyst, governance, SSO and audit logs.
For dashboards as code that means dac: dashboards defined as YAML in Git, served from your warehouse, next to the pipelines that build the data.
- Replaces
- Separate tools for ingestion, transformation, orchestration, data quality, cataloguing and BI
- Open source
- Bruin CLI under Apache 2.0; ingestr source-available under the Functional Source License
- Your data
- Stays in your warehouse; pipelines stay in your Git repository
- Security
- ISO/IEC 27001:2022 certified and SOC 2 Type 2 attested
- Used by
- Data teams at Lessmore, StarBerry, NativeMinds, SCG, M8 Games and Fabrikatör
Why Bruin for dashboards as code
Dashboards in Git
Each dashboard is a file, reviewed in a pull request and rolled back like code.
Straight from the warehouse
dac queries your warehouse directly. There is no extract to refresh.
Next to the pipeline
The tables a dashboard reads are built and checked in the same Bruin project.
Testable in CI
Run dac validate on every change to catch a broken dashboard before it reaches users.
How it works
01
Install dac
Install dac and point it at your warehouse connection.
02
Write the dashboard
Describe charts, queries and filters in a YAML file.
03
Serve it
Run dac serve to get a live dashboard, then commit it.
Dashboards that live in git
Bruin CLI and ingestr are on GitHub.
A demo walks through your own data.