---
title: "dbt sources declared twice for one table | Metacenta"
description: "Two dbt source definitions pointing at one warehouse table split its lineage and let freshness settings drift. How we detect them and how to merge them."
url: "https://metacenta.com/rules/duplicate-source"
updated: "2026-10-14"
tokens: 659
---

Modelling correctness · rule duplicate-source

# dbt sources declared twice for one table

A Metacenta review checks this under the rule **Each warehouse relation is declared as a source once**. Everything below applies whether or not you ever commission one.

## What this rule checks

This rule flags any warehouse relation declared as a dbt source more than once. We compare the resolved `database`, `schema` and `identifier`, ignoring case. The source names in YAML play no part, since two names for one table is the mistake itself.

## Why it matters

Lineage splits across the duplicates, so any graph of what reads the table is wrong. A freshness check or schema change applied to one declaration leaves the others stale.

## How to fix it

**Declare each warehouse relation as a source once.** Keep one source definition for the relation, and repoint every `source()` call at it.

Before:

```yaml
sources:
  - name: shop
    schema: raw
    tables:
      - name: orders
  - name: shop_legacy
    schema: raw
    tables:
      - name: orders
```

After:

```yaml
sources:
  - name: shop
    schema: raw
    tables:
      - name: orders
```

## When it is fine to leave

Rarely, and only for a short time. During a migration from one source name to another, both may exist until the last `source()` call moves over. Remove the old one as soon as nothing reads it.

## What we need to check it

`manifest.json` alone. A source with no resolved database, schema or identifier is left out, because two half-known relations cannot be told apart. If no source is fully resolved, the rule says it could not assess.

## Published rules it corresponds to

**[dbt_project_evaluator](https://dbt-labs.github.io/dbt-project-evaluator/)**, rule `fct_duplicate_sources`. 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.

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

## Related pages

- [dbt incremental models: how unique_key works](https://metacenta.com/rules/incremental-without-unique-key)
- [dbt public models with no enforced contract](https://metacenta.com/rules/public-model-without-contract)
- [dbt staging models: how to set up the staging layer](https://metacenta.com/rules/staging-depends-on-staging)
- [dbt staging models that read marts](https://metacenta.com/rules/staging-depends-on-downstream)
- [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)
