diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 84f08c5f8413..9fc920c75de8 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -1092,7 +1092,7 @@ - name: Zendesk Chat sourceDefinitionId: 40d24d0f-b8f9-4fe0-9e6c-b06c0f3f45e4 dockerRepository: airbyte/source-zendesk-chat - dockerImageTag: 0.1.8 + dockerImageTag: 0.1.9 documentationUrl: https://docs.airbyte.io/integrations/sources/zendesk-chat icon: zendesk.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index 0054d382a820..d80450b762ce 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -10594,7 +10594,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-zendesk-chat:0.1.8" +- dockerImage: "airbyte/source-zendesk-chat:0.1.9" spec: documentationUrl: "https://docs.airbyte.io/integrations/sources/zendesk-chat" connectionSpecification: @@ -10680,7 +10680,6 @@ oauth_config_specification: oauth_user_input_from_connector_config_specification: type: "object" - additionalProperties: false properties: subdomain: type: "string" @@ -10688,7 +10687,6 @@ - "subdomain" complete_oauth_output_specification: type: "object" - additionalProperties: false properties: access_token: type: "string" @@ -10702,7 +10700,6 @@ - "refresh_token" complete_oauth_server_input_specification: type: "object" - additionalProperties: false properties: client_id: type: "string" @@ -10710,7 +10707,6 @@ type: "string" complete_oauth_server_output_specification: type: "object" - additionalProperties: false properties: client_id: type: "string" diff --git a/airbyte-integrations/connectors/source-zendesk-chat/Dockerfile b/airbyte-integrations/connectors/source-zendesk-chat/Dockerfile index fc5a117e99bc..9efaf68d888f 100644 --- a/airbyte-integrations/connectors/source-zendesk-chat/Dockerfile +++ b/airbyte-integrations/connectors/source-zendesk-chat/Dockerfile @@ -16,5 +16,5 @@ RUN pip install . ENTRYPOINT ["python", "/airbyte/integration_code/main_dev.py"] -LABEL io.airbyte.version=0.1.8 +LABEL io.airbyte.version=0.1.9 LABEL io.airbyte.name=airbyte/source-zendesk-chat diff --git a/airbyte-integrations/connectors/source-zendesk-chat/setup.py b/airbyte-integrations/connectors/source-zendesk-chat/setup.py index b1bc9ade254a..019d5ce26896 100644 --- a/airbyte-integrations/connectors/source-zendesk-chat/setup.py +++ b/airbyte-integrations/connectors/source-zendesk-chat/setup.py @@ -11,7 +11,7 @@ "requests==2.25.1", ] -TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock"] +TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock", "requests_mock"] setup( name="source_zendesk_chat", diff --git a/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/schemas/chats.json b/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/schemas/chats.json index ec9f815de63c..aeafed68a73d 100644 --- a/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/schemas/chats.json +++ b/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/schemas/chats.json @@ -73,7 +73,7 @@ } }, "type": ["null", "object"], - "additionalProperties": false + "additionalProperties": true }, "department_id": { "type": ["null", "integer"] @@ -204,7 +204,7 @@ } }, "type": ["null", "object"], - "additionalProperties": false + "additionalProperties": true }, "session": { "properties": { @@ -293,7 +293,7 @@ } }, "type": ["null", "object"], - "additionalProperties": false + "additionalProperties": true }, "webpath": { "items": { @@ -313,7 +313,7 @@ } }, "type": ["null", "object"], - "additionalProperties": false + "additionalProperties": true }, "type": ["null", "array"] }, diff --git a/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/spec.json b/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/spec.json index 2cd0787b8107..671096b5d1ae 100644 --- a/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/spec.json +++ b/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/spec.json @@ -89,7 +89,6 @@ "oauth_config_specification": { "complete_oauth_output_specification": { "type": "object", - "additionalProperties": false, "properties": { "access_token": { "type": "string", @@ -103,7 +102,6 @@ }, "complete_oauth_server_input_specification": { "type": "object", - "additionalProperties": false, "properties": { "client_id": { "type": "string" @@ -115,7 +113,6 @@ }, "complete_oauth_server_output_specification": { "type": "object", - "additionalProperties": false, "properties": { "client_id": { "type": "string", @@ -129,7 +126,6 @@ }, "oauth_user_input_from_connector_config_specification": { "type": "object", - "additionalProperties": false, "properties": { "subdomain": { "type": "string", diff --git a/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/streams.py b/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/streams.py index 1ba4b454f819..670a906dc14a 100644 --- a/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/streams.py +++ b/airbyte-integrations/connectors/source-zendesk-chat/source_zendesk_chat/streams.py @@ -16,7 +16,6 @@ class Stream(HttpStream, ABC): url_base = "https://www.zopim.com/api/v2/" primary_key = "id" - primary_key = None data_field = None limit = 100 @@ -104,6 +103,7 @@ def _field_to_datetime(value: Union[int, str]) -> pendulum.datetime: class TimeIncrementalStream(BaseIncrementalStream, ABC): + state_checkpoint_interval = 1000 def __init__(self, start_date, **kwargs): @@ -185,6 +185,7 @@ class AgentTimelines(TimeIncrementalStream): Agent Timelines Stream: https://developer.zendesk.com/rest_api/docs/chat/incremental_export#incremental-agent-timeline-export """ + primary_key = None cursor_field = "start_time" data_field = "agent_timeline" name = "agent_timeline" diff --git a/docs/integrations/sources/zendesk-chat.md b/docs/integrations/sources/zendesk-chat.md index b7ef41858893..d572f839a36d 100644 --- a/docs/integrations/sources/zendesk-chat.md +++ b/docs/integrations/sources/zendesk-chat.md @@ -2,11 +2,16 @@ This page contains the setup guide and reference information for the Zendesk Chat source connector. +## Prerequisites + +- Zendesk Account with permission to access data from accounts you want to sync +- Access Token as described in [Zendesk Chat docs](https://developer.zendesk.com/rest_api/docs/chat/auth). We recommend creating a restricted, read-only key specifically for Airbyte access. This will allow you to control which resources Airbyte should be able to access. + ## Setup guide -### Step 1: Set up Zendesk Chat - ### Airbyte Open Source additional setup steps - >Generate an Access Token as described in [Zendesk Chat docs](https://developer.zendesk.com/rest_api/docs/chat/auth) - We recommend creating a restricted, read-only key specifically for Airbyte access. This will allow you to control which resources Airbyte should be able to access. + +## Step 1: Set up Zendesk Chat + +Generate an Access Token as described in [Zendesk Chat docs](https://developer.zendesk.com/rest_api/docs/chat/auth) ## Step 2: Set up the Zendesk Chat connector in Airbyte @@ -73,6 +78,7 @@ The connector is restricted by normal Zendesk [requests limitation](https://deve | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------- | +| 0.1.9 | 2022-08-23 | [15879](https://github.com/airbytehq/airbyte/pull/15879) | Corrected specification and stream schemas to support backward capability | | 0.1.8 | 2022-06-28 | [13387](https://github.com/airbytehq/airbyte/pull/13387) | Add state checkpoint to allow long runs | | 0.1.7 | 2022-05-25 | [12883](https://github.com/airbytehq/airbyte/pull/12883) | Pass timeout in request to prevent a stuck connection | | 0.1.6 | 2021-12-15 | [7313](https://github.com/airbytehq/airbyte/pull/7313) | Add support of `OAuth 2.0` authentication. Fixed the issue with `created_at` can now be `null` for `bans` stream |