Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diference between handling activate_version messages between hard_delete true and false #2227

Closed
vitoravancini opened this issue Feb 7, 2024 · 2 comments · Fixed by #2242
Labels

Comments

@vitoravancini
Copy link
Contributor

Hello everyone,

It seems that with hard_delete = true when we receive an activate_version message we delete everything equal or lesser than the new version:

f"WHERE {self.version_column_name} < :version \n"

and when we set hard_delete = false we soft delete everything less than the new version:

f"WHERE {version_column_name} <= {current_version}",

Is this how it supposed to be?
When using target_snowflake(based on singer_sdk) with tap mssql we drop everything but the last batch at the end of the execution when hard_delete = true.
The tap emits another activate_message at the end with the same version, which triggers a sql like

delete from {table} where _sdc_record_version <= {version}

that {version} beeing the same version of all the records inserted up to that point.

Should we make both logics(hard_delete true and false) the same?

thank you!

@edgarrmondragon
Copy link
Collaborator

Should we make both logics(hard_delete true and false) the same?

@vitoravancini I think we should :)

PRs welcome!

@vitoravancini
Copy link
Contributor Author

Nice, will try to send it later today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants