Skip to content

Commit 7892328

Browse files
artem1205KimPlv
andauthored
Source Bing Ads: add new properties for stream keyword_performance_report (#37545)
Signed-off-by: Artem Inzhyyants <[email protected]> Co-authored-by: KimPlv <[email protected]>
1 parent bf82168 commit 7892328

15 files changed

+603
-159
lines changed

airbyte-integrations/connectors/source-bing-ads/integration_tests/expected_records.jsonl

+3-3
Large diffs are not rendered by default.

airbyte-integrations/connectors/source-bing-ads/metadata.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ data:
1212
- api.ads.microsoft.com
1313
- clientcenter.api.bingads.microsoft.com
1414
connectorBuildOptions:
15-
baseImage: docker.io/airbyte/python-connector-base:1.1.0@sha256:bd98f6505c6764b1b5f99d3aedc23dfc9e9af631a62533f60eb32b1d3dbab20c
15+
baseImage: docker.io/airbyte/python-connector-base:1.2.0@sha256:c22a9d97464b69d6ef01898edf3f8612dc11614f05a84984451dde195f337db9
1616
connectorSubtype: api
1717
connectorType: source
1818
definitionId: 47f25999-dd5e-4636-8c39-e7cea2453331
19-
dockerImageTag: 2.5.0
19+
dockerImageTag: 2.6.0
2020
dockerRepository: airbyte/source-bing-ads
2121
documentationUrl: https://docs.airbyte.com/integrations/sources/bing-ads
2222
githubIssueLabel: source-bing-ads

airbyte-integrations/connectors/source-bing-ads/poetry.lock

+381-96
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

airbyte-integrations/connectors/source-bing-ads/pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
33
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
6-
version = "2.5.0"
6+
version = "2.6.0"
77
name = "source-bing-ads"
88
description = "Source implementation for Bing Ads."
99
authors = [ "Airbyte <[email protected]>",]

airbyte-integrations/connectors/source-bing-ads/source_bing_ads/schemas/keyword_performance_report.json

+48
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,54 @@
174174
},
175175
"RevenuePerAssist": {
176176
"type": ["null", "number"]
177+
},
178+
"CampaignStatus": {
179+
"type": ["null", "string"]
180+
},
181+
"TopImpressionRatePercent": {
182+
"type": ["null", "number"]
183+
},
184+
"AdGroupStatus": {
185+
"type": ["null", "string"]
186+
},
187+
"TrackingTemplate": {
188+
"type": ["null", "string"]
189+
},
190+
"BidStrategyType": {
191+
"type": ["null", "string"]
192+
},
193+
"AccountStatus": {
194+
"type": ["null", "string"]
195+
},
196+
"FinalUrl": {
197+
"type": ["null", "string"]
198+
},
199+
"AdType": {
200+
"type": ["null", "string"]
201+
},
202+
"KeywordLabels": {
203+
"type": ["null", "string"]
204+
},
205+
"FinalMobileUrl": {
206+
"type": ["null", "string"]
207+
},
208+
"Goal": {
209+
"type": ["null", "string"]
210+
},
211+
"GoalType": {
212+
"type": ["null", "string"]
213+
},
214+
"AbsoluteTopImpressionRatePercent": {
215+
"type": ["null", "number"]
216+
},
217+
"BaseCampaignId": {
218+
"type": ["null", "integer"]
219+
},
220+
"AccountNumber": {
221+
"type": ["null", "string"]
222+
},
223+
"DestinationUrl": {
224+
"type": ["null", "string"]
177225
}
178226
}
179227
}

airbyte-integrations/connectors/source-bing-ads/source_bing_ads/schemas/keyword_performance_report_daily.json

