Skip to content
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 new stream AgeGenderAudienceReport #31712

Merged
merged 14 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ acceptance_tests:
tests:
- config_path: secrets/config.json
expect_records:
path: "integration_tests/expected_records.txt"
path: "integration_tests/expected_records.jsonl"
extra_records: yes
empty_streams:
- name: account_performance_report_hourly
Expand All @@ -34,6 +34,8 @@ acceptance_tests:
bypass_reason: "Hourly reports are disabled, because sync is too long"
- name: geographic_performance_report_hourly
bypass_reason: "Hourly reports are disabled, because sync is too long"
- name: age_gender_audience_report_hourly
bypass_reason: "Hourly reports are disabled, because sync is too long"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mention how long is it? We can tweak the timeout_seconds value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description updated; hourly data fetched is limited to 180 days (or even maybe 14 days: found different numbers on 3rd-party sites)

timeout_seconds: 900
full_refresh:
tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,46 @@
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "age_gender_audience_report_daily",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "age_gender_audience_report_weekly",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "age_gender_audience_report_hourly",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
},
{
"stream": {
"name": "age_gender_audience_report_monthly",
"json_schema": {},
"supported_sync_modes": ["incremental", "full_refresh"]
},
"sync_mode": "incremental",
"cursor_field": ["TimePeriod"],
"destination_sync_mode": "append"
}
]
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 47f25999-dd5e-4636-8c39-e7cea2453331
dockerImageTag: 1.0.2
dockerImageTag: 1.1.0
dockerRepository: airbyte/source-bing-ads
documentationUrl: https://docs.airbyte.com/integrations/sources/bing-ads
githubIssueLabel: source-bing-ads
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-bing-ads/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from setuptools import find_packages, setup

MAIN_REQUIREMENTS = ["airbyte-cdk", "bingads~=13.0.13", "vcrpy==4.1.1", "backoff==1.10.0", "pendulum==2.1.2", "urllib3<2.0"]
MAIN_REQUIREMENTS = ["airbyte-cdk", "bingads~=13.0.13", "urllib3<2.0"]

TEST_REQUIREMENTS = [
"requests-mock~=1.9.3",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def get_start_date(self, stream_state: Mapping[str, Any] = None, account_id: str

if self.config.get("lookback_window"):
# Datetime subtract won't work with days = 0
# it'll output an AirbuteError
# it'll output an AirbyteError
return start_date.subtract(days=self.config["lookback_window"])
else:
return start_date
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"AccountId": {
"type": ["null", "integer"]
},
"AgeGroup": {
"type": ["null", "string"]
},
"Gender": {
"type": ["null", "string"]
},
"TimePeriod": {
"type": ["null", "string"]
},
"AllConversions": {
"type": ["null", "integer"]
},
"AccountName": {
"type": ["null", "string"]
},
"AccountNumber": {
"type": ["null", "string"]
},
"CampaignName": {
"type": ["null", "string"]
},
"CampaignId": {
"type": ["null", "integer"]
},
"AdGroupName": {
"type": ["null", "string"]
},
"AdGroupId": {
"type": ["null", "integer"]
},
"AdDistribution": {
"type": ["null", "string"]
},
"Impressions": {
"type": ["null", "integer"]
},
"Clicks": {
"type": ["null", "integer"]
},
"Conversions": {
"type": ["null", "number"]
},
"Spend": {
"type": ["null", "number"]
},
"Revenue": {
"type": ["null", "number"]
},
"ExtendedCost": {
"type": ["null", "number"]
},
"Assists": {
"type": ["null", "integer"]
},
"Language": {
"type": ["null", "string"]
},
"AccountStatus": {
"type": ["null", "string"]
},
"CampaignStatus": {
"type": ["null", "string"]
},
"AdGroupStatus": {
"type": ["null", "string"]
},
"BaseCampaignId": {
"type": ["null", "string"]
},
"AllRevenue": {
"type": ["null", "number"]
},
"ViewThroughConversions": {
"type": ["null", "integer"]
},
"Goal": {
"type": ["null", "string"]
},
"GoalType": {
"type": ["null", "string"]
},
"AbsoluteTopImpressionRatePercent": {
"type": ["null", "string"]
},
"TopImpressionRatePercent": {
"type": ["null", "string"]
},
"ConversionsQualified": {
"type": ["null", "number"]
},
"AllConversionsQualified": {
"type": ["null", "number"]
},
"ViewThroughConversionsQualified": {
"type": ["null", "number"]
},
"ViewThroughRevenue": {
"type": ["null", "number"]
}
}
}
Loading