Search⌘ K
AI Features

Accessing Compiled Code

Explore how dbt compiles dynamic SQL written with Jinja into executable code. Learn to locate compiled queries in project folders and use CLI commands to generate and examine both compiled and run SQL code for better debugging and understanding of dbt models.

We'll cover the following...

Compiling code

Sometimes, it’s hard to understand what a templated query does. Let’s take a look at an SQL model:

PostgreSQL
select {{3*2}} as id

This model uses Jinja, a templating language that allows us to write ...