-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: Implement multiple customer ids for google ads #10150
🎉 Source Google Ads: Implement multiple customer ids for google ads #10150
Conversation
…urochkin/implement-multiple-customer-ids-for-google-ads � Conflicts: � airbyte-integrations/connectors/source-google-ads/source_google_ads/streams.py
/test connector=connectors/source-google-ads
|
Codecov Report
@@ Coverage Diff @@
## master #10150 +/- ##
=========================================
Coverage ? 70.05%
=========================================
Files ? 5
Lines ? 344
Branches ? 0
=========================================
Hits ? 241
Misses ? 103
Partials ? 0 Continue to review full report at Codecov.
|
/test connector=connectors/source-google-ads
|
/test connector=connectors/source-google-ads
|
/test connector=connectors/source-google-ads
|
response = self.google_ads_client.send_request(self.get_query(stream_slice)) | ||
yield from self.parse_response(response) | ||
stream_slice = stream_slice or {} | ||
account_responses = self.google_ads_client.send_request(self.get_query(stream_slice), customer_id=self._customer_id) |
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.
according to your logic customer_id will be None is this acceptable by send_request?
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.
I updated the code a bit, overridden the stream_slices
method for the class responsible for Full Refresh
. Unfortunately, the solution is not very beautiful, but it allows you to avoid redefining the _read_incremental
method for the SourceGoogleAds class, and at the same time be able to get the current customer_id
from any class method (in particular, for the get_updated_state
method).
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.
see my comments
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.
Please, update the PR description properly.
/test connector=connectors/source-google-ads
|
/publish connector=connectors/source-google-ads
|
What
resolves #6437.
How
Updated the
customer_id
field in the specification file so that it is possible to specify multiple Customer IDs separated by commas.Implemented data reading for several
Customer IDs
using thestream_slices
method which is always called before theread_records
method. And also through the class variable_customer_id
, in order to be able to access the currentcustomer_id
from any class method, in particular, to work with the it inget_updated_state
method. Made in such a way as not to override the_read_incremental
method for the SourceGoogleAds class, but to be able to work with thecustomer_id
inside theget_updated_state
method.Recommended reading order
spec.json
y.python
google-ads.md
Dockerfile
Pre-merge Checklist
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described here