Metacenta

Documentation · rule model-columns-undocumented

dbt columns with no description

A Metacenta review checks this under the rule Declared columns carry descriptions. Everything below applies whether or not you ever commission one.

What this rule checks

For every dbt model that declares its columns, this rule counts the columns with an empty description. It reports one finding per model, naming the first few columns.

Why it matters

Analysts guess at what an undocumented column means. Two of them guess differently, and two dashboards end up defining the same metric in two ways.

How to fix it

Document the declared columns. Describe the columns, starting with the ones people filter and aggregate on. Where a column means the same thing in several models, write the description once in a {% docs %} block and point each column at it with {{ doc() }}.

Before:

    columns:
      - name: net_revenue
      - name: ordered_at

After:

    columns:
      - name: net_revenue
        description: Order total after discounts and refunds, before tax, in GBP.
      - name: ordered_at
        description: "{{ doc('ordered_at') }}"

When it is fine to leave

Keys and self-explanatory columns such as created_at can go without, if the model's own description says what one row is. Models that declare no columns are not judged here; the rule on undeclared columns covers them.

What we need to check it

manifest.json alone.