-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Source Google Ads: make streams incremental #10315
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
Merged
augan-rymkhan
merged 8 commits into
master
from
arymkhan/google-ads-enable-incremental-stream
Feb 16, 2022
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a6c0e7c
make streams as incremental
Augan93 0b8b985
refactor Source
Augan93 063979d
fix typing
Augan93 b7fba06
fix primary_key
Augan93 9a22900
fix primary key in configured_catalog
Augan93 9fd4123
bump the version
Augan93 407a3cc
fix primary key in catalog
Augan93 9bf1c0e
updated spec and def yaml
Augan93 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,6 +94,10 @@ | |
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"segments.date": { | ||
"type": ["null", "string"], | ||
"format": "date" | ||
} | ||
} | ||
} |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,36 +215,36 @@ def get_query(self, stream_slice: Mapping[str, Any] = None) -> str: | |
return query | ||
|
||
|
||
class Accounts(GoogleAdsStream): | ||
class Accounts(IncrementalGoogleAdsStream): | ||
""" | ||
Accounts stream: https://developers.google.com/google-ads/api/fields/v8/customer | ||
""" | ||
|
||
primary_key = "customer.id" | ||
primary_key = ["customer.id", "segments.date"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all incremental streams must be updated |
||
|
||
|
||
class Campaigns(GoogleAdsStream): | ||
class Campaigns(IncrementalGoogleAdsStream): | ||
""" | ||
Campaigns stream: https://developers.google.com/google-ads/api/fields/v8/campaign | ||
""" | ||
|
||
primary_key = "campaign.id" | ||
primary_key = ["campaign.id", "segments.date"] | ||
|
||
|
||
class AdGroups(GoogleAdsStream): | ||
class AdGroups(IncrementalGoogleAdsStream): | ||
""" | ||
AdGroups stream: https://developers.google.com/google-ads/api/fields/v8/ad_group | ||
""" | ||
|
||
primary_key = "ad_group.id" | ||
primary_key = ["ad_group.id", "segments.date"] | ||
|
||
|
||
class AdGroupAds(GoogleAdsStream): | ||
class AdGroupAds(IncrementalGoogleAdsStream): | ||
""" | ||
AdGroups stream: https://developers.google.com/google-ads/api/fields/v8/ad_group_ad | ||
""" | ||
|
||
primary_key = "ad_group_ad.ad.id" | ||
primary_key = ["ad_group_ad.ad.id", "segments.date"] | ||
|
||
|
||
class AccountPerformanceReport(IncrementalGoogleAdsStream): | ||
|
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.
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 here as well