Dashboards as Code/Dashboards as codeAnalytics Engineer

How do I define a dashboard as code?

A dashboard is described in a YAML file that lists each chart, its SQL query, and its layout position. The file lives in the repository, so the dashboard is created and updated from the same definition every time.

Command

bruin run

Defined in

YAML + SQL

Works with

Bruin + your warehouse

What you get

declarative dashboard specSQL-backed chartsrepeatable builds

How it works in code

dashboard:
  name: revenue_overview
  charts:
    - title: Daily revenue
      type: line
      query: |
        SELECT order_date, SUM(amount) AS revenue
        FROM analytics.orders
        GROUP BY order_date
        ORDER BY order_date

Run bruin run and the dashboard is built from the YAML definition.

Dashboards that live in git

Open source. Write YAML, run one command, query your warehouse directly.

Sign up to our newsletter

Practical updates on open-source data pipelines, AI analysts, governance, and what we are shipping at Bruin.

The signup form is hosted by Brevo. Accept cookies to load it.