-
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 Bing Ads: Add Report streams #5750
Changes from all commits
0cf147b
6df7000
ca549ef
4648166
04cba0b
9588051
cbea441
0e6fc48
986a505
d31e2c0
d8b0923
94beee7
5f17a53
66d69d5
96bac88
071ade4
e992852
1af74dc
e1c17c0
f6c7383
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
## Core streams | ||
|
||
Bing Ads is a SOAP based API. Connector is implemented with [SDK](https://github.com/BingAds/BingAds-Python-SDK) library | ||
|
||
Connector has such core streams, and all of them support full refresh only: | ||
* [Account](https://docs.microsoft.com/en-us/advertising/customer-management-service/advertiseraccount?view=bingads-13) | ||
* [Campaign](https://docs.microsoft.com/en-us/advertising/campaign-management-service/campaign?view=bingads-13) | ||
* [AdGroup](https://docs.microsoft.com/en-us/advertising/campaign-management-service/getadgroupsbycampaignid?view=bingads-13) | ||
* [Ad](https://docs.microsoft.com/en-us/advertising/campaign-management-service/getadsbyadgroupid?view=bingads-13) | ||
|
||
|
||
## Report streams | ||
|
||
Connector also has report streams, which support incremental sync. | ||
|
||
* [AccountPerformanceReport](https://docs.microsoft.com/en-us/advertising/reporting-service/accountperformancereportrequest?view=bingads-13) | ||
* [AdPerformanceReport](https://docs.microsoft.com/en-us/advertising/reporting-service/adperformancereportrequest?view=bingads-13) | ||
* [AdGroupPerformanceReport](https://docs.microsoft.com/en-us/advertising/reporting-service/adgroupperformancereportrequest?view=bingads-13) | ||
* [CampaignPerformanceReport](https://docs.microsoft.com/en-us/advertising/reporting-service/campaignperformancereportrequest?view=bingads-13) | ||
* [BudgetSummaryReport](https://docs.microsoft.com/en-us/advertising/reporting-service/budgetsummaryreportrequest?view=bingads-13) | ||
* [KeywordPerformanceReport](https://docs.microsoft.com/en-us/advertising/reporting-service/keywordperformancereportrequest?view=bingads-13) | ||
|
||
To be able to pull report data you need to generate 2 separate requests. | ||
|
||
* [First](https://docs.microsoft.com/en-us/advertising/reporting-service/submitgeneratereport?view=bingads-13) - to request appropriate report | ||
|
||
* [Second](https://docs.microsoft.com/en-us/advertising/reporting-service/pollgeneratereport?view=bingads-13) - to poll acatual data. Report download timeout is 5 min | ||
|
||
Initially all fields in report streams have string values, connector uses `reports.REPORT_FIELD_TYPES` collection to transform values to numerical fields if possible | ||
|
||
Connector uses `reports_start_date` config for initial reports sync and current date as an end data. | ||
|
||
Connector has `hourly_reports`, `daily_reports`, `weekly_reports`, `monthly_reports` configs which allows to enable appropriate report streams. For example `account_performance_report_daily`, `ad_group_performance_report_daily` etc ... By default all report streams are disabled | ||
|
||
## Request caching | ||
|
||
Based on [library](https://vcrpy.readthedocs.io/en/latest/) | ||
|
||
Connector uses caching for these streams: | ||
|
||
* Account | ||
* Campaign | ||
* AdGroup |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"accounts": { "type": "all" }, | ||
"accounts": { "selection_strategy": "all" }, | ||
"user_id": "2222", | ||
"customer_id": "1111", | ||
"developer_token": "asgag4gwag3", | ||
"refresh_token": "as2Ggas23gsa236gasgaskjfhas7i8ygf78as7osa7gy87asg8as7tg6as", | ||
"client_secret": "1234", | ||
"client_id": "123" | ||
"client_id": "123", | ||
"reports_start_date": "2018-11-13", | ||
"hourly_reports": true, | ||
"daily_reports": false, | ||
"weekly_reports": false, | ||
"monthly_reports": true | ||
Comment on lines
+10
to
+13
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. best coverage here would be testing all of these, any reason not to? (it doesn't need to block this PR, a separate issue maybe?) 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. it's an invalid config, actual config stored in github secrets. I think we can update secret even without an issue |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"keyword_performance_report_hourly": { | ||
"180278106": { | ||
"TimePeriod": 1627820152 | ||
} | ||
}, | ||
"budget_summary_report_hourly": { | ||
"180278106": { | ||
"Date": 1627800152 | ||
} | ||
}, | ||
"ad_performance_report_hourly": { | ||
"180278106": { | ||
"TimePeriod": 1627795152 | ||
} | ||
}, | ||
"campaign_performance_report_hourly": { | ||
"180278106": { | ||
"TimePeriod": 1727810152 | ||
} | ||
} | ||
} |
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.
looks like there is an open issue for this on BingAds-Python-SDK repo.
Might be worth adding a link to that with a note to update the bingads lib version and remove this step in gradle once it is resolved
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.
hey, Phlair. Will this problem be solved by upgrade bing ads version?