---
title: "dbt semantic models reading unbuilt columns | Metacenta"
description: "A dbt semantic model can name a column its model never builds. dbt parses and builds it anyway, and it fails when someone queries the metric. How to catch it."
url: "https://metacenta.com/rules/semantic-column-not-built"
updated: "2026-10-14"
tokens: 639
---

BI semantic layer · rule semantic-column-not-built

# dbt semantic models reading unbuilt columns

A Metacenta review checks this under the rule **Semantic models read columns their model builds**. Everything below applies whether or not you ever commission one.

## What this rule checks

For each dbt semantic model, this rule compares its entities, dimensions and measures with the columns its model builds. An element reads its `expr`, or its own name when there is no `expr`. Any element naming a column the model does not build is flagged.

## Why it matters

dbt parses and builds this without complaint. It fails when somebody queries a metric that uses the element, usually from a dashboard, on the day the number is needed.

## How to fix it

**Point every semantic model at columns its model builds.** Point each flagged element's `expr` at a column its model builds, or add the column to that model. Rebuild, then query one metric that uses it.

Before:

```yaml
semantic_models:
  - name: orders
    model: ref('fct_orders')
    measures:
      - name: order_total
        agg: sum
        expr: amount_gbp
```

After:

```yaml
semantic_models:
  - name: orders
    model: ref('fct_orders')
    measures:
      - name: order_total
        agg: sum
        expr: order_amount
```

## When it is fine to leave

Rarely. The element fails on its first query, so it is broken rather than risky. A semantic model written ahead of its column should land in the same change as that column.

## What we need to check it

`manifest.json`, plus `catalog.json` from `dbt docs generate` or an enforced contract on the model. Columns listed in YAML without a contract don't count, so that semantic model is left unexamined. An `expr` holding SQL rather than a bare column isn't judged. A catalog older than the manifest isn't used.

[Ask about a review](https://metacenta.com/enquire?src=rule-semantic-column-not-built&via=md)

## Related pages

- [dbt semantic model keys with no unique test](https://metacenta.com/rules/semantic-primary-entity-unasserted)
- [Looker views reading tables dbt does not know](https://metacenta.com/rules/lookml-view-unbuilt-table)
- [Looker views reading raw dbt sources](https://metacenta.com/rules/lookml-view-reads-raw-source)
- [Looker derived tables: SQL, native and persistent](https://metacenta.com/rules/lookml-sql-derived-table)
- [A sample review, as a client reads it](https://metacenta.com/sample)
- [All published rules](https://metacenta.com/rules)
- [How a review is assessed](https://metacenta.com/standard)
