diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/metadata.yaml b/airbyte-integrations/connectors/source-amazon-seller-partner/metadata.yaml index e6a6b883ff35c..8c486641bdb44 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/metadata.yaml +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/metadata.yaml @@ -15,7 +15,7 @@ data: connectorSubtype: api connectorType: source definitionId: e55879a8-0ef8-4557-abcf-ab34c53ec460 - dockerImageTag: 3.1.0 + dockerImageTag: 3.2.0 dockerRepository: airbyte/source-amazon-seller-partner documentationUrl: https://docs.airbyte.com/integrations/sources/amazon-seller-partner githubIssueLabel: source-amazon-seller-partner diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT.json b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT.json index 079d303f3971b..98afa6df8bc89 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT.json +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT.json @@ -4,50 +4,27 @@ "type": "object", "$schema": "http://json-schema.org/draft-07/schema#", "properties": { - "netPureProductMarginAggregate": { - "type": ["null", "array"], - "items": { - "type": ["object"] - }, - "properties": { - "startDate": { - "type": ["null", "string"], - "format": "date" - }, - "endDate": { - "type": ["null", "string"], - "format": "date" - }, - "netPureProductMargin": { - "type": ["null", "number"] - } - } + "startDate": { + "type": ["null", "string"], + "format": "date" + }, + "endDate": { + "type": ["null", "string"], + "format": "date" }, - "netPureProductMarginByAsin": { - "type": ["null", "array"], - "items": { - "type": ["object"] - }, - "properties": { - "startDate": { - "type": ["null", "string"], - "format": "date" - }, - "endDate": { - "type": ["null", "string"], - "format": "date" - }, - "asin": { - "type": ["null", "string"] - }, - "netPureProductMargin": { - "type": ["null", "number"] - } - } + "asin": { + "type": ["null", "string"] + }, + "netPureProductMargin": { + "type": ["null", "number"] }, "dataEndTime": { "type": ["null", "string"], "format": "date" + }, + "queryEndDate": { + "type": ["null", "string"], + "format": "date" } } } diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_REAL_TIME_INVENTORY_REPORT.json b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_REAL_TIME_INVENTORY_REPORT.json index 6dff239799bbd..37623e3f54878 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_REAL_TIME_INVENTORY_REPORT.json +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_REAL_TIME_INVENTORY_REPORT.json @@ -4,53 +4,27 @@ "type": "object", "$schema": "http://json-schema.org/draft-07/schema#", "properties": { - "reportSpecification": { - "type": ["null", "object"], - "properties": { - "reportType": { - "type": ["null", "string"] - }, - "dataStartTime": { - "type": ["null", "string"], - "format": "date-time" - }, - "dataEndTime": { - "type": ["null", "string"], - "format": "date-time" - }, - "marketplaceIds": { - "type": ["null", "array"], - "items": { - "type": ["string"] - } - } - } + "startTime": { + "type": ["null", "string"], + "format": "date-time" + }, + "endTime": { + "type": ["null", "string"], + "format": "date-time" + }, + "asin": { + "type": ["null", "string"] }, - "reportData": { - "type": ["null", "array"], - "items": { - "type": ["object"] - }, - "properties": { - "startTime": { - "type": ["null", "string"], - "format": "date-time" - }, - "endTime": { - "type": ["null", "string"], - "format": "date-time" - }, - "asin": { - "type": ["null", "string"] - }, - "highlyAvailableInventory": { - "type": ["null", "integer"] - } - } + "highlyAvailableInventory": { + "type": ["null", "integer"] }, "dataEndTime": { "type": ["null", "string"], "format": "date" + }, + "queryEndDate": { + "type": ["null", "string"], + "format": "date" } } } diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_TRAFFIC_REPORT.json b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_TRAFFIC_REPORT.json index bdb05e8b1fe0b..f0fc0eac93649 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_TRAFFIC_REPORT.json +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/schemas/GET_VENDOR_TRAFFIC_REPORT.json @@ -18,6 +18,10 @@ "glanceViews": { "type": ["null", "integer"] }, + "dataEndTime": { + "type": ["null", "string"], + "format": "date" + }, "queryEndDate": { "type": ["null", "string"], "format": "date" diff --git a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py index c0d4afcb3c607..6d2f311f5f3fa 100644 --- a/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py +++ b/airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py @@ -412,14 +412,6 @@ class MerchantListingsReports(MerchantReports): primary_key = "listing-id" -class NetPureProductMarginReport(IncrementalReportsAmazonSPStream): - name = "GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT" - - -class RapidRetailAnalyticsInventoryReport(IncrementalReportsAmazonSPStream): - name = "GET_VENDOR_REAL_TIME_INVENTORY_REPORT" - - class FlatFileOrdersReports(IncrementalReportsAmazonSPStream): """ Field definitions: https://sellercentral.amazon.com/gp/help/help.html?itemID=201648780 @@ -765,6 +757,17 @@ def stream_slices( start_date = end_date_slice +class NetPureProductMarginReport(IncrementalAnalyticsStream): + name = "GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT" + result_key = "netPureProductMarginByAsin" + + +class RapidRetailAnalyticsInventoryReport(IncrementalAnalyticsStream): + name = "GET_VENDOR_REAL_TIME_INVENTORY_REPORT" + result_key = "reportData" + cursor_field = "endTime" + + class BrandAnalyticsMarketBasketReports(IncrementalAnalyticsStream): name = "GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT" result_key = "dataByAsin" diff --git a/docs/integrations/sources/amazon-seller-partner.md b/docs/integrations/sources/amazon-seller-partner.md index 7bcb6d06f3ed8..c482fe18f37be 100644 --- a/docs/integrations/sources/amazon-seller-partner.md +++ b/docs/integrations/sources/amazon-seller-partner.md @@ -153,6 +153,7 @@ Information about rate limits you may find [here](https://developer-docs.amazon. | Version | Date | Pull Request | Subject | |:---------|:-----------|:------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `3.2.0` | 2024-01-26 | [\#34549](https://github.com/airbytehq/airbyte/pull/34549) | Update schemas for vendor analytics streams | | `3.1.0` | 2024-01-17 | [\#34283](https://github.com/airbytehq/airbyte/pull/34283) | Delete deprecated streams | | `3.0.1` | 2023-12-22 | [\#33741](https://github.com/airbytehq/airbyte/pull/33741) | Improve report streams performance | | `3.0.0` | 2023-12-12 | [\#32977](https://github.com/airbytehq/airbyte/pull/32977) | Make all streams incremental |