You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mssql_merge_exists physical property not respected in python models #5434
i’m using sqlmesh with a python model that reads data from pickled dataframes and inserts into a slowly changing dimension (scd type 2) table on mssql server.
however, when the query is rendered in the logs, there is no usage of the MERGE keyword. instead, the generated sql falls back to a large series of WITH ... ctes, unions, and inserts.
this behavior is causing two issues:
the model does not run successfully — it crashes after ~20 minutes of execution.
sql server resource usage spikes heavily (likely because of the expanded cte/unions strategy instead of a merge).
Activity
themisvaltinos commentedon Oct 23, 2025
fix for this was merged and released: #5544