DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

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

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

Short answer: Run uv tool install "dbt-charts[snowflake]" or the extra that matches your warehouse, such as bigquery or postgresql; then 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. All steps.

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

  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 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

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer