---
title: "dbt models reading several raw sources at once | Metacenta"
description: "A dbt model that joins two or more raw sources applies its join logic before anything is cleaned. Why a rename upstream then breaks it, and how to stage first."
url: "https://metacenta.com/rules/multiple-sources-joined"
updated: "2026-10-14"
tokens: 633
---

Modelling correctness · rule multiple-sources-joined

# dbt models reading several raw sources at once

A Metacenta review checks this under the rule **A model joins at most one raw source**. Everything below applies whether or not you ever commission one.

## What this rule checks

This rule flags any model that depends on two or more `source()` tables. It reads the model's declared dependencies, not its SQL, so a union counts as much as a join. It does not need a layered project.

## Why it matters

The join uses whatever the source systems call their keys, with no staging model to absorb a rename. An upstream column change then breaks this model, rather than one staging model.

## How to fix it

**Clean each raw source on its own before combining them.** Stage each source in its own model, then join the staged models.

Before:

```sql
select o.id, c.email_hash
from {{ source('shop', 'orders') }} as o
join {{ source('shop', 'customers') }} as c
  on c.id = o.cust_id
```

After:

```sql
select o.order_id, c.email_hash
from {{ ref('stg_shop__orders') }} as o
join {{ ref('stg_shop__customers') }} as c
  on c.customer_id = o.customer_id
```

## When it is fine to leave

A staging model that unions one table from several identical sources, such as one schema per region, is a common and sound pattern. Keep that union in staging and describe it.

## What we need to check it

`manifest.json` alone. We read each model's `depends_on`, so the rule works in flat and layered projects alike.

## Published rules it corresponds to

**[dbt_project_evaluator](https://dbt-labs.github.io/dbt-project-evaluator/)**, rule `fct_multiple_sources_joined`. 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-multiple-sources-joined&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 sources declared twice for one table](https://metacenta.com/rules/duplicate-source)
- [dbt staging models: how to set up the staging layer](https://metacenta.com/rules/staging-depends-on-staging)
- [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)
