Skip to content

Commit

Permalink
Source freshdesk: deduplicate table names (#22164)
Browse files Browse the repository at this point in the history
* #1339 source freshdesk: deduplicate table names

* #1339 source freshdesk: upd changelog

* #1339 source freshdeskL upd expected records

* #1339 source freshdesk: upd expected records

* #1339 source freshdesk - updated expected records

* auto-bump connector version

---------

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
davydov-d and octavia-squidington-iii authored Feb 6, 2023
1 parent e6441bf commit a6c310c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@
- name: Freshdesk
sourceDefinitionId: ec4b9503-13cb-48ab-a4ab-6ade4be46567
dockerRepository: airbyte/source-freshdesk
dockerImageTag: 2.0.1
dockerImageTag: 3.0.0
documentationUrl: https://docs.airbyte.com/integrations/sources/freshdesk
icon: freshdesk.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4514,7 +4514,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
- dockerImage: "airbyte/source-freshdesk:2.0.1"
- dockerImage: "airbyte/source-freshdesk:3.0.0"
spec:
documentationUrl: "https://docs.airbyte.com/integrations/sources/freshdesk"
connectionSpecification:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ COPY source_freshdesk ./source_freshdesk
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=2.0.1
LABEL io.airbyte.version=3.0.0
LABEL io.airbyte.name=airbyte/source-freshdesk

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"time_zone": {
"type": ["null", "string"]
},
"business_hours": {
"working_hours": {
"type": ["null", "object"],
"properties": {
"monday": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def read_records(
sync_mode=sync_mode, cursor_field=cursor_field, stream_slice=stream_slice, stream_state=stream_state
)

def parse_response(self, response: requests.Response, **kwargs) -> Iterable[Mapping]:
def parse_response(self, response: requests.Response, **kwargs) -> Iterable[MutableMapping]:
if self.forbidden_stream:
return []
return response.json() or []
Expand Down Expand Up @@ -156,6 +156,11 @@ class BusinessHours(FreshdeskStream):
def path(self, **kwargs) -> str:
return "business_hours"

def parse_response(self, response: requests.Response, **kwargs) -> Iterable[MutableMapping]:
for record in super().parse_response(response, **kwargs):
record["working_hours"] = record.pop("business_hours", None)
yield record


class CannedResponseFolders(FreshdeskStream):
def path(self, **kwargs) -> str:
Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion docs/integrations/sources/freshdesk.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ The Freshdesk connector should not run into Freshdesk API limitations under norm

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:--------------------------------------------------------------------------------------|
| 2.0.1 | 2023-01-27 | [21888](https://github.com/airbytehq/airbyte/pull/21888) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| 3.0.0 | 2023-01-31 | [22164](https://github.com/airbytehq/airbyte/pull/22164) | Rename nested `business_hours` table to `working_hours` |
| 2.0.1 | 2023-01-27 | [21888](https://github.com/airbytehq/airbyte/pull/21888) | Set `AvailabilityStrategy` for streams explicitly to `None` |
| 2.0.0 | 2022-12-20 | [20416](https://github.com/airbytehq/airbyte/pull/20416) | Fix `SlaPolicies` stream schema |
| 1.0.0 | 2022-11-16 | [19496](https://github.com/airbytehq/airbyte/pull/19496) | Fix `Contacts` stream schema |
| 0.3.8 | 2022-11-11 | [19349](https://github.com/airbytehq/airbyte/pull/19349) | Do not rely on response.json() when deciding to retry a request |
Expand Down

0 comments on commit a6c310c

Please sign in to comment.