Skip to main content

dbt Charts, beta

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.

Are you an AI agent?

Run this, then follow what it prints:

uv tool install dbt-charts && dct skills chart

No shell? Read https://docs.dbtcharts.com/llms.txt and the MCP page. The whole reference in one fetch: https://docs.dbtcharts.com/llms-full.txt.

Try it without installing anything at play.dbtcharts.com, or start with the docs.

The Playground with a scorecard board: the YAML in the editor on the left and the rendered board on the right. Click to open it.

The YAML behind this board
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

charts:
  k_revenue:
    label: Revenue
    query: kpis
    type: kpi
    value: revenue
    style:
      value:
        format: currency_whole
      support:
        format: delta
    support:
      value: revenue_delta
      label: vs prior month
  k_users:
    label: Active users
    query: kpis
    type: kpi
    value: active_users
    support:
      value: users_delta
      label: vs prior month
    style:
      support:
        format: delta
  k_win_rate:
    label: Win rate, all closed deals
    query: kpis
    type: kpi
    value: win_rate
    style:
      value:
        format: percent_whole
  documents_trend:
    title: Documents created vs. completed
    query: documents
    type: line
    x: month
    y: documents
    color: series
    height: 400
  bookings_by_source:
    title: Bookings by lead source
    query: bookings
    type: bar
    x: lead_source
    y: bookings
    sort:
      by: bookings
      order: desc
    height: 185
    style:
      orientation: horizontal
      axis_y:
        labels:
          format: currency_whole
  active_users_trend:
    title: Active users
    query: active_users
    type: line
    x: month
    y: active_users
    height: 185
  plan_mix:
    title: Users by plan
    query: plans
    type: donut
    theta: users
    color: plan
    total:
      label: Users
    height: 250
  monthly_table:
    title: Monthly detail
    query: monthly
    type: table
    style:
      columns:
        month:
          label: Month
        revenue:
          label: Revenue
          format: currency_whole
          align: right
        new_users:
          label: New users
          format: integer
          align: right
        tickets_created:
          label: Tickets opened
          format: integer
          align: right
        tickets_resolved:
          label: Tickets resolved
          format: integer
          align: right

rows:
  - cols:
      - width: "50%"
        text: |
          Support is the soft spot: tickets resolved trail tickets opened in every
          month, 245 opened against 86 resolved over the year. Bookings are spread
          evenly across sources, with Website, Referral, Download, and Paid Search
          within $220 of each other, so no single channel deserves the next dollar
          on its own.
      - width: "50%"
        cols: [k_revenue, k_users, k_win_rate]

  - cols:
      - width: "66%"
        rows: [documents_trend]
      - width: "34%"
        rows: [bookings_by_source, active_users_trend]

  - cols:
      - width: "66%"
        rows: [monthly_table]
      - width: "34%"
        rows: [plan_mix]

Open it in the Playground

This repository is a read-only mirror of dbt Labs' private upstream. Issues are welcome; pull requests are not accepted. See CONTRIBUTING.md.


Getting started

Beta. dbt Charts is pre-1.0. Requires Python 3.11 to 3.14.

With an agent

Hand your coding agent one sentence. It runs the command in Are you an AI agent? and follows what it prints:

I want to make charts of this data with dbt Charts. Run `uv tool install dbt-charts`, then `dct skills chart`, and follow what it prints.

Manually

uv tool install dbt-charts   # or: pip install dbt-charts
dct --version

dct talks to your warehouse through dbt adapters and needs the adapter in its own environment, so install the one you use as an extra:

uv tool install "dbt-charts[bigquery]"  # or: pip install "dbt-charts[bigquery]"
                                         # also: athena, clickhouse, databricks, fabric,
                                         # postgresql, redshift, snowflake, spark,
                                         # sqlserver, trino. DuckDB is built in.

Unreleased main ships as an unsupported dev build on every export:

uv tool install --prerelease=allow dbt-charts   # or: pip install --pre dbt-charts
dct init                        # bootstrap a project (creates charts/ and dbt_charts.yml)
dct validate charts/sales.yml   # check board YAML for errors, no warehouse needed
dct serve                       # live preview server

dct serve renders every board under charts/ and lets you move between them from the breadcrumb:

A board in dct serve, with the breadcrumb menu open listing the sibling boards

That is the short path. dct is a full CLI: it validates, renders to HTML, PDF, and PNG, runs queries, searches boards, traces column impact, and carries the YAML reference offline. The dct CLI section below lists the verbs.

Explore the dbtcharts.com platform for hosted boards and an enhanced collaboration experience.


dct CLI

While in beta, dbt Charts ships as a separate CLI, dct, short for data chart tool. It mirrors dbt's shape: one verb per job.

dct validate [PATH]           # default: everything under charts/; --strict fails on warnings
dct serve [--port N] [--host H]
dct render BOARD... --format {html,pdf,png,svg,json}
dct query SOURCE 'SELECT …'   # run raw SQL, or a named board query
dct search <query>            # find boards by keyword
dct impact <column>           # which boards reference a column
dct skills chart              # the YAML reference
dct examples [SLUG]           # bundled board specimens

