dbt_compile
Generate SQL for dbt models without execution to validate syntax, preview transformations, or inspect dbt interpretations before committing to database runs.
Instructions
Compile dbt models. An AI agent should use this tool when it needs to generate the SQL that will be executed without actually running it against the database. This is valuable for validating SQL syntax, previewing transformations, or investigating how dbt interprets models before committing to execution.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
exclude | No | Models to exclude | |
models | No | Specific models to compile, using the dbt selection syntax | |
profiles_dir | No | Directory containing the profiles.yml file (defaults to project_dir if not specified) | |
project_dir | No | ABSOLUTE PATH to the directory containing the dbt project (e.g. '/Users/username/projects/dbt_project' not '.') | . |
selector | No | Named selector to use |