+48
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,54 @@
185185
},
186186
"RevenuePerAssist": {
187187
"type": ["null", "number"]
188+
},
189+
"CampaignStatus": {
190+
"type": ["null", "string"]
191+
},
192+
"TopImpressionRatePercent": {
193+
"type": ["null", "number"]
194+
},
195+
"AdGroupStatus": {
196+
"type": ["null", "string"]
197+
},
198+
"TrackingTemplate": {
199+
"type": ["null", "string"]
200+
},
201+
"BidStrategyType": {
202+
"type": ["null", "string"]
203+
},
204+
"AccountStatus": {
205+
"type": ["null", "string"]
206+
},
207+
"FinalUrl": {
208+
"type": ["null", "string"]
209+
},
210+
"AdType": {
211+
"type": ["null", "string"]
212+
},
213+
"KeywordLabels": {
214+
"type": ["null", "string"]
215+
},
216+
"FinalMobileUrl": {
217+
"type": ["null", "string"]
218+
},
219+
"Goal": {
220+
"type": ["null", "string"]
221+
},
222+
"GoalType": {
223+
"type": ["null", "string"]
224+
},
225+
"AbsoluteTopImpressionRatePercent": {
226+
"type": ["null", "number"]
227+
},
228+
"BaseCampaignId": {
229+
"type": ["null", "integer"]
230+
},
231+
"AccountNumber": {
232+
"type": ["null", "string"]
233+
},
234+
"DestinationUrl": {
235+
"type": ["null", "string"]
188236
}
189237
}
190238
}

airbyte-integrations/connectors/source-bing-ads/source_bing_ads/schemas/keyword_performance_report_hourly.json

+48
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,54 @@
175175
},
176176
"RevenuePerAssist": {
177177
"type": ["null", "number"]
178+
},
179+
"CampaignStatus": {
180+
"type": ["null", "string"]
181+
},
182+
"TopImpressionRatePercent": {
183+
"type": ["null", "number"]
184+
},
185+
"AdGroupStatus": {
186+
"type": ["null", "string"]
187+
},
188+
"TrackingTemplate": {
189+
"type": ["null", "string"]
190+
},
191+
"BidStrategyType": {
192+
"type": ["null", "string"]
193+
},
194+
"AccountStatus": {
195+
"type": ["null", "string"]
196+
},
197+
"FinalUrl": {
198+
"type": ["null", "string"]
199+
},
200+
"AdType": {
201+
"type": ["null", "string"]
202+
},
203+
"KeywordLabels": {
204+
"type": ["null", "string"]
205+
},
206+
"FinalMobileUrl": {
207+
"type": ["null", "string"]
208+
},
209+
"Goal": {
210+
"type": ["null", "string"]
211+
},
212+
"GoalType": {
213+
"type": ["null", "string"]
214+
},
215+
"AbsoluteTopImpressionRatePercent": {
216+
"type": ["null", "number"]
217+
},
218+
"BaseCampaignId": {
219+
"type": ["null", "integer"]
220+
},
221+
"AccountNumber": {
222+
"type": ["null", "string"]
223+
},
224+
"DestinationUrl": {
225+
"type": ["null", "string"]
178226
}
179227
}
180228
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
AccountId,CampaignId,AdGroupId,KeywordId,Keyword,AdId,TimePeriod,CurrencyCode,DeliveredMatchType,AdDistribution,DeviceType,Language,Network,DeviceOS,TopVsOther,BidMatchType,AccountName,CampaignName,AdGroupName,KeywordStatus,Impressions,Clicks,Ctr,CurrentMaxCpc,Spend,CostPerConversion,QualityScore,ExpectedCtr,AdRelevance,LandingPageExperience,QualityImpact,Assists,ReturnOnAdSpend,CostPerAssist,CustomParameters,FinalAppUrl,Mainline1Bid,MainlineBid,FirstPageBid,FinalUrlSuffix,ViewThroughConversions,ViewThroughConversionsQualified,AllCostPerConversion,AllReturnOnAdSpend,Conversions,ConversionRate,ConversionsQualified,AverageCpc,AveragePosition,AverageCpm,AllConversions,AllConversionRate,AllRevenue,AllRevenuePerConversion,Revenue,RevenuePerConversion,RevenuePerAssist
2-
180519267,531016227,1356799861840328,84801135055365,connector,84800390693061,2023-11-10T00:00:00+00:00,USD,Phrase,Search,Smartphone,German,Syndicated search partners,Android,Syndicated search partners - Top,Broad,Airbyte,Airbyte test,keywords,Active,1,0,0,2.27,0,,5,2,3,1,0,0,,,,,,1.11,0.35,,0,,,,0,,0,0,0,0,0,,0,,0,,
1+
AccountId,CampaignId,AdGroupId,KeywordId,Keyword,AdId,TimePeriod,CurrencyCode,DeliveredMatchType,AdDistribution,DeviceType,Language,Network,DeviceOS,TopVsOther,BidMatchType,AccountName,CampaignName,AdGroupName,KeywordStatus,Impressions,Clicks,Ctr,CurrentMaxCpc,Spend,CostPerConversion,QualityScore,ExpectedCtr,AdRelevance,LandingPageExperience,QualityImpact,Assists,ReturnOnAdSpend,CostPerAssist,CustomParameters,FinalAppUrl,Mainline1Bid,MainlineBid,FirstPageBid,FinalUrlSuffix,ViewThroughConversions,ViewThroughConversionsQualified,AllCostPerConversion,AllReturnOnAdSpend,Conversions,ConversionRate,ConversionsQualified,AverageCpc,AveragePosition,AverageCpm,AllConversions,AllConversionRate,AllRevenue,AllRevenuePerConversion,Revenue,RevenuePerConversion,RevenuePerAssist,CampaignStatus,TopImpressionRatePercent,AdGroupStatus,TrackingTemplate,BidStrategyType,AccountStatus,FinalUrl,AdType,KeywordLabels,FinalMobileUrl,Goal,GoalType,AbsoluteTopImpressionRatePercent,BaseCampaignId,AccountNumber,DestinationUrl
2+
180519267,531016227,1356799861840328,84801135055365,connector,84800390693061,2023-11-10T00:00:00+00:00,USD,Phrase,Search,Smartphone,German,Syndicated search partners,Android,Syndicated search partners - Top,Broad,Airbyte,Airbyte test,keywords,Active,1,0,0,2.27,0,,5,2,3,1,0,0,,,,,,1.11,0.35,,0,,,,0,,0,0,0,0,0,,0,,0,,,Active,,Active,,Enhanced CPC,Active,https://landing.hello.com/en/email-marketing-service/,Responsive ad,Email_Marketing,,,,,278665388,B0149SGJ,

