Skip to content

Commit

Permalink
Differentiate between expressions that print and statements that don't
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeatty10 authored Nov 28, 2023
1 parent bcbab8a commit 2a89853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/docs/build/jinja-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ group by 1

You can recognize Jinja based on the delimiters the language uses, which we refer to as "curlies":
- **Expressions `{{ ... }}`**: Expressions are used when you want to output a string. You can use expressions to reference [variables](/reference/dbt-jinja-functions/var) and call [macros](/docs/build/jinja-macros#macros).
- **Statements `{% ... %}`**: Statements are used for control flow, for example, to set up `for` loops and `if` statements, or to define macros.
- **Statements `{% ... %}`**: Statements don't output a string. They are used for control flow, for example, to set up `for` loops and `if` statements, or to define macros.
- **Comments `{# ... #}`**: Jinja comments are used to prevent the text within the comment from compiling.

When used in a dbt model, your Jinja needs to compile to a valid query. To check what SQL your Jinja compiles to:
Expand Down

0 comments on commit 2a89853

Please sign in to comment.