{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "dbt-labs-dbt-charts--query-warehouse-from-terminal",
 "repo": "dbt-labs/dbt-charts",
 "repo_url": "https://github.com/dbt-labs/dbt-charts",
 "repo_slug": "dbt-labs-dbt-charts",
 "title": "Run SQL against your warehouse from the terminal",
 "page_title": "How to run SQL against your warehouse from the terminal with DBT Charts",
 "summary": "Use dct query to test a metric query, or run a named board query, before you build a chart.",
 "who": "An analyst or engineer who wants to check a SQL query against the warehouse before it goes into a board.",
 "problem": "Testing a metric query inside a dashboard is slow when you only need to see the rows it returns.",
 "outcome": "The query result printed in the terminal, which you can use to confirm the SQL before building the chart.",
 "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."
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "45 minutes",
 "basis": "readme",
 "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.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "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."
  }
 ],
 "best": false,
 "score": 0.6,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/dbt-labs-dbt-charts/query-warehouse-from-terminal/",
 "md": "https://dedupedai.com/use-cases/dbt-labs-dbt-charts/query-warehouse-from-terminal/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/dbt-labs-dbt-charts--query-warehouse-from-terminal.json",
 "api_version": "v1"
}
