dbt docs generate failed: empty catalog.json produced
Fixes empty dbt catalog output by verifying the docs generate target points at a database with real relations and that the role can read the warehouse metadata. Use when dbt docs generate succeeds but catalog.json is empty. Not for docs generate crashes, which are a different failure.
TL;DR
An empty catalog means the adapter's metadata query returned nothing: usually the target points at the wrong database or schema, or the role cannot read the information schema. Run dbt debug, fix the target or the grants, regenerate, and serve.
Error
dbt docs generate failed: empty catalog.json producedSteps
- Run
dbt debugand confirm the target database and schema. Expected: they match where your relations actually live. - Check that relations exist in that database and schema by listing them in the warehouse. Expected: you see your models, seeds, and snapshots there.
- Verify the dbt role can read the warehouse metadata (information schema or equivalent). Expected: a metadata query as that role returns rows.
- Run
dbt docs generateagain. Expected: catalog.json is now populated. - Run
dbt docs serveand open the site. Expected: models show column-level catalog data.
When to use
dbt docs generatefinishes but catalog.json is empty or nearly empty.- Docs show models but no columns.
When not to use
dbt docs generatecrashes (an artifact or version problem).- The docs site is missing models entirely (a manifest problem).
Tool compatibility
- dbt Core 1.0 and later, all adapters. Catalog queries are adapter-specific under the hood.
Variant phrasings
catalog.json has sources but no models
The target schema for models differs from where docs generate looked.
Docs columns missing after a warehouse migration
The new warehouse needs the metadata grants re-applied.
Why it happens
Docs generation queries the warehouse for table and column metadata using the active target. A target pointing at an empty database, or a role blocked from metadata, yields an empty catalog without erroring.
Edge cases
- On BigQuery, the catalog query needs dataset metadata permissions, not just data access.
- Very large warehouses can time out the catalog query; generate against a smaller target or increase timeouts.
dbt docs generateuses the manifest from the last compile; recompile first if the manifest is stale.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_V9Q23wY7kolv7o8SPnIrfA
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.