Skip to content

Commit ca3bbe5

Browse files
authored
Source Amazon Seller Partner: Fix reportPeriod day query params (#36895)
Signed-off-by: Artem Inzhyyants <[email protected]>
1 parent 371af95 commit ca3bbe5

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

airbyte-integrations/connectors/source-amazon-seller-partner/metadata.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data:
1515
connectorSubtype: api
1616
connectorType: source
1717
definitionId: e55879a8-0ef8-4557-abcf-ab34c53ec460
18-
dockerImageTag: 4.2.0
18+
dockerImageTag: 4.2.1
1919
dockerRepository: airbyte/source-amazon-seller-partner
2020
documentationUrl: https://docs.airbyte.com/integrations/sources/amazon-seller-partner
2121
githubIssueLabel: source-amazon-seller-partner

airbyte-integrations/connectors/source-amazon-seller-partner/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 = "4.2.0"
6+
version = "4.2.1"
77
name = "source-amazon-seller-partner"
88
description = "Source implementation for Amazon Seller Partner."
99
authors = ["Airbyte <[email protected]>"]

airbyte-integrations/connectors/source-amazon-seller-partner/source_amazon_seller_partner/streams.py

+1-19
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ def _report_data(
708708
) -> Mapping[str, Any]:
709709
data = super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)
710710
options = self.report_options()
711-
if options and options.get("reportPeriod") is not None:
711+
if options and options.get("reportPeriod"):
712712
data.update(self._augmented_data(options))
713713
return data
714714

@@ -752,24 +752,6 @@ class IncrementalAnalyticsStream(AnalyticsStream):
752752
def cursor_field(self) -> Union[str, List[str]]:
753753
return "endDate"
754754

755-
def _report_data(
756-
self,
757-
sync_mode: SyncMode,
758-
cursor_field: List[str] = None,
759-
stream_slice: Mapping[str, Any] = None,
760-
stream_state: Mapping[str, Any] = None,
761-
) -> Mapping[str, Any]:
762-
data = super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)
763-
if stream_slice:
764-
data_times = {}
765-
if stream_slice.get("dataStartTime"):
766-
data_times["dataStartTime"] = stream_slice["dataStartTime"]
767-
if stream_slice.get("dataEndTime"):
768-
data_times["dataEndTime"] = stream_slice["dataEndTime"]
769-
data.update(data_times)
770-
771-
return data
772-
773755
def parse_response(
774756
self,
775757
response: requests.Response,

docs/integrations/sources/amazon-seller-partner.md

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Information about rate limits you may find [here](https://developer-docs.amazon.
172172

173173
| Version | Date | Pull Request | Subject |
174174
|:---------|:-----------|:-----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
175+
| `4.2.1` | 2024-04-08 | [\#36895](https://github.com/airbytehq/airbyte/pull/36895) | Fix `reportPeriod` day query params |
175176
| `4.2.0` | 2024-03-19 | [\#36267](https://github.com/airbytehq/airbyte/pull/36267) | Pin airbyte-cdk version to `^0` |
176177
| `4.1.0` | 2024-03-12 | [\#35954](https://github.com/airbytehq/airbyte/pull/35954) | Add `GET_VENDOR_FORECASTING_FRESH_REPORT` and `GET_VENDOR_FORECASTING_RETAIL_REPORT` streams |
177178
| `4.0.0` | 2024-02-23 | [\#35439](https://github.com/airbytehq/airbyte/pull/35439) | Update schema for the `GET_FBA_STORAGE_FEE_CHARGES_DATA` stream |

0 commit comments

Comments
 (0)