Skip to content

Commit

Permalink
Ignore Jinja % tags when compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
BAntonellini committed Nov 7, 2024
1 parent 8e3be28 commit d0a601e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dbt_core_interface/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ def generate_server_node(
This is a context manager that will clear the node after execution and leverages a mutex during manifest mutation.
"""
# Remove {% ... %} patterns from the SQL string
sql = re.sub(r'{%.*?%}', '', sql, flags=re.DOTALL)
with self.manifest_mutation_mutex:
self._clear_node(node_name)
sql_node = self.sql_parser.parse_remote(sql, node_name)
Expand Down

0 comments on commit d0a601e

Please sign in to comment.