LabscoMCP early access ↗
dbt-labs avatar

querying-the-dbt-information-schema

Local tool required★ 731 on GitHub
part of dbt-labs/dbt-agent-skillsby dbt-labs

Answers questions about your dbt v2 project's own contents with SQL: which models, tests, sources and columns exist, what is untested or undocumented, what depends on what, and how long models took in the last run. The queries run on dbt's built-in DuckDB copy of the project metadata, without touching your warehouse. It can also save a rule, such as every model having a test, as a check that runs on every dbt build.

WHEN TO USE

SCOPE

USE FOR

  • List the models in your project that have no tests.
  • See everything downstream of a model before you change it.
  • Find the slowest models in the latest run.
  • Keep "every public model has a description" true with a check on each build.

NOT FOR

  • Projects on dbt Core 1.x: it needs dbt v2.
  • Runs from dbt platform jobs or another machine: only local runs are in the metadata.