Skip to content

Commit 550a613

Browse files
authored
Ignore Jinja % tags when compiling (#12)
1 parent 8e3be28 commit 550a613

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dbt_core_interface/project.py

+2
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,8 @@ def generate_server_node(
703703
704704
This is a context manager that will clear the node after execution and leverages a mutex during manifest mutation.
705705
"""
706+
# Remove {% ... %} patterns from the SQL string
707+
sql = re.sub(r'{%.*?%}', '', sql, flags=re.DOTALL)
706708
with self.manifest_mutation_mutex:
707709
self._clear_node(node_name)
708710
sql_node = self.sql_parser.parse_remote(sql, node_name)

0 commit comments

Comments
 (0)