Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source freshdesk: deduplicate table names #22164

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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