Metacenta

Modelling correctness · rule exposure-parent-not-materialized

dbt exposures built on views or raw sources

A Metacenta review checks this under the rule Exposures are built on physical tables. Everything below applies whether or not you ever commission one.

What this rule checks

This rule flags exposures that read a raw source directly, or a model built as view or ephemeral. Every other materialisation passes. A model whose manifest gives no materialisation is left out rather than guessed at.

Why it matters

An exposure on a raw source shows users data the project never modelled, so none of its tests or documentation apply. An exposure on a view re-runs the upstream SQL on every load, which adds latency and warehouse cost.

How to fix it

Build exposures on physical tables. Model any raw source and point the exposure at the result. Materialise the models behind the exposure as table or incremental.

Before:

exposures:
  - name: weekly_revenue
    type: dashboard
    depends_on:
      - source('shop', 'orders')

After:

exposures:
  - name: weekly_revenue
    type: dashboard
    depends_on:
      - ref('fct_orders')

When it is fine to leave

A view over a small table is a fair trade when the dashboard is read rarely, or must show rows the moment they land. We rate that case low at medium confidence. An exposure on a raw source has no such case.

What we need to check it

manifest.json alone. A project with no exposures declared is not judged here.

Published rules it corresponds to

dbt_project_evaluator, rule fct_exposure_parents_materializations. Ours checks the same condition and threshold.

This means our check corresponds to their rule. It does not mean the publisher reviewed or endorses it.