diff --git a/website/docs/reference/dbt-jinja-functions/ref.md b/website/docs/reference/dbt-jinja-functions/ref.md index 0c0e9580f13..8212359c1f1 100644 --- a/website/docs/reference/dbt-jinja-functions/ref.md +++ b/website/docs/reference/dbt-jinja-functions/ref.md @@ -2,10 +2,21 @@ title: "About ref function" sidebar_label: "ref" id: "ref" -description: "Read this guide to understand the builtins Jinja function in dbt." -keyword: dbt mesh, project dependencies, ref, cross project ref, project dependencies +description: "Read this guide to understand the ref Jinja function in dbt." +keyword: dbt mesh, project dependencies, ref, cross project ref --- +```sql +select * from {{ ref("node_name") }} +``` + +## Definition + +This function: +- Returns a [Relation](/reference/dbt-classes#relation) for a [model](/docs/build/models), [seed](/docs/build/seeds), or [snapshot](/docs/build/snapshots) +- Creates dependencies between the referenced node and the current model, which is useful for documentation and [node selection](/reference/node-selection/syntax) +- Compiles to the full object name in the database + The most important function in dbt is `ref()`; it's impossible to build even moderately complex models without it. `ref()` is how you reference one model within another. This is a very common behavior, as typically models are built to be "stacked" on top of one another. Here is how this looks in practice: diff --git a/website/docs/reference/dbt-jinja-functions/source.md b/website/docs/reference/dbt-jinja-functions/source.md index 59317a79e3d..d32abccc94a 100644 --- a/website/docs/reference/dbt-jinja-functions/source.md +++ b/website/docs/reference/dbt-jinja-functions/source.md @@ -6,14 +6,14 @@ description: "Read this guide to understand the source Jinja function in dbt." --- ```sql -select * from {{ source(source_name, table_name) }} +select * from {{ source("source_name", "table_name") }} ``` ## Definition This function: - Returns a [Relation](/reference/dbt-classes#relation) for a [source](/docs/build/sources) -- Creates dependencies between a source and the current model, which is useful for documentation and model selection +- Creates dependencies between a source and the current model, which is useful for documentation and [node selection](/reference/node-selection/syntax) - Compiles to the full object name in the database