airbyte-integrations/connectors/source-bing-ads/unit_tests/hourly_reports/keyword_performance_records.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,22 @@
5656
"TimePeriod": "2023-11-10T00:00:00+00:00",
5757
"TopVsOther": "Syndicated search partners - Top",
5858
"ViewThroughConversions": "0",
59-
"ViewThroughConversionsQualified": null
59+
"ViewThroughConversionsQualified": null,
60+
"CampaignStatus": "Active",
61+
"TopImpressionRatePercent": null,
62+
"AdGroupStatus": "Active",
63+
"TrackingTemplate": null,
64+
"BidStrategyType": "Enhanced CPC",
65+
"AccountStatus": "Active",
66+
"FinalUrl": "https://landing.hello.com/en/email-marketing-service/",
67+
"AdType": "Responsive ad",
68+
"KeywordLabels": "Email_Marketing",
69+
"FinalMobileUrl": null,
70+
"Goal": null,
71+
"GoalType": null,
72+
"AbsoluteTopImpressionRatePercent": null,
73+
"BaseCampaignId": "278665388",
74+
"AccountNumber": "B0149SGJ",
75+
"DestinationUrl": null
6076
}
6177
]

airbyte-integrations/connectors/source-bing-ads/unit_tests/integrations/config_builder.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
22

3-
import datetime
4-
from typing import Any, Dict, List
3+
from typing import Any, Dict
54

65
from airbyte_cdk.test.mock_http.response_builder import find_template
76

airbyte-integrations/connectors/source-bing-ads/unit_tests/integrations/test_report_stream.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def _config(self) -> dict[str, Any]:
2525
def _download_file(self, file: Optional[str] = None) -> Path:
2626
"""
2727
Returns path to temporary file of downloaded data that will be use in read.
28-
Base file should be named as {file_name}.cvs in resource/response folder.
28+
Base file should be named as {file_name}.csv in resource/response folder.
2929
"""
3030
if file:
3131
path_to_tmp_file = Path(__file__).parent.parent / f"resource/response/{file}.csv"

0 commit comments

Comments
 (0)