Skip to content

Add dbt templating support#9

Merged
jhklarcher merged 1 commit into
mainfrom
feature/dbt-templating-support
Jun 29, 2026
Merged

Add dbt templating support#9
jhklarcher merged 1 commit into
mainfrom
feature/dbt-templating-support

Conversation

@jhklarcher

Copy link
Copy Markdown
Owner

Summary

Adds explicit dbt templating support as a mode layered on the existing SQL dialects. The default Jinja behavior remains passthrough, while --templating dbt protects dbt/Jinja tags, formats surrounding SQL, and restores tags exactly.

Changes

  • Adds templating = "passthrough" | "dbt" config and --templating <passthrough|dbt> CLI support.
  • Adds dbt-aware Jinja preservation for expressions, blocks, comments, trim markers, raw blocks, and semicolons inside tags.
  • Adds dbt default directory includes for .sql, .sql.j2, .sql.jinja, and .sql.jinja2.
  • Adds dbt ANSI and Dremio fixtures plus reference syntax fixtures.
  • Adds docs/dbt-support-plan.md as the trackable milestone/task plan and links it from docs.

Validation

  • cargo fmt --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test (99 passed)

@jhklarcher jhklarcher changed the title [codex] Add dbt templating support Add dbt templating support Jun 29, 2026
@jhklarcher jhklarcher marked this pull request as ready for review June 29, 2026 16:43
@jhklarcher jhklarcher merged commit 59aedf6 into main Jun 29, 2026
1 check passed
@jhklarcher jhklarcher deleted the feature/dbt-templating-support branch June 29, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant