Skip to content

Commit

Permalink
Source Amazon Seller Partner: remove datetime format from schema (air…
Browse files Browse the repository at this point in the history
…bytehq#7828)

* remove date-time from stream

* bump connector version

* update docs

* improve check connection error msg

* run seed file

* add requirements txt doc

* run format
  • Loading branch information
marcosmarxm authored and schlattk committed Jan 4, 2022
1 parent e396711 commit ddb92fe
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"sourceDefinitionId": "e55879a8-0ef8-4557-abcf-ab34c53ec460",
"name": "Amazon Seller Partner",
"dockerRepository": "airbyte/source-amazon-seller-partner",
"dockerImageTag": "0.2.2",
"dockerImageTag": "0.2.3",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/amazon-seller-partner"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- name: Amazon Seller Partner
sourceDefinitionId: e55879a8-0ef8-4557-abcf-ab34c53ec460
dockerRepository: airbyte/source-amazon-seller-partner
dockerImageTag: 0.2.2
dockerImageTag: 0.2.3
sourceType: api
documentationUrl: https://docs.airbyte.io/integrations/sources/amazon-seller-partner
- name: Amplitude
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-amazon-seller-partner:0.2.2"
- dockerImage: "airbyte/source-amazon-seller-partner:0.2.3"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/amazon-seller-partner"
changelogUrl: "https://docs.airbyte.io/integrations/sources/amazon-seller-partner"
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.2.2
LABEL io.airbyte.version=0.2.3
LABEL io.airbyte.name=airbyte/source-amazon-seller-partner
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-e ../../bases/source-acceptance-test
-e .
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
"type": ["null", "number"]
},
"open-date": {
"type": ["null", "string"],
"format": "date-time"
"type": ["null", "string"]
},
"image-url": {
"type": ["null", "string"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import Any, List, Mapping, Tuple

import boto3
import requests
from airbyte_cdk.logger import AirbyteLogger
from airbyte_cdk.models import ConnectorSpecification, SyncMode
from airbyte_cdk.sources import AbstractSource
Expand Down Expand Up @@ -92,8 +93,9 @@ def check_connection(self, logger: AirbyteLogger, config: Mapping[str, Any]) ->
orders_stream = Orders(**stream_kwargs)
next(orders_stream.read_records(sync_mode=SyncMode.full_refresh))
return True, None
except Exception as e:
return False, e
except StopIteration or requests.exceptions.RequestException as e:
if isinstance(e, StopIteration):
e = "Could not check connection without data for Orders stream. " "Please change value for replication start date field."

def streams(self, config: Mapping[str, Any]) -> List[Stream]:
"""
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/amazon-seller-partner.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Information about rate limits you may find [here](https://github.com/amzn/sellin

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| `0.2.3` | 2021-11-08 | [\#7828](https://github.com/airbytehq/airbyte/pull/7828) | Remove datetime format from all streams |
| `0.2.2` | 2021-11-08 | [\#7752](https://github.com/airbytehq/airbyte/pull/7752) | Change `check_connection` function to use stream Orders |
| `0.2.1` | 2021-09-17 | [\#5248](https://github.com/airbytehq/airbyte/pull/5248) | `Added extra stream support. Updated reports streams logics` |
| `0.2.0` | 2021-08-06 | [\#4863](https://github.com/airbytehq/airbyte/pull/4863) | `Rebuild source with airbyte-cdk` |
Expand Down

0 comments on commit ddb92fe

Please sign in to comment.