Skip to content

Commit 6e1a76f

Browse files
authored
🐛 Source Amazon Ads: define primary_key for all report streams (#15469)
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
1 parent c1a0cbc commit 6e1a76f

File tree

7 files changed

+6
-6
lines changed

7 files changed

+6
-6
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- name: Amazon Ads
1818
sourceDefinitionId: c6b0a29e-1da9-4512-9002-7bfd0cba2246
1919
dockerRepository: airbyte/source-amazon-ads
20-
dockerImageTag: 0.1.11
20+
dockerImageTag: 0.1.12
2121
documentationUrl: https://docs.airbyte.io/integrations/sources/amazon-ads
2222
icon: amazonads.svg
2323
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
supportsNormalization: false
8888
supportsDBT: false
8989
supported_destination_sync_modes: []
90-
- dockerImage: "airbyte/source-amazon-ads:0.1.11"
90+
- dockerImage: "airbyte/source-amazon-ads:0.1.12"
9191
spec:
9292
documentationUrl: "https://docs.airbyte.com/integrations/sources/amazon-ads"
9393
connectionSpecification:

airbyte-integrations/connectors/source-amazon-ads/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ RUN pip install .
1212
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
1313
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1414

15-
LABEL io.airbyte.version=0.1.11
15+
LABEL io.airbyte.version=0.1.12
1616
LABEL io.airbyte.name=airbyte/source-amazon-ads

airbyte-integrations/connectors/source-amazon-ads/acceptance-test-config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ tests:
2929
future_state_path: "integration_tests/abnormal_state.json"
3030
cursor_paths:
3131
sponsored_products_report_stream: ["1861552880916640", "reportDate"]
32+
timeout_seconds: 2400
3233
full_refresh:
3334
- config_path: "secrets/config.json"
3435
configured_catalog_path: "integration_tests/configured_catalog.json"

airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/products_report.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ class SponsoredProductsReportStream(ReportStream):
248248
https://advertising.amazon.com/API/docs/en-us/sponsored-products/2-0/openapi#/Reports
249249
"""
250250

251-
primary_key = ["profileId", "recordType", "reportDate", "updatedAt"]
252-
253251
def report_init_endpoint(self, record_type: str) -> str:
254252
return f"/v2/sp/{record_type}/report"
255253

airbyte-integrations/connectors/source-amazon-ads/source_amazon_ads/streams/report_streams/report_streams.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class ReportStream(BasicAmazonAdsStream, ABC):
8989
Common base class for report streams
9090
"""
9191

92-
primary_key = None
92+
primary_key = ["profileId", "recordType", "reportDate", "updatedAt"]
9393
# Amazon ads updates the data for the next 3 days
9494
LOOK_BACK_WINDOW = 3
9595
# (Service limits section)

docs/integrations/sources/amazon-ads.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Information about expected report generation waiting time you may find [here](ht
9090

9191
| Version | Date | Pull Request | Subject |
9292
|:--------|:-----------|:-----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------|
93+
| 0.1.12 | 2022-08-09 | [15469](https://github.com/airbytehq/airbyte/pull/15469) | Define primary_key for all report streams |
9394
| 0.1.11 | 2022-07-28 | [15031](https://github.com/airbytehq/airbyte/pull/15031) | Improve report streams date-range generation |
9495
| 0.1.10 | 2022-07-26 | [15042](https://github.com/airbytehq/airbyte/pull/15042) | Update `additionalProperties` field to true from schemas |
9596
| 0.1.9 | 2022-05-08 | [12541](https://github.com/airbytehq/airbyte/pull/12541) | Improve documentation for Beta |

0 commit comments

Comments
 (0)