Skip to content

Commit

Permalink
Add links related to the execute context variable (#6025)
Browse files Browse the repository at this point in the history
[Preview](https://docs-getdbt-com-git-dbeatty10-patch-1-dbt-labs.vercel.app/reference/dbt-jinja-functions/execute)

## What are you changing in this pull request and why?

Noticed a couple places where we could add links while responding to
dbt-labs/dbt-core#10665.

## Checklist
- [x] I have reviewed 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 <89008547+mirnawong1@users.noreply.github.com>
  • Loading branch information
dbeatty10 and mirnawong1 authored Sep 6, 2024
1 parent 8b710c3 commit 10b4d99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/reference/dbt-jinja-functions/execute.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: "Use `execute` to return True when dbt is in 'execute' mode."

When you execute a `dbt compile` or `dbt run` command, dbt:

1. Reads all of the files in your project and generates a "manifest" comprised of models, tests, and other graph nodes present in your project. During this phase, dbt uses the `ref` statements it finds to generate the DAG for your project. **No SQL is run during this phase**, and `execute == False`.
1. Reads all of the files in your project and generates a [manifest](/reference/artifacts/manifest-json) comprised of models, tests, and other graph nodes present in your project. During this phase, dbt uses the [`ref`](/reference/dbt-jinja-functions/ref) and [`source`](/reference/dbt-jinja-functions/source) statements it finds to generate the DAG for your project. **No SQL is run during this phase**, and `execute == False`.
2. Compiles (and runs) each node (eg. building models, or running tests). **SQL is run during this phase**, and `execute == True`.

Any Jinja that relies on a result being returned from the database will error during the parse phase. For example, this SQL will return an error:
Expand Down

0 comments on commit 10b4d99

Please sign in to comment.