Metacenta

Documentation · rule catalog-undeclared-column

Warehouse columns missing from dbt YAML

A Metacenta review checks this under the rule Built columns are declared in YAML. Everything below applies whether or not you ever commission one.

What this rule checks

For dbt models that declare some columns, this rule compares the declared list with the columns the built table actually has in the warehouse. It flags columns that exist in the warehouse but not in the YAML.

Why it matters

A partly declared model looks documented while much of it is not. A contract cannot be enforced over columns nobody has written down, and a new column arrives unnoticed.

How to fix it

Declare the columns the models actually produce. Declare the remaining columns, with a description where the name is not enough. If a partial schema is a deliberate choice, say so in the model's description.

When it is fine to leave

A wide model where a few internal columns are deliberately left out of the documented surface. Make that a decision written in the model's description, rather than drift.

What we need to check it

catalog.json as well as manifest.json. dbt docs generate writes both. If the catalog is older than the manifest, the rule declines rather than compare two different builds.