Skip to content

Commit

Permalink
🎉Source Harvest: Added parent_id for all streams which have parent …
Browse files Browse the repository at this point in the history
…stream (#15221)

Signed-off-by: Sergey Chvalyuk <grubberr@gmail.com>
  • Loading branch information
grubberr authored Aug 10, 2022
1 parent aaa3aae commit e28bc3a
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
- name: Harvest
sourceDefinitionId: fe2b4084-3386-4d3b-9ad6-308f61a6f1e6
dockerRepository: airbyte/source-harvest
dockerImageTag: 0.1.9
dockerImageTag: 0.1.10
documentationUrl: https://docs.airbyte.io/integrations/sources/harvest
icon: harvest.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3547,7 +3547,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-harvest:0.1.9"
- dockerImage: "airbyte/source-harvest:0.1.10"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/harvest"
connectionSpecification:
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-harvest/Dockerfile
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.9
LABEL io.airbyte.version=0.1.10
LABEL io.airbyte.name=airbyte/source-harvest
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"id": {
"type": ["null", "integer"]
},
"parent_id": {
"type": "integer"
},
"amount": {
"type": ["null", "number"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"id": {
"type": ["null", "integer"]
},
"parent_id": {
"type": "integer"
},
"amount": {
"type": ["null", "number"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"id": {
"type": ["null", "integer"]
},
"parent_id": {
"type": "integer"
},
"sent_by": {
"type": ["null", "string"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"id": {
"type": ["null", "integer"]
},
"parent_id": {
"type": "integer"
},
"sent_by": {
"type": ["null", "string"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"id": {
"type": ["null", "integer"]
},
"parent_id": {
"type": "integer"
},
"amount": {
"type": ["null", "number"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
"id": {
"type": ["null", "integer"]
},
"parent_id": {
"type": "integer"
},
"is_project_manager": {
"type": ["null", "boolean"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def request_params(
return params


class HarvestSubStream(HarvestStream):
class HarvestSubStream(HarvestStream, ABC):
@property
@abstractmethod
def path_template(self) -> str:
Expand All @@ -124,6 +124,11 @@ def stream_slices(self, **kwargs) -> Iterable[Optional[Mapping[str, any]]]:
def path(self, stream_slice: Optional[Mapping[str, Any]] = None, **kwargs) -> str:
return self.path_template.format(parent_id=stream_slice["parent_id"])

def parse_response(self, response: requests.Response, stream_slice: Mapping[str, Any] = None, **kwargs) -> Iterable[Mapping]:
for record in super().parse_response(response, stream_slice=stream_slice, **kwargs):
record["parent_id"] = stream_slice["parent_id"]
yield record


class Contacts(IncrementalHarvestStream):
"""
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/harvest.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ The Harvest connector will gracefully handle rate limits. For more information,

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.1.10 | 2022-08-08 | [15221](https://github.com/airbytehq/airbyte/pull/15221) | Added `parent_id` for all streams which have parent stream |
| 0.1.9 | 2022-08-04 | [15312](https://github.com/airbytehq/airbyte/pull/15312) | Fix `started_time` and `ended_time` format schema error and updated report slicing |
| 0.1.8 | 2021-12-14 | [8429](https://github.com/airbytehq/airbyte/pull/8429) | Update titles and descriptions |
| 0.1.6 | 2021-11-14 | [7952](https://github.com/airbytehq/airbyte/pull/7952) | Implement OAuth 2.0 support |
Expand Down

0 comments on commit e28bc3a

Please sign in to comment.