A declarative YAML syntax around SQL for making dashboards.
dbt Charts, from dbt Labs (package dbt-charts, CLI dct), compiles
YAML board definitions into interactive dashboards and reports in many formats. SQL is still
the language for defining WHAT data you want to see, and dbt Charts wraps that with a simple
YAML syntax declaring HOW you want to see it.
Problem: Vibe coded dashboards create a mess of artifacts, frameworks and data
transformations at every layer, making it hard or impossible to audit.
Solution: a clear YAML syntax for dashboards that's easy for agents to write and humans
to audit.
title: Dundersign scorecard
source: db
width: 1440
variables:
lead_source:
input: multiselect
column: dundersign.opportunities.lead_source
queries:
kpis: |
WITH months AS (
SELECT month, revenue, active_users,
revenue - LAG(revenue) OVER (ORDER BY month) AS revenue_delta,
active_users - LAG(active_users) OVER (ORDER BY month) AS users_delta
FROM dundersign_serving.monthly_metrics
),
deals AS (
SELECT SUM(CASE WHEN is_won THEN 1 ELSE 0 END) * 1.0 / COUNT(*) AS win_rate
FROM dundersign.opportunities
WHERE is_closed AND {{ filter('lead_source', lead_source) }}
)
SELECT revenue, revenue_delta, active_users, users_delta, (SELECT win_rate FROM deals) AS win_rate
FROM months WHERE month = (SELECT MAX(month) FROM months)
documents: |
SELECT month, 'Created' AS series, documents_created AS documents FROM dundersign_serving.monthly_metrics
UNION ALL
SELECT month, 'Completed', documents_completed FROM dundersign_serving.monthly_metrics
ORDER BY 1, 2
bookings: |
SELECT lead_source, SUM(amount) AS bookings
FROM dundersign.opportunities
WHERE is_won AND {{ filter('lead_source', lead_source) }}
GROUP BY 1 ORDER BY 2 DESC
active_users: |
SELECT month, active_users FROM dundersign_serving.monthly_metrics ORDER BY 1
plans: |
SELECT plan, COUNT(*) AS users FROM dundersign.users GROUP BY 1 ORDER BY 2 DESC
monthly: |
SELECT month, revenue, new_users, tickets_created, tickets_resolved
FROM dundersign_serving.monthly_metrics ORDER BY 1