← Back

Post Thread

dbt Charts introduces an open-source, declarative approach that treats dashboards as code—living alongside dbt models so they can be version-controlled, reviewed in pull requests, and validated just like data transformations. By combining #SQL and YAML, humans and AI agents can collaboratively build, modify, and ship trustworthy visualizations that stay in sync when underlying models change. This gives AI the governed context it needs to produce reliable answers while extending analytics engineering practices all the way through the BI layer.

Sample chart definition using #SQL and YAML:

queries:
  revenue_by_month:
    #sql: |
      SELECT date_trunc('month', ordered_at) AS month,
             sum(product_price) AS revenue
      FROM MY_DATABASE.MY_SCHEMA.order_items
      GROUP BY 1
      ORDER BY 1

charts:
  revenue_trend:
    type: line
    query: revenue_by_month
    x: month
    y: revenue
    title: "Revenue by month"
https://www.getdbt.com/resources/webinars/introducing-dbt-charts-dashboards-as-code
Open Graph Image
www.getdbt.com

Introducing dbt Charts: Dashboards as code | dbt Labs

See how dbt Charts brings dashboards as code to your workflow, giving humans and AI governed context to build, review, and ship trusted dashboards.

0 Replies
0 Reposts