Skip to content

Commit

Permalink
🐛 Source Amazon Ads: define primary_key for all report streams (#15469)
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr authored Aug 10, 2022
1 parent c1a0cbc commit 6e1a76f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- name: Amazon Ads
sourceDefinitionId: c6b0a29e-1da9-4512-9002-7bfd0cba2246
dockerRepository: airbyte/source-amazon-ads
dockerImageTag: 0.1.11
dockerImageTag: 0.1.12
documentationUrl: https://docs.airbyte.io/integrations/sources/amazon-ads
icon: amazonads.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-amazon-ads:0.1.11"
- dockerImage: "airbyte/source-amazon-ads:0.1.12"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/amazon-ads"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.11
LABEL io.airbyte.version=0.1.12
LABEL io.airbyte.name=airbyte/source-amazon-ads
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tests:
future_state_path: "integration_tests/abnormal_state.json"
cursor_paths:
sponsored_products_report_stream: ["1861552880916640", "reportDate"]
timeout_seconds: 2400
full_refresh:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ class SponsoredProductsReportStream(ReportStream):
https://advertising.amazon.com/API/docs/en-us/sponsored-products/2-0/openapi#/Reports
"""

primary_key = ["profileId", "recordType", "reportDate", "updatedAt"]

def report_init_endpoint(self, record_type: str) -> str:
return f"/v2/sp/{record_type}/report"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ReportStream(BasicAmazonAdsStream, ABC):
Common base class for report streams
"""

primary_key = None
primary_key = ["profileId", "recordType", "reportDate", "updatedAt"]
# Amazon ads updates the data for the next 3 days
LOOK_BACK_WINDOW = 3
# (Service limits section)
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/amazon-ads.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Information about expected report generation waiting time you may find [here](ht

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

0 comments on commit 6e1a76f

Please sign in to comment.