Skip to content

Conversation

themisvaltinos
Copy link
Contributor

@themisvaltinos themisvaltinos commented Oct 15, 2025

A user reported that scd type 2 in python models don't respect mssql_merge_exists flag, but this is a more general issue. This is because this pr: #4531 added DELETE+INSERT strategy to be used instead of MERGE in _insert_overwrite_by_condition for mssql. This update respects the flag if the user has opted in to use merge strategy for a particular model and uses merge instead.

slack thread: https://tobiko-data.slack.com/archives/C044BRE5W4S/p1758704337222309

@themisvaltinos themisvaltinos requested review from a team, erindru and treysp October 15, 2025 18:48
)

# For actual conditional overwrites, use MERGE from InsertOverwriteWithMergeMixin
# For conditional overwrites or when mssql_merge_exists is set, use MERGE from InsertOverwriteWithMergeMixin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, InsertOverwriteWithMergeMixin was removed entirely in #5380

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes good point I'll adapt the comment now that it's consolidated

@themisvaltinos themisvaltinos merged commit 4c5a6d3 into main Oct 16, 2025
36 checks passed
@themisvaltinos themisvaltinos deleted the themis/mergemssql branch October 16, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants