Metacenta

BI semantic layer · rule lookml-view-unbuilt-table

Looker views reading tables dbt does not know

A Metacenta review checks this under the rule A BI view reads a table the dbt project knows about. Everything below applies whether or not you ever commission one.

What this rule checks

This rule flags each Looker view whose table no dbt model, seed, snapshot or source declares, in any package. We compare the table's own name only, never its schema. A view over a dbt source passes here; another rule asks whether it should read a model.

Why it matters

Whatever the view reports is outside the project's lineage, tests and freshness checks. A dbt change cannot warn anyone that it will break it. A table that predates the project can stop updating while dashboards keep rendering it.

How to fix it

Point every Looker view at a table the dbt project builds. Point the view's sql_table_name at the dbt model meant to serve it. If no model fits yet, declare the table as a dbt source, so it is tested and watched.

Before:

view: orders {
  sql_table_name: legacy.orders_export ;;
}

After:

view: orders {
  sql_table_name: analytics.fct_orders ;;
}

When it is fine to leave

A table built on purpose by another dbt project or a different pipeline. Tell us, and the finding comes out of your report.

What we need to check it

The .lkml files of a LookML project, and manifest.json to match against. Without a manifest the rule declines. A view with no sql_table_name is judged only when an explore uses it, at low confidence. We do not evaluate a sql_table_name built from Liquid or a constant.