# AI use cases for DBT Charts (dbt-labs/dbt-charts)

Repo: [dbt-labs/dbt-charts](https://github.com/dbt-labs/dbt-charts) | Use cases: 5 | Page: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/

dbt Charts is a declarative YAML syntax around SQL for building dashboards, with a dct CLI that validates, previews, renders, and queries board definitions.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Build a KPI dashboard from warehouse SQL with an agent: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/build-kpi-dashboard-with-agent/
- Check dashboard YAML for errors before merging: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/validate-board-yaml-before-merge/
- Find which dashboards break when a column changes: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/trace-column-impact-on-boards/
- Export a dashboard as HTML, PDF, or PNG: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/render-board-to-shareable-file/
- Run SQL against your warehouse from the terminal: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/query-warehouse-from-terminal/

## How to build a KPI dashboard from warehouse SQL with an agent with DBT Charts

Repo: [dbt-labs/dbt-charts](https://github.com/dbt-labs/dbt-charts) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Have a coding agent turn your SQL queries into a validated, live-previewed YAML dashboard.

**Who it is for:** An analyst or data lead who has SQL for key metrics and wants a shareable dashboard without hand-building charts in a BI tool.

**The problem:** Vibe-coded dashboards pile up artifacts, frameworks, and transformations, which makes them hard to audit.

**The outcome:** A board YAML file under charts/ that validates, renders in a live preview, and shows the metrics from your SQL.

### Steps

1. Run `uv tool install dbt-charts` to install the CLI.
2. Run `dct skills intro` and follow the printed guidance so the agent knows the board format.
3. Run `dct init` to bootstrap a project with charts/guide.yml.
4. Run `dct validate charts/guide.yml` to check the board YAML before you preview it.
5. Run `dct serve` and open the live preview to review the dashboard.

### Prompt to paste into your agent

```text
Using the dbt-charts repo, install the CLI, run `dct skills intro`, and write a KPI board for the metrics described in <placeholder> as YAML under charts/. Run `dct validate` on the file and report any errors. Verify that the board renders in `dct serve`.
```

### Caveat

dbt Charts is pre-1.0 and beta, and the README requires Python 3.11 to 3.13, so check your Python version before you start.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/build-kpi-dashboard-with-agent/

## How to check dashboard YAML for errors before merging with DBT Charts

Repo: [dbt-labs/dbt-charts](https://github.com/dbt-labs/dbt-charts) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Run strict validation on board files in a pull request, with no warehouse needed.

**Who it is for:** An analytics engineer reviewing dashboard changes, or a team lead who wants board files checked the same way as code.

**The problem:** Dashboard changes written by people or agents are hard to audit by eye, and errors surface late.

**The outcome:** A clear pass or fail on every board under charts/, with warnings treated as failures when strict mode is on.

### Steps

1. Run `uv tool install dbt-charts` on the machine that runs your checks.
2. Run `dct validate charts/guide.yml` on one board to confirm the setup works.
3. Run `dct validate --strict` to check every board under charts/ and fail on warnings. (inferred, check the README)
4. Add the same command to your review or CI step so each change is checked before merge.

### Prompt to paste into your agent

```text
In the dbt-charts repo, run `dct validate --strict` on the boards changed in <placeholder> and list every error and warning with its file path. Verify that the command exits cleanly once the issues are fixed.
```

### Caveat

The README describes validation as checking board YAML only, so it does not confirm that the SQL returns correct data from your warehouse.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/validate-board-yaml-before-merge/

## How to find which dashboards break when a column changes with DBT Charts

Repo: [dbt-labs/dbt-charts](https://github.com/dbt-labs/dbt-charts) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use dct impact to list the boards that reference a column before you rename it.

**Who it is for:** A data engineer about to rename or drop a warehouse column who needs to know which dashboards will be affected.

**The problem:** Column changes can silently break dashboards that nobody remembers depend on them.

**The outcome:** A list of boards that reference the column, so the owners can update them in the same change.

### Steps

1. Run `uv tool install dbt-charts` to install the CLI.
2. Run `dct impact` to see which boards reference a column.
3. Run `dct search` to find boards by keyword if you need to locate related dashboards.
4. Update or notify the owners of each board listed before the column change ships.

### Prompt to paste into your agent

```text
In the dbt-charts repo, run `dct impact` for the column <placeholder> and list every board that references it. Verify the list against `dct search` results for the same name.
```

### Caveat

The README gives only a one-line description of dct impact, so check its exact arguments with `dct docs` or the CLI reference before you rely on it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/trace-column-impact-on-boards/

## How to export a dashboard as HTML, PDF, or PNG with DBT Charts

Repo: [dbt-labs/dbt-charts](https://github.com/dbt-labs/dbt-charts) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Render a board to a static file that you can send to people who do not run the CLI.

**Who it is for:** An analyst who must send a dashboard snapshot to a stakeholder or attach it to a report.

**The problem:** Stakeholders often need a fixed copy of a dashboard, not a live tool or a YAML file.

**The outcome:** A rendered file of the board in the chosen format, ready to share.

### Steps

1. Run `uv tool install dbt-charts` to install the CLI.
2. Run `dct validate charts/guide.yml` to confirm the board is valid.
3. Run `dct render charts/guide.yml --format html` to write an HTML version. (inferred, check the README)
4. Run `dct render charts/guide.yml --format pdf` or `--format png` if you need a different format. (inferred, check the README)

### Prompt to paste into your agent

```text
In the dbt-charts repo, render the board at <placeholder> to PDF with `dct render <placeholder> --format pdf` and report the output file path. Verify that the file opens and shows the expected charts.
```

### Caveat

Rendering needs real data from a warehouse or the demo data, so a board that queries an unreachable source will not produce useful output.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/render-board-to-shareable-file/

## How to run SQL against your warehouse from the terminal with DBT Charts

Repo: [dbt-labs/dbt-charts](https://github.com/dbt-labs/dbt-charts) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Use dct query to test a metric query, or run a named board query, before you build a chart.

**Who it is for:** An analyst or engineer who wants to check a SQL query against the warehouse before it goes into a board.

**The problem:** Testing a metric query inside a dashboard is slow when you only need to see the rows it returns.

**The outcome:** The query result printed in the terminal, which you can use to confirm the SQL before building the chart.

### Steps

1. Run `uv tool install "dbt-charts[snowflake]"` or the extra that matches your warehouse, such as bigquery or postgresql. (inferred, check the README)
2. Set your warehouse connection through dbt adapter settings, since dct uses dbt adapters.
3. Run `dct query SOURCE 'SELECT …'` with your source name and a SQL statement.
4. Compare the output with the numbers you expect before you add the query to a board.

### Prompt to paste into your agent

```text
In the dbt-charts repo, run `dct query <placeholder> 'SELECT …'` with the SQL for the metric <placeholder> and print the result rows. Verify that the row count and totals match a known figure from your source system.
```

### Caveat

The README lists the supported adapters but does not describe how to configure each connection, so set up the dbt adapter details from the dbt and dbt Charts docs first.

Risk, credentials: dct query needs your warehouse connection details, so keep them in your environment or dbt profile and never paste them into an agent prompt or a board file.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/dbt-labs-dbt-charts/query-warehouse-from-terminal/
