We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 812bc27 commit ab3eeb2Copy full SHA for ab3eeb2
sqlmesh/core/state_sync/db/snapshot.py
@@ -388,10 +388,11 @@ def update_auto_restatements(
388
if not next_auto_restatement_ts_filtered:
389
return
390
391
- self.engine_adapter.insert_append(
+ self.engine_adapter.merge(
392
self.auto_restatements_table,
393
_auto_restatements_to_df(next_auto_restatement_ts_filtered),
394
columns_to_types=self._auto_restatement_columns_to_types,
395
+ unique_key=(exp.column("snapshot_name"), exp.column("snapshot_version")),
396
)
397
398
def count(self) -> int:
0 commit comments