Skip to content

feat: point SQL holding uncompiled dbt Jinja to dbt compile - #101

Closed
kvlonge wants to merge 1 commit into
mainfrom
fix/jinja-help
Closed

kvlonge wants to merge 1 commit into
mainfrom
fix/jinja-help

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Why

Readers paste uncompiled dbt models, such as {{ ref('stg_orders') }}, and get only the parser's message ("Expected Colon, got RBrace"), which doesn't say what to do.

Changes

  • A parse failure on a line holding {{ or {% now carries help: "this looks like uncompiled dbt Jinja; run dbt compile and check the SQL it writes under target/compiled". Snowflake rejects the SQL too, so only the help changes.
  • The SQ0001 explanation in the diagnostics reference mentions it.

Verification

  • A CLI test covers the Jinja help and confirms that a parse failure without Jinja keeps no help.
  • sqlquack check shows the help on a pasted model.

A parse failure on a line holding {{ or {% now carries help to compile
the model with dbt and check the SQL under target/compiled, since
Snowflake does not parse Jinja either.
kvlonge added a commit that referenced this pull request Nov 6, 2026

kvlonge commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing: SQLQuack lands through local-gate trains, not PR merges (D94), so open PRs only add clutter (D628/D630). The branch is kept. Any work here that isn't on main yet is tracked by the train owner and lands through a train.

@kvlonge kvlonge closed this Nov 8, 2026
@kvlonge
kvlonge deleted the fix/jinja-help branch November 9, 2026 21:31
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