Skip to content

fix: neutralize ref() in SQL comments (fixes #12499)#12501

Draft
anjutiwari wants to merge 2 commits intodbt-labs:mainfrom
anjutiwari:bug/fix-ref-in-sql-comments
Draft

fix: neutralize ref() in SQL comments (fixes #12499)#12501
anjutiwari wants to merge 2 commits intodbt-labs:mainfrom
anjutiwari:bug/fix-ref-in-sql-comments

Conversation

@anjutiwari
Copy link
Contributor

@anjutiwari anjutiwari commented Feb 17, 2026

Jinja executes all {{ ref() }} blocks regardless of SQL context. Pre-process SQL to replace ref in comments before Jinja rendering.

Copyright (c) 2026 Atlassian Pty Ltd.
Copyright (c) 2026 Atlassian US, Inc.

Resolves # #12499

Problem

Solution

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

Jinja executes all {{ ref() }} blocks regardless of SQL context.
Pre-process SQL to replace ref in comments before Jinja rendering.

Copyright (c) 2026 Atlassian Pty Ltd.
Copyright (c) 2026 Atlassian US, Inc.
@anjutiwari anjutiwari requested a review from a team as a code owner February 17, 2026 06:29
@cla-bot cla-bot bot added the cla:yes label Feb 17, 2026
@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@github-actions github-actions bot added the community This PR is from a community member label Feb 17, 2026
@anjutiwari anjutiwari marked this pull request as draft February 17, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments