diff --git a/airbyte-integrations/connectors/source-amazon-ads/Dockerfile b/airbyte-integrations/connectors/source-amazon-ads/Dockerfile index 7ef8dda835a0..7a1e8e2d82ab 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/Dockerfile +++ b/airbyte-integrations/connectors/source-amazon-ads/Dockerfile @@ -13,5 +13,5 @@ ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=3.1.2 +LABEL io.airbyte.version=3.2.0 LABEL io.airbyte.name=airbyte/source-amazon-ads diff --git a/airbyte-integrations/connectors/source-amazon-ads/integration_tests/expected_records.jsonl b/airbyte-integrations/connectors/source-amazon-ads/integration_tests/expected_records.jsonl index 2c0ce04ab232..bf609dee5420 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/integration_tests/expected_records.jsonl +++ b/airbyte-integrations/connectors/source-amazon-ads/integration_tests/expected_records.jsonl @@ -47,7 +47,7 @@ {"stream":"sponsored_display_product_ads","data":{"adId":103527738992867,"adGroupId":239470166910761,"campaignId":25934734632378,"asin":"B000BNT386","state":"enabled"},"emitted_at":1659020219614} {"stream":"sponsored_display_product_ads","data":{"adId":195948665185008,"adGroupId":239470166910761,"campaignId":25934734632378,"asin":"B000BNQBOA","state":"enabled"},"emitted_at":1659020219614} {"stream":"sponsored_display_product_ads","data":{"adId":130802512011075,"adGroupId":239470166910761,"campaignId":25934734632378,"asin":"B091G1HT4P","state":"enabled"},"emitted_at":1659020219614} -{"stream":"sponsored_display_targetings","data":{"adGroupId":239470166910761,"bid":0.4,"expression":[{"type":"similarProduct"}],"expressionType":"auto","resolvedExpression":[{"type":"similarProduct"}],"state":"enabled","targetId":124150067548052},"emitted_at":1659020220625} +{"stream":"sponsored_display_targetings","data":{"adGroupId":239470166910761,"bid":0.4,"expression":[{"type":"similarProduct"}],"expressionType":"auto","resolvedExpression":[{"type":"similarProduct"}],"state":"enabled","targetId":124150067548052,"campaignId": 25934734632378},"emitted_at":1659020220625} {"stream":"sponsored_product_campaigns","data":{"campaignId":39413387973397,"name":"Test campaging for profileId 1861552880916640","campaignType":"sponsoredProducts","targetingType":"manual","premiumBidAdjustment":true,"dailyBudget":10,"ruleBasedBudget":{"isProcessing":false},"startDate":"20220705","endDate":"20220712","state":"paused","bidding":{"strategy":"legacyForSales","adjustments":[{"predicate":"placementTop","percentage":50}]},"tags":{"PONumber":"examplePONumber","accountManager":"exampleAccountManager"}},"emitted_at":1687524797996} {"stream":"sponsored_product_campaigns","data":{"campaignId":135264288913079,"name":"Campaign - 7/5/2022 18:14:02","campaignType":"sponsoredProducts","targetingType":"auto","premiumBidAdjustment":false,"dailyBudget":10,"startDate":"20220705","state":"enabled","bidding":{"strategy":"legacyForSales","adjustments":[]},"portfolioId":270076898441727},"emitted_at":1687524798170} {"stream":"sponsored_product_campaigns","data":{"campaignId":191249325250025,"name":"Campaign - 7/8/2022 13:57:48","campaignType":"sponsoredProducts","targetingType":"auto","premiumBidAdjustment":true,"dailyBudget":50,"ruleBasedBudget":{"isProcessing":false},"startDate":"20220708","state":"enabled","bidding":{"strategy":"legacyForSales","adjustments":[{"predicate":"placementProductPage","percentage":100},{"predicate":"placementTop","percentage":100}]},"portfolioId":253945852845204},"emitted_at":1687524798171} diff --git a/airbyte-integrations/connectors/source-amazon-ads/metadata.yaml b/airbyte-integrations/connectors/source-amazon-ads/metadata.yaml index db39fb196fbe..517408077b88 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/metadata.yaml +++ b/airbyte-integrations/connectors/source-amazon-ads/metadata.yaml @@ -8,7 +8,7 @@ data: connectorSubtype: api connectorType: source definitionId: c6b0a29e-1da9-4512-9002-7bfd0cba2246 - dockerImageTag: 3.1.2 + dockerImageTag: 3.2.0 dockerRepository: airbyte/source-amazon-ads githubIssueLabel: source-amazon-ads icon: amazonads.svg @@ -20,6 +20,13 @@ data: oss: enabled: true releaseStage: generally_available + suggestedStreams: + streams: + - profiles + - sponsored_brands_video_report_stream + - sponsored_display_report_stream + - sponsored_brands_report_stream + - sponsored_products_report_stream documentationUrl: https://docs.airbyte.com/integrations/sources/amazon-ads tags: - language:python diff --git a/airbyte-integrations/connectors/source-amazon-ads/setup.py b/airbyte-integrations/connectors/source-amazon-ads/setup.py index 13b317863d0e..7d612fffeaaa 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/setup.py +++ b/airbyte-integrations/connectors/source-amazon-ads/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup -MAIN_REQUIREMENTS = ["airbyte-cdk~=0.16", "requests_oauthlib~=1.3.1", "pendulum~=2.1.2"] +MAIN_REQUIREMENTS = ["airbyte-cdk", "requests_oauthlib~=1.3.1", "pendulum~=2.1.2"] TEST_REQUIREMENTS = [ "requests-mock~=1.9.3", diff --git a/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/attribution_report.py b/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/attribution_report.py index 6aea054ea703..b7b3e89c5a79 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/attribution_report.py +++ b/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/attribution_report.py @@ -2,6 +2,8 @@ # Copyright (c) 2023 Airbyte, Inc., all rights reserved. # +from typing import Optional + from .common import CatalogModel @@ -9,14 +11,14 @@ class AttributionReportModel(CatalogModel): date: str brandName: str marketplace: str - campaignId: str + campaignId: Optional[str] productAsin: str productConversionType: str advertiserName: str - adGroupId: str - creativeId: str + adGroupId: Optional[str] + creativeId: Optional[str] productName: str productCategory: str productSubcategory: str productGroup: str - publisher: str + publisher: Optional[str] diff --git a/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_brands.py b/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_brands.py index 510d2492d7b2..dba006e1b156 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_brands.py +++ b/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_brands.py @@ -3,11 +3,29 @@ # from decimal import Decimal -from typing import Dict +from typing import Dict, List, Optional from .common import CatalogModel +class LandingPage(CatalogModel): + pageType: str + url: str + + +class BidAdjustment(CatalogModel): + bidAdjustmentPredicate: str + bidAdjustmentPercent: int + + +class Creative(CatalogModel): + brandName: str + brandLogoAssetID: str + brandLogoUrl: str + asins: List[str] + shouldOptimizeAsins: bool + + class BrandsCampaign(CatalogModel): campaignId: Decimal name: str @@ -23,9 +41,14 @@ class BrandsCampaign(CatalogModel): bidOptimization: bool = None bidMultiplier: Decimal = None adFormat: str + bidAdjustments: Optional[List[BidAdjustment]] + creative: Optional[Creative] + landingPage: Optional[LandingPage] + supplySource: Optional[str] class BrandsAdGroup(CatalogModel): campaignId: Decimal adGroupId: Decimal name: str + bid: int diff --git a/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_display.py b/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_display.py index ffaf34b72e06..51caba0c11c1 100644 --- a/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_display.py +++ b/airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/schemas/sponsored_display.py @@ -43,6 +43,7 @@ class DisplayProductAds(CatalogModel): class DisplayTargeting(Targeting): + campaignId: Decimal expression: List[Dict[str, str]] resolvedExpression: List[Dict[str, str]] @@ -72,7 +73,7 @@ class DisplayBudgetRuleDetailsDurationEventTypeRuleDuration(CatalogModel): class DisplayBudgetRuleDetailsDurationDateRangeTypeRuleDuration(CatalogModel): - endDate: str + endDate: Optional[str] startDate: str @@ -94,7 +95,7 @@ class DisplayBudgetRules(CatalogModel): ruleId: str ruleStatus: str ruleState: str - lastUpdatedDate: Decimal + lastUpdatedDate: Optional[Decimal] createdDate: Decimal ruleDetails: DisplayBudgetRuleDetails = None ruleStatusDetails: Dict[str, str] = None diff --git a/docs/integrations/sources/amazon-ads.md b/docs/integrations/sources/amazon-ads.md index 746abd65e84b..25dc221cdb6b 100644 --- a/docs/integrations/sources/amazon-ads.md +++ b/docs/integrations/sources/amazon-ads.md @@ -109,6 +109,7 @@ Information about expected report generation waiting time you may find [here](ht | Version | Date | Pull Request | Subject | |:--------|:-----------|:---------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------| +| 3.2.0 | 2023-09-18 | [30517](https://github.com/airbytehq/airbyte/pull/30517) | Add suggested streams; fix unexpected column issue | | 3.1.2 | 2023-08-16 | [29233](https://github.com/airbytehq/airbyte/pull/29233) | Add filter for Marketplace IDs | | 3.1.1 | 2023-08-28 | [29900](https://github.com/airbytehq/airbyte/pull/29900) | Add 404 handling for no assotiated with bid ad groups | | 3.1.0 | 2023-08-08 | [00000](https://github.com/airbytehq/airbyte/pull/00000) | Add `T00030` tactic support for `sponsored_display_report_stream` |