-
Notifications
You must be signed in to change notification settings - Fork 196
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
Empty String Cursor Value from Zoom API Leading to Pagination Issue in JSONResponseCursorPaginator
#2012
Labels
Comments
Thanks for reporting this @kang8. Let me know if you'd be interested in submitting a PR with a fix. |
Yes, I'll submit a PR around tomorrow night(my timezone is UTC +08:00) |
Perfect, thank you! |
kang8
added a commit
to kang8/dlt
that referenced
this issue
Nov 2, 2024
…ng cursor value Adjusts the `update_state()` method to set `_next_reference` to None when the cursor value extracted from the JSON response is an empty string, preventing unintended pagination requests. Fixed dlt-hub#2012
kang8
added a commit
to kang8/dlt
that referenced
this issue
Nov 2, 2024
…ng cursor value Adjusts the `update_state()` method to set `_next_reference` to None when the cursor value extracted from the JSON response is an empty string, preventing unintended pagination requests. Fixed dlt-hub#2012
kang8
added a commit
to kang8/dlt
that referenced
this issue
Nov 2, 2024
…ng cursor value Adjusts the `update_state()` method to set `_next_reference` to None when the cursor value extracted from the JSON response is an empty string, preventing unintended pagination requests. Fixed dlt-hub#2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dlt version
dlt 1.3.0
Describe the problem
I encountered an issue when using the JSONResponseCursorPaginator class in rest_client for pagination requests while interacting with Zoom's API. The
update_state()
method is implemented as follows:dlt/dlt/sources/helpers/rest_client/paginators.py
Lines 651 to 654 in 75ae23f
The problem occurs when values is equal to
[""]
, resulting in self._next_reference being set to""
instead of None. This leads to pagination requests continuing to the next page, whereas I expect it to be None to stop further requests.Expected behavior
The expected behavior is for
self._next_reference
to be set to None when values is[""]
, thus preventing further pagination requests. This matches the anticipated termination condition logic.Steps to reproduce
JSONResponseCursorPaginator
to implement pagination requests.[""]
, observe the pagination behavior.self._next_reference
is set to""
instead of None.Operating system
Linux
Runtime environment
Kubernetes
Python version
3.11
dlt data source
ZOOM api, e.g. GET /users
dlt destination
Snowflake
Other deployment details
No response
Additional information
I plan to submit a PR to address this issue.
The text was updated successfully, but these errors were encountered: