Skip to main content

Using Jinja with SQL

Jinja can be used with SQL to expand functionality. Create control statement and use variables to write scripts that can be used in Coalesce.

In these guides you’ll go over some basic syntax and build some Macros.

Referencing Nodes and the Current Object

Jinja templates often need fully qualified object names (for this Environment), DAG-safe references to other Nodes, or a shorthand for the Node you are editing. Those use ref(), ref_link(), ref_no_link(), and {{this}}, not generic Jinja variables alone. See Ref Functions for syntax, examples (including Post-SQL), and how {{this}} relates to ref_no_link().

Where to Use Jinja in Coalesce