---
title: "dbt layer naming: inconsistent model prefixes | Metacenta"
description: "When most models in a dbt layer use stg_, int_ or fct_ and a few do not, the few read as another layer. How we measure your own convention first."
url: "https://metacenta.com/rules/layer-naming-mismatch"
updated: "2026-10-14"
tokens: 700
---

Maintainability · rule layer-naming-mismatch

# dbt layer naming: inconsistent model prefixes

A Metacenta review checks this under the rule **Layer naming is applied consistently**. Everything below applies whether or not you ever commission one.

## What this rule checks

Within each `staging/`, `intermediate/` and marts directory, this rule flags models missing the prefix at least half of that directory uses. Marts directories are `marts`, `mart`, `presentation` and `reporting`. Where fewer than half use the prefix, we report the split once, as information.

## Why it matters

Inconsistent naming means a reader cannot tell a model's layer from its name, and that slows every hand-off. The mix costs more than either convention would on its own.

## How to fix it

**Apply the layer naming convention consistently.** Rename the model to the prefix the rest of its directory uses, or move it to the layer it belongs in. Where we report a split, decide which style is current and rename the minority.

Before:

```sql
-- models/staging/stg_customers.sql
-- models/staging/stg_orders.sql
-- models/staging/payments.sql
```

After:

```sql
-- models/staging/stg_customers.sql
-- models/staging/stg_orders.sql
-- models/staging/stg_payments.sql
```

## When it is fine to leave

A project laid out by domain rather than by layer is not judged. A directory where no model uses a prefix is left alone, and so is `metricflow_time_spine`. Staging accepts `stg_` or `base_`; marts accepts `dim_`, `fct_`, `fact_`, `mart_`, `rpt_` or `agg_`.

## What we need to check it

`manifest.json` alone, for each model's name and file path. We decline when no layer directory applies a prefix, because there is no house convention to hold models to.

## Published rules it corresponds to

**[dbt_project_evaluator](https://dbt-labs.github.io/dbt-project-evaluator/)**, rule `fct_model_naming_conventions`. Ours checks the same concern, tested differently. both check that a model's name matches the layer it sits in; the prefixes each treats as canonical are not identical.

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

[Ask about a review](https://metacenta.com/enquire?src=rule-layer-naming-mismatch&via=md)

## Related pages

- [Duplicate logic across dbt models](https://metacenta.com/rules/duplicate-model-logic)
- [select * in dbt models](https://metacenta.com/rules/select-star)
- [dbt models with too many CTEs](https://metacenta.com/rules/high-cte-count)
- [dbt tests declared away from their models](https://metacenta.com/rules/test-not-beside-model)
- [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)
