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.
Who it is forAn analyst or engineer who wants to check a SQL query against the warehouse before it goes into a board.
The problemTesting a metric query inside a dashboard is slow when you only need to see the rows it returns.
The outcomeThe query result printed in the terminal, which you can use to confirm the SQL before building the chart.
What you need first
- Python 3.11 to 3.13
- uv (or pip) to install the dbt-charts package
- A warehouse adapter extra such as dbt-charts[snowflake] or dbt-charts[bigquery] if you want to run queries against your own warehouse
- Warehouse credentials for your own data, or the Playground demo data at play.dbtcharts.com
Steps
- Run
uv tool install "dbt-charts[snowflake]"or the extra that matches your warehouse, such as bigquery or postgresql. (inferred, check the README) - Set your warehouse connection through dbt adapter settings, since dct uses dbt adapters.
- Run
dct query SOURCE 'SELECT …'with your source name and a SQL statement. - Compare the output with the numbers you expect before you add the query to a board.
Prompt for your agent
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for dbt-labs/dbt-charts and "Run SQL against your warehouse from the terminal"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer