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

deletion during incremental syncs #333

Open
simon-weber opened this issue Jul 1, 2024 · 1 comment
Open

deletion during incremental syncs #333

simon-weber opened this issue Jul 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@simon-weber
Copy link

Feature Description

Tools like Hightouch have the option to delete rows in the destination during an incremental sync after they're deleted from the source. As far as I can tell, that's not something Sling supports right now. You either need to run a full refresh / truncate, or do an incremental sync + some kind of post-run cleanup.

@simon-weber simon-weber added the enhancement New feature or request label Jul 1, 2024
@flarco
Copy link
Collaborator

flarco commented Jul 1, 2024

Yea, deletes are a bit tricky. The way Hightouch does this currently is actually inefficient because it does a full select of the source data each time, whereas sling adds a {incremental_where_cond} clause in the query to filter at the source system. Hightouch is able to detect missing IDs by caching a list of the values in S3 and comparing them after doing a full select. But since Sling only selects new data, it doesn't have a complete list of the IDs to do a whole comparison.

I'm thinking something that could work for Sling would be to only SELECT the primary key values in the target table AND the source table, and then do a comparison to see which ones need to be deleted in the target table...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants