Skip to content

Commit 4933d29

Browse files
z3z1mageorgesittas
andauthored
Fix: dont try to serialize engine adapter to sql in macro template method (#5455)
Co-authored-by: Jo <46752250+georgesittas@users.noreply.github.com>
1 parent 51772bd commit 4933d29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sqlmesh/core/macros.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,11 @@ def template(self, text: t.Any, local_variables: t.Dict[str, t.Any]) -> str:
331331
base_mapping = {
332332
k.lower(): convert_sql(v, self.dialect)
333333
for k, v in chain(self.variables.items(), self.locals.items(), local_variables.items())
334+
if k.lower()
335+
not in (
336+
"engine_adapter",
337+
"snapshot",
338+
)
334339
}
335340
return MacroStrTemplate(str(text)).safe_substitute(CaseInsensitiveMapping(base_mapping))
336341

0 commit comments

Comments
 (0)