-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: ability to query table and column stats; fix: missing bookmarks for native batch-based sync #13
Merged
kgpayne
merged 7 commits into
main
from
12-fix-batch-sync-does-not-record-a-max-replication-key-value-in-emitted-state
Mar 30, 2023
Merged
feat: ability to query table and column stats; fix: missing bookmarks for native batch-based sync #13
kgpayne
merged 7 commits into
main
from
12-fix-batch-sync-does-not-record-a-max-replication-key-value-in-emitted-state
Mar 30, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aaronsteers
commented
Jan 2, 2023
aaronsteers
changed the title
fix missing bookmarks for native batch-based sync
feat: query table and column stats; fix: missing bookmarks for native batch-based sync
Jan 2, 2023
aaronsteers
changed the title
feat: query table and column stats; fix: missing bookmarks for native batch-based sync
feat: ability to query table and column stats; \n fix: missing bookmarks for native batch-based sync
Jan 2, 2023
aaronsteers
changed the title
feat: ability to query table and column stats; \n fix: missing bookmarks for native batch-based sync
feat: ability to query table and column stats; fix: missing bookmarks for native batch-based sync
Jan 2, 2023
edgarrmondragon
requested changes
Jan 2, 2023
Co-authored-by: Edgar R. M. <edgarrm358@gmail.com>
…s-not-record-a-max-replication-key-value-in-emitted-state
@aaronsteers @kgpayne what needs to happen to get this merged? |
@tayloramurphy final review from @edgarrmondragon would do it. @aaronsteers can't review his own PR, and I made a bunch of changes to get AJ's excellent first pass to fully work 🙂 Will add my review for the sake of GH ✅ |
kgpayne
approved these changes
Mar 20, 2023
edgarrmondragon
approved these changes
Mar 30, 2023
kgpayne
deleted the
12-fix-batch-sync-does-not-record-a-max-replication-key-value-in-emitted-state
branch
March 30, 2023 08:14
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took an initial pass at this over the vacation. I don't know if I'll be able to finish it out, but we can at least start the discussions here.
Resolves:
BATCH
sync does not record a max replication key value in emittedSTATE
#12Besides the new "Table and Column Stats" implementation via
SQLConnector.get_table_profile()
, the meat of the change is inSQLStream._sync_batches()
. The proposed implementation queries for max column value before starting the batch unload, then after the load finishes, it increments the state with the pre-queried max value.Function signatures did not need to change, and all of this fix could be implemented into the SDK with no target-specific code needing to be written, except what is already done in this implementation, which is to use the bookmark's value (when it is available) in the WHERE clause of the COPY operation.