Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explain which resource types the
ref
function applies to (#5804)
Previews: - [ref](https://docs-getdbt-com-git-dbeatty10-patch-1-dbt-labs.vercel.app/reference/dbt-jinja-functions/ref) - [source](https://docs-getdbt-com-git-dbeatty10-patch-1-dbt-labs.vercel.app/reference/dbt-jinja-functions/source) ## What are you changing in this pull request and why? This update is useful to understand some of the differences between [`ref()`](https://docs.getdbt.com/reference/dbt-jinja-functions/ref) and [`source()`](https://docs.getdbt.com/reference/dbt-jinja-functions/source). In turn, that is useful context for issues like dbt-labs/dbt-core#10433. The [`source()`](https://docs.getdbt.com/reference/dbt-jinja-functions/source) and [`ref()`](https://docs.getdbt.com/reference/dbt-jinja-functions/ref) functions are complementary: `source()` applies to: - [sources](https://docs.getdbt.com/docs/build/sources) Whereas `ref()` applies to: - [models](https://docs.getdbt.com/docs/build/models) (both [SQL models](https://docs.getdbt.com/docs/build/sql-models) and [Python models](https://docs.getdbt.com/docs/build/python-models)) - [seeds](https://docs.getdbt.com/docs/build/seeds) - [snapshots](https://docs.getdbt.com/docs/build/snapshots) `ref()` includes: - [versioned models](https://docs.getdbt.com/reference/dbt-jinja-functions/ref#versioned-ref) - [package-specific nodes](https://docs.getdbt.com/reference/dbt-jinja-functions/ref#ref-project-specific-models) - [cross-project nodes](https://docs.getdbt.com/docs/collaborate/govern/project-dependencies#how-to-write-cross-project-ref) ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. --------- Co-authored-by: Mirna Wong <[email protected]>
- Loading branch information