-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Source google ads: fix for page token expired #9608
Source google ads: fix for page token expired #9608
Conversation
/test connector=connectors/source-google-ads
|
/test connector=connectors/source-google-ads
|
airbyte-integrations/connectors/source-google-ads/source_google_ads/streams.py
Outdated
Show resolved
Hide resolved
days_of_data_storage = 90 | ||
range_days = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And description of this overriding of the value coul be usefel as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before the changes provided in this PR, in the class ClickView
time_unit
was overriden with "days" and
start_date = start_date.add(**{time_unit: 1})
, the final result means start_date.add(days=1)
So, to save the behaviour, I just set range_days
to 1.
@augan-rymkhan can you also include the root cause in the PR description or in a source code comment (even better) to help retain this knowledge? |
…en-expired' into arymkhan/fix-google-ads-page-token-expired
Codecov Report
@@ Coverage Diff @@
## master #9608 +/- ##
=========================================
Coverage ? 66.55%
=========================================
Files ? 5
Lines ? 293
Branches ? 0
=========================================
Hits ? 195
Misses ? 98
Partials ? 0 Continue to review full report at Codecov.
|
/publish connector=connectors/source-google-ads
|
What
Resolves page token expired issue provided in On-Call issue #103
Stream slice's date range is 1 month, if it takes more than 2 hour to process all the records from the given slice, next page tokens which records are being retrieved will be expired.
For example:
Slice start: 01.01.2022
Slice end: 30.01.2022
page_size
= 1000Within 2 hours it has read 2 000 000 records (2000 pages).
After that time it tries to read page number 2001, but page tokens are expired already.
The solution: reduce the slice's date range
The similar issue was discussed in the following links:
How
Reduce slice range up to 15 days.
Date range is set to 15 days for each slice, because for
conversion_window_days
default value is 14. Range less than 15 days will break the integration tests.Recommended reading order
source_google_ads/streams.py
unit_tests/test_google_ads.py
unit_tests/test_source.py