Project verbs read DCT_PROJECT_DIR when --project-dir is not passed. The CLI reference lists every environment variable.


Agent skills and MCP

The dct CLI ships with all the skills and tools agents need to query datasets and write, render, and serve dashboards. It is the recommended tool for agents to work with, but also ships with a local MCP server for surfaces like VS Code where one is required.

dct skills           # list the bundled skills; `dct skills chart` is the entry point
dct init skills      # install them into the project for file-based agent discovery
uv tool install "dbt-charts[mcp]"   # or: pip install "dbt-charts[mcp]"
dct init mcp      # wire the MCP server into Cursor, VS Code, Claude Desktop, Codex, and others

This repository is also a Claude plugin marketplace for claude.ai and Cowork, where Claude has no shell: the dbt-charts plugin bundles the hosted dbtcharts.com connector with the board authoring skills, and an organization owner distributes it from Organization settings → Plugins & skills. Claude Code and other coding agents do not need it: dct init skills writes one dct skill into the repository that sends them to dct skills chart, and they work through the CLI.


VS Code extension

dbt Charts for VS Code adds syntax highlighting for the YAML, the SQL inside it, and Jinja; schema-backed autocomplete and hover docs; diagnostics as you type; and a live preview beside the editor that re-renders on save and honors the board's filters. The preview shells out to dct render, so install the CLI first. Details in the docs.

dbt Charts is also available on Open VSX for VS Code-compatible editors (e.g. Cursor, Windsurf)


Examples

One variable, one query, one chart, and the whole board fits on a screen. It runs against the Playground's demo data, and the link under it opens the exact YAML there, live and editable:

source: db

variables:
  status:
    column: dundersign.documents.status

queries:
  documents: |
    SELECT DATE_TRUNC('month', created_at) AS month,
           SUM(COUNT(*)) OVER (ORDER BY month) AS documents
    FROM dundersign.documents
    WHERE {{ filter('status', status) }}
    GROUP BY 1

charts:
  growth:
    title: Documents created, all time
    type: area
    query: documents
    x: month
    y: documents

rows:
  - growth

An area chart of documents created over time, with a status filter above it

Open this board in the Playground

More complete boards, all on the same demo data:

  • Examples in the docs: a KPI board, an interactive board, nested layouts, and a drill-down, each paste-ready for the Playground.
  • The Playground's own gallery, under Examples at play.dbtcharts.com: chart families, composed shapes, layered charts, cards, tables, variables, and full boards.
  • dct examples lists the specimens bundled with the package, each with inline data so it renders anywhere. dct skills chart points a coding agent at them.

Using with dbt

A dbt project isn't required. charts/ can stand alone and query your warehouse directly. Keeping it inside a dbt project, next to models/, adds the following:

your_dbt_project/
  .git/
  dbt_project.yml
  dbt_charts.yml
  models/
  charts/
    revenue.yml
  • Boards query models with ref(), so a column rename and the boards that read it ship on one branch, in one pull request, through one CI run.
  • Your dbt profile is the connection. No second set of credentials.
  • dct impact <column> answers "which boards break if I change this" before you change it.
  • dbt parse in CI validates every ref() and source() a board uses.

What this version supports

Local sources: CSV, Parquet, JSON, DuckDB.

Warehouses: Athena, BigQuery, ClickHouse, Databricks, PostgreSQL, Redshift, Snowflake, Spark, Trino. Each is installed as an extra: Trino connects through its own Python client, the rest through dbt adapters.

Output formats: dct serve for a live board with working filters. dct render to HTML, PDF, PNG, SVG, JSON, and even terminal.

Core chart types (16): bar, histogram, line, area, scatter, heatmap, pie, donut, KPI, table, point map, bubble map, choropleth map, geoshape, callout, spark bar. See chart types.

Semantic chart types (13): composed from the core types with a few style keys: lollipop, bullet, slope, bump, dot plot, stacked bars, normalized bars, streamgraph, funnel, target and reference lines, moving averages, ranges, small multiples. Open composed shapes, layered charts, and series and small multiples in the Playground.

Themes (5 built in): selected with one theme: key. clarity (the default), paper, vivid, neon, and stark. A custom theme is a YAML file that extends one of them; see themes.


Validation and CI

Errors and warnings carry a code, a file and line, a suggested fix, and a link to its docs page. Agents cannot see rendered output, so each message is written to be acted on from the text alone.

dct validate checks structure without a warehouse:

$ dct validate charts/signups.yml
ERR-VALIDATION-FIELD  Field 'charts.signups': Unknown chart type 'lien'. Did you
mean 'line'? Supported chart types: bar, histogram, line, area, scatter,
heatmap, pie, donut, kpi, table, point_map, bubble_map, map, geoshape, callout,
spark_bar.
At: charts/signups.yml:9
Docs: https://docs.dbtcharts.com/reference/errors/#err-validation-field

