diff --git a/airbyte-integrations/connectors/destination-typesense/destination_typesense/destination.py b/airbyte-integrations/connectors/destination-typesense/destination_typesense/destination.py index 337b41658d49..fbbf027e2e28 100644 --- a/airbyte-integrations/connectors/destination-typesense/destination_typesense/destination.py +++ b/airbyte-integrations/connectors/destination-typesense/destination_typesense/destination.py @@ -14,11 +14,15 @@ def get_client(config: Mapping[str, Any]) -> Client: - node = {"host": config.get("host"), "port": config.get("port") or "8108", "protocol": config.get("protocol") or "https"} + hosts = config.get("host").split(",") path = config.get("path") - if path: - node["path"] = path - client = Client({"api_key": config.get("api_key"), "nodes": [node], "connection_timeout_seconds": 3600}) + nodes = [] + for host in hosts: + node = {"host": host, "port": config.get("port") or "8108", "protocol": config.get("protocol") or "https"} + if path: + node["path"] = path + nodes.append(node) + client = Client({"api_key": config.get("api_key"), "nodes": nodes, "connection_timeout_seconds": 3600}) return client diff --git a/airbyte-integrations/connectors/destination-typesense/destination_typesense/spec.json b/airbyte-integrations/connectors/destination-typesense/destination_typesense/spec.json index 797457d6b472..b7d9a16138c2 100644 --- a/airbyte-integrations/connectors/destination-typesense/destination_typesense/spec.json +++ b/airbyte-integrations/connectors/destination-typesense/destination_typesense/spec.json @@ -18,7 +18,7 @@ "host": { "title": "Host", "type": "string", - "description": "Hostname of the Typesense instance without protocol.", + "description": "Hostname of the Typesense instance without protocol. Accept multiple hosts separated by comma.", "order": 1 }, "port": { diff --git a/airbyte-integrations/connectors/destination-typesense/metadata.yaml b/airbyte-integrations/connectors/destination-typesense/metadata.yaml index ac8d63d59930..7ff7f996f0a8 100644 --- a/airbyte-integrations/connectors/destination-typesense/metadata.yaml +++ b/airbyte-integrations/connectors/destination-typesense/metadata.yaml @@ -2,7 +2,7 @@ data: connectorSubtype: database connectorType: destination definitionId: 36be8dc6-9851-49af-b776-9d4c30e4ab6a - dockerImageTag: 0.1.16 + dockerImageTag: 0.1.17 dockerRepository: airbyte/destination-typesense connectorBuildOptions: baseImage: docker.io/airbyte/python-connector-base:2.0.0@sha256:c44839ba84406116e8ba68722a0f30e8f6e7056c726f447681bb9e9ece8bd916 diff --git a/airbyte-integrations/connectors/destination-typesense/pyproject.toml b/airbyte-integrations/connectors/destination-typesense/pyproject.toml index ee3e9a1a23d7..02eb2859ec3c 100644 --- a/airbyte-integrations/connectors/destination-typesense/pyproject.toml +++ b/airbyte-integrations/connectors/destination-typesense/pyproject.toml @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",] build-backend = "poetry.core.masonry.api" [tool.poetry] -version = "0.1.16" +version = "0.1.17" name = "destination-typesense" description = "Destination Implementation for Typesense." authors = [ "Airbyte ",] diff --git a/docs/integrations/destinations/typesense.md b/docs/integrations/destinations/typesense.md index b6391fb24400..20faeb4fc104 100644 --- a/docs/integrations/destinations/typesense.md +++ b/docs/integrations/destinations/typesense.md @@ -33,6 +33,10 @@ To use the Typesense destination, you'll need an existing Typesense instance. Yo The setup only requires two fields. First is the `host` which is the address at which Typesense can be reached. The second piece of information is the API key. +### Typesense with High Availability + +To connect a Typesense with HA, you can type multiple hosts on the host field using a comma separator. + ## Changelog
@@ -40,6 +44,7 @@ The setup only requires two fields. First is the `host` which is the address at | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :---------------------------- | +| 0.1.17 | 2024-08-01 | [42868](https://github.com/airbytehq/airbyte/pull/42868) | Allows you to specify multiple hosts, separated by commas, to connect to Typesense with HA. | | 0.1.16 | 2024-08-03 | [43282](https://github.com/airbytehq/airbyte/pull/43282) | Update dependencies | | 0.1.15 | 2024-07-27 | [42606](https://github.com/airbytehq/airbyte/pull/42606) | Update dependencies | | 0.1.14 | 2024-07-20 | [42146](https://github.com/airbytehq/airbyte/pull/42146) | Update dependencies |