# ref() in dbt, defined with a sourced example

GLOSSARY, read 10 Nov 2026

**The short answer.** The dbt function one model uses to point at another, as in ref('model_a'). dbt reads these calls to build the dependency graph and run models in order. dbt's documentation says ref() is how you reference one model within another, so models can be stacked on top of one another.

## Definition

The dbt function one model uses to point at another, as in ref('model_a'). dbt reads these calls to build the dependency graph and run models in order. Because the links are explicit in code, they are a reliable source of table-level lineage.

## Example from a real tool

**Example.** dbt's documentation says ref() is how you reference one model within another, so models can be stacked on top of one another.

## Related terms

- [ACCESS_HISTORY](/glossary/access-history/): A Snowflake Account Usage view that records which objects, including columns, each query read and wrote.
- [GET_LINEAGE](/glossary/get-lineage/): A Snowflake SQL function that returns upstream or downstream lineage for an object.
- [dbt exposure](/glossary/dbt-exposure/): A dbt declaration that something outside the project, such as a dashboard, depends on certain models.

## Where to read more

- [The Lineage Depth Matrix](/matrix/)
- [All glossary terms](/glossary/)

## Sources

- docs.getdbt.com/reference/dbt-jinja-functions/ref: https://docs.getdbt.com/reference/dbt-jinja-functions/ref (read 10 Nov 2026)

Last reviewed 10 Nov 2026. Canonical: https://datalineagecompare.com/glossary/ref-in-dbt/