dct render runs the queries and checks the result:

$ dct render charts/signups.yml
⚠ 1 warning:
WARN-Y-ENCODING-MOSTLY-NULL  signups: Chart 'signups': y field 'user_count' is
100% NULL across 12 rows.
Fix: Check for a broken join or a nullable source column. A COALESCE or WHERE
clause may be needed to filter the empty rows.
Field: user_count
At: charts/signups.yml:13
Docs: https://docs.dbtcharts.com/reference/warnings/#warn-y-encoding-mostly-null

dct init ci writes a GitHub Actions workflow that runs dct validate on every pull request that touches your boards, with no warehouse credentials. --strict fails on warnings. A dbt parse step also checks ref() and source() calls against your models.


Migrations

The YAML syntax will change before 1.0. Boards written against an older syntax still parse: the engine recognizes the older shape and migrates it in memory. dct migrate rewrites the files themselves to the latest released syntax; see dct migrate.


How it works

board YAML → compile (validate, resolve theme + layout)
           → execute (SQL against your warehouse via dbt adapters)
           → render  (Vega-Lite specs → live HTML, static HTML, PDF, PNG, SVG)

Built on Pydantic (schema validation), Jinja2 (templating, as in dbt), Vega-Lite via vl-convert (charting), and FastAPI (the preview server).


Documentation


Contributing

Development happens in a private upstream repository and is mirrored here read-only. Pull requests opened against this repository are closed unmerged; bug reports and feature requests are welcome via GitHub Issues. See CONTRIBUTING.md and SECURITY.md.

Main contributors

License

Apache License 2.0.

Metadata

Release files for dbt-charts 0.11.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbt-charts 0.11.1
File Size Uploaded Provenance Actions
dbt_charts-0.11.1.tar.gz 11.6 MB Without provenance Details for dbt_charts-0.11.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for dbt-charts 0.11.1
File Actions
dbt_charts-0.11.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for dbt_charts-0.11.1-cp311-abi3-win_amd64.whl
dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_x86_64.whl
dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_aarch64.whl
dbt_charts-0.11.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for dbt_charts-0.11.1-cp311-abi3-macosx_11_0_arm64.whl
dbt_charts-0.11.1-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for dbt_charts-0.11.1-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 92.8 MB

Release files / dbt_charts-0.11.1.tar.gz

Download URL dbt_charts-0.11.1.tar.gz
Size 11.6 MB
Tags Source
SHA-256 checksum
How to use checksums
e65dd47c8df94f9b16c6d0bea2f18420995170a927fae9ed5bcb1f17640d6746
BLAKE2b-256 checksum
How to use checksums
8e182aec45436239b32e4375d696e6321484cd2a94c7c6da257f92a2d5dca581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dbt_charts-0.11.1-cp311-abi3-win_amd64.whl

Download URL dbt_charts-0.11.1-cp311-abi3-win_amd64.whl
Size 16.9 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
bff615f8111ddb9fae85a313e3437586a283a48b45a3ebdb8e163854c6daaeb6
BLAKE2b-256 checksum
How to use checksums
43e48a8574efab24bd7672f332a9aefb346af892b6a944163b777a6ce110a00f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_x86_64.whl
Size 16.5 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
7f0914c37bfbbedc6c9469be8fda78d5a06b27bddcbdb74597e93246bcd7aa71
BLAKE2b-256 checksum
How to use checksums
b3f8b363afa2b90834ba02405fb5cb6a1b50ea047ba77fbee20f91bb78606d6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL dbt_charts-0.11.1-cp311-abi3-manylinux_2_28_aarch64.whl
Size 15.8 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
2cde007411ef99f9bd63c4ee70ec8fc3ab5dfe39028160231244cb2bb0f2f670
BLAKE2b-256 checksum
How to use checksums
eeb71cdba252cb2abe983d1bd6c57d26ccc2240ce8ba52a5cf7fffc58c975c11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dbt_charts-0.11.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL dbt_charts-0.11.1-cp311-abi3-macosx_11_0_arm64.whl
Size 15.6 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3515b7d7739e48c271e6fac409c634e8ee61d738af10dc02e7d4cee259b50b2a
BLAKE2b-256 checksum
How to use checksums
8bab860d4cc8a747ce92c02feb22303a0a0af0102b86c4613fb336f6f5f97689
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / dbt_charts-0.11.1-cp311-abi3-macosx_10_12_x86_64.whl

Download URL dbt_charts-0.11.1-cp311-abi3-macosx_10_12_x86_64.whl
Size 16.2 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c04f64d0956955a65ad9fd539ec0da03e805d3103142dcd78a3a416d95d6fd98
BLAKE2b-256 checksum
How to use checksums
bf6cb8876adc28652b688d5d7a272981be19dd95fcb8145b2c1978aeb7b5ef46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for dbt-charts 0.11.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.11.1 This release

6 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page