# dbt Source

> A raw table listed in dbt, so models can read it by name.

**Field:** Data Engineering  
**Category:** Processing  
**Also known as:** dbt Sources, dbt source()

## Think of it like

It is like labels on jars in a kitchen. Each recipe names the jar by its label.

## Definition

A dbt source names a raw table that dbt did not build, such as one filled by a loading tool. You list sources once in a YAML file. Models then read them with the source() function instead of typing the full table name. This puts the raw tables at the start of dbt's lineage graph. dbt can also check how recently a source got new rows.

## Example

The raw orders table moves to a new schema. Lucy changes one line in the sources file, and all 30 models that read it still work.

## Example code

```yaml
sources:
  - name: shop
    tables:
      - name: orders
      - name: customers
```

Listed once. A model then reads it as {{ source('shop', 'orders') }}.

## Why it matters

Raw table names live in one place. The lineage graph also shows which models depend on which raw data.

## Common mistake

Typing raw table names straight into models. dbt then cannot see where the data came from.

## Three principles

- **Raw, not built.** Sources are tables dbt did not make.
- **Listed once.** Names live in one YAML file.
- **Start of lineage.** The graph begins at the sources.

## Related terms

- [dbt (Data Build Tool)](https://learn.benibix.com/term/data/dbt)
- [dbt Model](https://learn.benibix.com/term/data/dbt-model)
- [dbt Test](https://learn.benibix.com/term/data/dbt-test)
- [Data Lineage](https://learn.benibix.com/term/data/data-lineage)
- [Data Source](https://learn.benibix.com/term/data/data-source)

![A dbt project from left to right. A source, the raw table shop.orders loaded by other tools, feeds a model called stg_orders, a SELECT that cleans it. That feeds a highlighted incremental model called orders, where each run adds only the new rows. Under it, tests check that order_id is unique and not null, find 0 failing rows and pass. Under the source, a snapshot called orders_snapshot keeps each old version with valid from and to dates.](https://learn.benibix.com/diagrams/dat-dbt-project.svg)

---

Source: https://learn.benibix.com/term/data/dbt-source
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
