From 114a9c4e58996e337dc9a3ab568238b0c46bdcda Mon Sep 17 00:00:00 2001 From: ykurochkin Date: Wed, 13 Oct 2021 14:52:14 +0300 Subject: [PATCH 1/4] Source Hubspot: update SAT config --- .../source-hubspot/acceptance-test-config.yml | 35 +--- .../sample_files/configured_catalog.json | 70 ++----- .../configured_catalog_without_workflows.json | 184 ------------------ .../sample_files/full_refresh_catalog.json | 130 +++++++++++++ docs/integrations/sources/hubspot.md | 2 + 5 files changed, 150 insertions(+), 271 deletions(-) delete mode 100644 airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_without_workflows.json create mode 100644 airbyte-integrations/connectors/source-hubspot/sample_files/full_refresh_catalog.json diff --git a/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml b/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml index a47ab37f6198..b952949e5c67 100644 --- a/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml @@ -17,38 +17,11 @@ tests: - config_path: "secrets/config.json" basic_read: - config_path: "secrets/config.json" - configured_catalog_path: "sample_files/configured_catalog.json" - empty_streams: - [ - "contact_lists", - "campaigns", - "tickets", - "subscription_changes", - "quotes", - "email_events", - "engagements", - "forms", - "products", - "workflows", - ] + configured_catalog_path: "sample_files/full_refresh_catalog.json" + empty_streams: ["workflows"] - config_path: "secrets/config_oauth.json" configured_catalog_path: "sample_files/configured_catalog.json" - empty_streams: - [ - "companies", - "deals", - "owners", - "contact_lists", - "campaigns", - "tickets", - "subscription_changes", - "quotes", - "email_events", - "engagements", - "forms", - "products", - "workflows", - ] + empty_streams: ["campaigns", "quotes", "workflows"] # incremental: fixme (eugene): '<=' not supported between instances of 'int' and 'str' # See https://github.com/airbytehq/airbyte/issues/6509 # - config_path: "secrets/config.json" @@ -59,6 +32,6 @@ tests: # email_events: ["timestamp"] full_refresh: - config_path: "secrets/config.json" - configured_catalog_path: "sample_files/configured_catalog.json" + configured_catalog_path: "sample_files/full_refresh_catalog.json" - config_path: "secrets/config_oauth.json" configured_catalog_path: "sample_files/configured_catalog.json" diff --git a/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog.json b/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog.json index ed9631201955..41ab4edb4730 100644 --- a/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog.json +++ b/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog.json @@ -4,72 +4,54 @@ "stream": { "name": "campaigns", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["lastUpdatedTime"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "companies", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "contact_lists", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "contacts", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "deal_pipelines", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "deals", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { @@ -88,72 +70,54 @@ "stream": { "name": "engagements", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["lastUpdated"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "forms", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "line_items", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "owners", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "products", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "quotes", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { @@ -172,24 +136,18 @@ "stream": { "name": "tickets", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" }, { "stream": { "name": "workflows", "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] + "supported_sync_modes": ["full_refresh"] }, "sync_mode": "full_refresh", - "cursor_field": null, "destination_sync_mode": "overwrite" } ] diff --git a/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_without_workflows.json b/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_without_workflows.json deleted file mode 100644 index 06495e01ee0f..000000000000 --- a/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_without_workflows.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "streams": [ - { - "stream": { - "name": "campaigns", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["lastUpdatedTime"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "companies", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "contact_lists", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "contacts", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "deal_pipelines", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "deals", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "email_events", - "json_schema": {}, - "supported_sync_modes": ["full_refresh", "incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["created"] - }, - "sync_mode": "incremental", - "cursor_field": ["created"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "engagements", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["lastUpdated"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "forms", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "line_items", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "owners", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "products", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "quotes", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - }, - { - "stream": { - "name": "subscription_changes", - "json_schema": {}, - "supported_sync_modes": ["full_refresh", "incremental"], - "source_defined_cursor": true, - "default_cursor_field": ["timestamp"] - }, - "sync_mode": "incremental", - "cursor_field": ["timestamp"], - "destination_sync_mode": "append" - }, - { - "stream": { - "name": "tickets", - "json_schema": {}, - "supported_sync_modes": ["full_refresh"], - "source_defined_cursor": false, - "default_cursor_field": ["updatedAt"] - }, - "sync_mode": "full_refresh", - "cursor_field": null, - "destination_sync_mode": "overwrite" - } - ] -} diff --git a/airbyte-integrations/connectors/source-hubspot/sample_files/full_refresh_catalog.json b/airbyte-integrations/connectors/source-hubspot/sample_files/full_refresh_catalog.json new file mode 100644 index 000000000000..d7dd7dbc7ca5 --- /dev/null +++ b/airbyte-integrations/connectors/source-hubspot/sample_files/full_refresh_catalog.json @@ -0,0 +1,130 @@ +{ + "streams": [ + { + "stream": { + "name": "campaigns", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "companies", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "contact_lists", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "contacts", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "deal_pipelines", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "deals", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "engagements", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "forms", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "line_items", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "owners", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "products", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "quotes", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "tickets", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "workflows", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} diff --git a/docs/integrations/sources/hubspot.md b/docs/integrations/sources/hubspot.md index 092f9c34237b..25d53f87e502 100644 --- a/docs/integrations/sources/hubspot.md +++ b/docs/integrations/sources/hubspot.md @@ -34,6 +34,8 @@ This source is capable of syncing the following tables and their data: * [Tickets](https://developers.hubspot.com/docs/api/crm/tickets) * [Workflows](https://legacydocs.hubspot.com/docs/methods/workflows/v3/get_workflows) +**Note**: Hubspot API currently only supports `quotes` endpoint using API Key, using Oauth it is impossible to access this stream. + ## Getting Started \(Airbyte Open-Source / Airbyte Cloud\) #### Requirements From 212be2f7ef42d959786619d3455f69c0d54c1b5e Mon Sep 17 00:00:00 2001 From: ykurochkin Date: Wed, 13 Oct 2021 15:03:05 +0300 Subject: [PATCH 2/4] add link to hubspot.md --- docs/integrations/sources/hubspot.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/sources/hubspot.md b/docs/integrations/sources/hubspot.md index 25d53f87e502..37647d1079b7 100644 --- a/docs/integrations/sources/hubspot.md +++ b/docs/integrations/sources/hubspot.md @@ -34,7 +34,7 @@ This source is capable of syncing the following tables and their data: * [Tickets](https://developers.hubspot.com/docs/api/crm/tickets) * [Workflows](https://legacydocs.hubspot.com/docs/methods/workflows/v3/get_workflows) -**Note**: Hubspot API currently only supports `quotes` endpoint using API Key, using Oauth it is impossible to access this stream. +**Note**: Hubspot API currently only supports `quotes` endpoint using API Key, using Oauth it is impossible to access this stream (as reported by [community.hubspot.com](https://community.hubspot.com/t5/APIs-Integrations/Help-with-using-Feedback-CRM-API-and-Quotes-CRM-API/m-p/449104/highlight/true#M44411)). ## Getting Started \(Airbyte Open-Source / Airbyte Cloud\) From 4652873086170f74a9b78108423fbb0ebcd4fc47 Mon Sep 17 00:00:00 2001 From: ykurochkin Date: Thu, 14 Oct 2021 13:14:51 +0300 Subject: [PATCH 3/4] Update discover method: disable quotes stream when using OAuth config --- .../connectors/source-hubspot/Dockerfile | 2 +- .../source-hubspot/acceptance-test-config.yml | 10 +- .../configured_catalog_for_oauth_config.json | 145 ++++++++++++++++++ .../source-hubspot/source_hubspot/client.py | 5 +- docs/integrations/sources/hubspot.md | 1 + 5 files changed, 158 insertions(+), 5 deletions(-) create mode 100644 airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_for_oauth_config.json diff --git a/airbyte-integrations/connectors/source-hubspot/Dockerfile b/airbyte-integrations/connectors/source-hubspot/Dockerfile index 6de5c2f3330d..90896aec09d2 100644 --- a/airbyte-integrations/connectors/source-hubspot/Dockerfile +++ b/airbyte-integrations/connectors/source-hubspot/Dockerfile @@ -14,5 +14,5 @@ RUN pip install . ENV AIRBYTE_ENTRYPOINT "/airbyte/base.sh" -LABEL io.airbyte.version=0.1.16 +LABEL io.airbyte.version=0.1.17 LABEL io.airbyte.name=airbyte/source-hubspot diff --git a/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml b/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml index b952949e5c67..87a88d7cdce3 100644 --- a/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml +++ b/airbyte-integrations/connectors/source-hubspot/acceptance-test-config.yml @@ -20,8 +20,12 @@ tests: configured_catalog_path: "sample_files/full_refresh_catalog.json" empty_streams: ["workflows"] - config_path: "secrets/config_oauth.json" - configured_catalog_path: "sample_files/configured_catalog.json" - empty_streams: ["campaigns", "quotes", "workflows"] + configured_catalog_path: "sample_files/configured_catalog_for_oauth_config.json" + # The `campaigns` stream is empty in this case, because we use a catalog with + # incremental streams: subscription_changes and email_events (it takes a long time to read) + # and therefore the start date is set at 2021-10-10 for `config_oauth.json`, + # but the campaign was created on 2021-01-11 + empty_streams: ["campaigns", "workflows"] # incremental: fixme (eugene): '<=' not supported between instances of 'int' and 'str' # See https://github.com/airbytehq/airbyte/issues/6509 # - config_path: "secrets/config.json" @@ -34,4 +38,4 @@ tests: - config_path: "secrets/config.json" configured_catalog_path: "sample_files/full_refresh_catalog.json" - config_path: "secrets/config_oauth.json" - configured_catalog_path: "sample_files/configured_catalog.json" + configured_catalog_path: "sample_files/configured_catalog_for_oauth_config.json" diff --git a/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_for_oauth_config.json b/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_for_oauth_config.json new file mode 100644 index 000000000000..368e0b73064a --- /dev/null +++ b/airbyte-integrations/connectors/source-hubspot/sample_files/configured_catalog_for_oauth_config.json @@ -0,0 +1,145 @@ +{ + "streams": [ + { + "stream": { + "name": "campaigns", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "companies", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "contact_lists", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "contacts", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "deal_pipelines", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "deals", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "email_events", + "json_schema": {}, + "supported_sync_modes": ["full_refresh", "incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["created"] + }, + "sync_mode": "incremental", + "cursor_field": ["created"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "engagements", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "forms", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "line_items", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "owners", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "products", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "subscription_changes", + "json_schema": {}, + "supported_sync_modes": ["full_refresh", "incremental"], + "source_defined_cursor": true, + "default_cursor_field": ["timestamp"] + }, + "sync_mode": "incremental", + "cursor_field": ["timestamp"], + "destination_sync_mode": "append" + }, + { + "stream": { + "name": "tickets", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + }, + { + "stream": { + "name": "workflows", + "json_schema": {}, + "supported_sync_modes": ["full_refresh"] + }, + "sync_mode": "full_refresh", + "destination_sync_mode": "overwrite" + } + ] +} diff --git a/airbyte-integrations/connectors/source-hubspot/source_hubspot/client.py b/airbyte-integrations/connectors/source-hubspot/source_hubspot/client.py index 42533bfcb588..58430e57ffb2 100644 --- a/airbyte-integrations/connectors/source-hubspot/source_hubspot/client.py +++ b/airbyte-integrations/connectors/source-hubspot/source_hubspot/client.py @@ -45,12 +45,15 @@ def __init__(self, start_date, credentials, **kwargs): "line_items": CRMObjectStream(entity="line_item", **common_params), "owners": OwnerStream(**common_params), "products": CRMObjectStream(entity="product", **common_params), - "quotes": CRMObjectStream(entity="quote", **common_params), "subscription_changes": SubscriptionChangeStream(**common_params), "tickets": CRMObjectStream(entity="ticket", **common_params), "workflows": WorkflowStream(**common_params), } + credentials_title = credentials.get("credentials_title") + if credentials_title == "API Key Credentials": + self._apis["quotes"] = CRMObjectStream(entity="quote", **common_params) + super().__init__(**kwargs) def _enumerate_methods(self) -> Mapping[str, Callable]: diff --git a/docs/integrations/sources/hubspot.md b/docs/integrations/sources/hubspot.md index 37647d1079b7..5c5242545076 100644 --- a/docs/integrations/sources/hubspot.md +++ b/docs/integrations/sources/hubspot.md @@ -95,6 +95,7 @@ If you are using Oauth, most of the streams require the appropriate [scopes](htt | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | +| 0.1.17 | 2021-10-14 | [6995](https://github.com/airbytehq/airbyte/pull/6995) | Update `discover` method: disable `quotes` stream when using OAuth config | | 0.1.16 | 2021-09-27 | [6465](https://github.com/airbytehq/airbyte/pull/6465) | Implement OAuth support. Use CDK authenticator instead of connector specific authenticator | | 0.1.15 | 2021-09-23 | [6374](https://github.com/airbytehq/airbyte/pull/6374) | Use correct schema for `owners` stream | | 0.1.14 | 2021-09-08 | [5693](https://github.com/airbytehq/airbyte/pull/5693) | Include deal\_to\_contact association when pulling deal stream and include contact ID in contact stream | From 17843e2a2816d6dc9d1955c0e823829a02f1034b Mon Sep 17 00:00:00 2001 From: ykurochkin Date: Thu, 14 Oct 2021 13:28:05 +0300 Subject: [PATCH 4/4] bump version --- .../36c891d9-4bd9-43ac-bad2-10e12756272c.json | 2 +- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json index 014035efb1d5..c41f60b64366 100644 --- a/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json +++ b/airbyte-config/init/src/main/resources/config/STANDARD_SOURCE_DEFINITION/36c891d9-4bd9-43ac-bad2-10e12756272c.json @@ -2,7 +2,7 @@ "sourceDefinitionId": "36c891d9-4bd9-43ac-bad2-10e12756272c", "name": "Hubspot", "dockerRepository": "airbyte/source-hubspot", - "dockerImageTag": "0.1.16", + "dockerImageTag": "0.1.17", "documentationUrl": "https://docs.airbyte.io/integrations/sources/hubspot", "icon": "hubspot.svg" } 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 8dc8aa1bbc60..e92555f9062e 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -161,7 +161,7 @@ - sourceDefinitionId: 36c891d9-4bd9-43ac-bad2-10e12756272c name: Hubspot dockerRepository: airbyte/source-hubspot - dockerImageTag: 0.1.16 + dockerImageTag: 0.1.17 documentationUrl: https://docs.airbyte.io/integrations/sources/hubspot icon: hubspot.svg sourceType: api