Consider passing min and max constraints in the get_records()
and get_batches()
method signatures
#1011
aaronsteers
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
@aaronsteers is the idea that in the default implementation
It is indeed a breaking change, if the dev implemented its own |
Beta Was this translation helpful? Give feedback.
4 replies
-
In addition to min/max constraints, we could include |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Related to:
Disclaimer: I realize this is likely a breaking change. We could time this during
1.0
and/or we could in the meanwhile have a_v2
version of the method if necessary.Background
Developers as of now have to spend a lot of time in the docs to understand how to honor the bookmark location and replication method. We could make this much easier by simply passing
min_replication_key_value
andmin_replication_key_value
with the method signatures of bothget_records()
andget_batches()
.Example
Our SQL implementation is a decent example:
Current code
This requires the developer to call
get_starting_replication_key_value()
. The SDK checks that we're not in full table mode when responding toget_starting_replication_key_value
andreplication_key
- but it's not clear at all that they don't have to check those.Proposal (NEW)
Proposal (OLD)
This example doesn't require the developer to check anything except
self.replication_key
. Everything else is passed explicitly.For tangental reasons, the example above includes also and ending value constraint. We don't strictly have to add this now, but I think we probably should.
Beta Was this translation helpful? Give feedback.
All reactions