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 c10c6f7e08da..079e4cf0b701 100644
--- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml
+++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml
@@ -176,7 +176,7 @@
- name: ClickHouse
sourceDefinitionId: bad83517-5e54-4a3d-9b53-63e85fbd4d7c
dockerRepository: airbyte/source-clickhouse
- dockerImageTag: 0.1.13
+ dockerImageTag: 0.1.14
documentationUrl: https://docs.airbyte.io/integrations/sources/clickhouse
icon: cliskhouse.svg
sourceType: database
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 6e972478498d..50783a94d365 100644
--- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml
+++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml
@@ -1823,7 +1823,7 @@
supportsNormalization: false
supportsDBT: false
supported_destination_sync_modes: []
-- dockerImage: "airbyte/source-clickhouse:0.1.13"
+- dockerImage: "airbyte/source-clickhouse:0.1.14"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/destinations/clickhouse"
connectionSpecification:
@@ -1840,6 +1840,7 @@
description: "The host endpoint of the Clickhouse cluster."
title: "Host"
type: "string"
+ order: 0
port:
description: "The port of the database."
title: "Port"
@@ -1849,26 +1850,40 @@
default: 8123
examples:
- "8123"
+ order: 1
database:
description: "The name of the database."
title: "Database"
type: "string"
examples:
- "default"
+ order: 2
username:
description: "The username which is used to access the database."
title: "Username"
type: "string"
+ order: 3
password:
description: "The password associated with this username."
title: "Password"
type: "string"
airbyte_secret: true
+ order: 4
+ jdbc_url_params:
+ description: "Additional properties to pass to the JDBC URL string when\
+ \ connecting to the database formatted as 'key=value' pairs separated\
+ \ by the symbol '&'. (Eg. key1=value1&key2=value2&key3=value3). For more\
+ \ information read about JDBC URL parameters."
+ title: "JDBC URL Parameters (Advanced)"
+ type: "string"
+ order: 5
ssl:
title: "SSL Connection"
description: "Encrypt data using SSL."
type: "boolean"
default: true
+ order: 6
tunnel_method:
type: "object"
title: "SSH Tunnel Method"
diff --git a/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/Dockerfile b/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/Dockerfile
index c22f2e3d2902..582507952ef2 100644
--- a/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/Dockerfile
+++ b/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/Dockerfile
@@ -16,5 +16,5 @@ ENV APPLICATION source-clickhouse-strict-encrypt
COPY --from=build /airbyte /airbyte
-LABEL io.airbyte.version=0.1.13
+LABEL io.airbyte.version=0.1.14
LABEL io.airbyte.name=airbyte/source-clickhouse-strict-encrypt
diff --git a/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/src/test-integration/resources/expected_spec.json b/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/src/test-integration/resources/expected_spec.json
index 985e302f8b27..b6000d108e35 100644
--- a/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/src/test-integration/resources/expected_spec.json
+++ b/airbyte-integrations/connectors/source-clickhouse-strict-encrypt/src/test-integration/resources/expected_spec.json
@@ -9,7 +9,8 @@
"host": {
"description": "The host endpoint of the Clickhouse cluster.",
"title": "Host",
- "type": "string"
+ "type": "string",
+ "order": 0
},
"port": {
"description": "The port of the database.",
@@ -18,24 +19,34 @@
"minimum": 0,
"maximum": 65536,
"default": 8123,
- "examples": ["8123"]
+ "examples": ["8123"],
+ "order": 1
},
"database": {
"description": "The name of the database.",
"title": "Database",
"type": "string",
- "examples": ["default"]
+ "examples": ["default"],
+ "order": 2
},
"username": {
"description": "The username which is used to access the database.",
"title": "Username",
- "type": "string"
+ "type": "string",
+ "order": 3
},
"password": {
"description": "The password associated with this username.",
"title": "Password",
"type": "string",
- "airbyte_secret": true
+ "airbyte_secret": true,
+ "order": 4
+ },
+ "jdbc_url_params": {
+ "description": "Additional properties to pass to the JDBC URL string when connecting to the database formatted as 'key=value' pairs separated by the symbol '&'. (Eg. key1=value1&key2=value2&key3=value3). For more information read about JDBC URL parameters.",
+ "title": "JDBC URL Parameters (Advanced)",
+ "type": "string",
+ "order": 5
}
}
}
diff --git a/airbyte-integrations/connectors/source-clickhouse/Dockerfile b/airbyte-integrations/connectors/source-clickhouse/Dockerfile
index b41fb06cb776..6681cc7af3cb 100644
--- a/airbyte-integrations/connectors/source-clickhouse/Dockerfile
+++ b/airbyte-integrations/connectors/source-clickhouse/Dockerfile
@@ -16,5 +16,5 @@ ENV APPLICATION source-clickhouse
COPY --from=build /airbyte /airbyte
-LABEL io.airbyte.version=0.1.13
+LABEL io.airbyte.version=0.1.14
LABEL io.airbyte.name=airbyte/source-clickhouse
diff --git a/airbyte-integrations/connectors/source-clickhouse/src/main/java/io/airbyte/integrations/source/clickhouse/ClickHouseSource.java b/airbyte-integrations/connectors/source-clickhouse/src/main/java/io/airbyte/integrations/source/clickhouse/ClickHouseSource.java
index f68824d2c680..31b1cfabec04 100644
--- a/airbyte-integrations/connectors/source-clickhouse/src/main/java/io/airbyte/integrations/source/clickhouse/ClickHouseSource.java
+++ b/airbyte-integrations/connectors/source-clickhouse/src/main/java/io/airbyte/integrations/source/clickhouse/ClickHouseSource.java
@@ -20,6 +20,7 @@
import java.sql.JDBCType;
import java.sql.PreparedStatement;
import java.sql.SQLException;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -90,9 +91,20 @@ public JsonNode toDatabaseConfig(final JsonNode config) {
config.get(JdbcUtils.PORT_KEY).asText(),
config.get(JdbcUtils.DATABASE_KEY).asText()));
+ boolean isAdditionalParamsExists =
+ config.get(JdbcUtils.JDBC_URL_PARAMS_KEY) != null && !config.get(JdbcUtils.JDBC_URL_PARAMS_KEY).asText().isEmpty();
+ List params = new ArrayList<>();
// assume ssl if not explicitly mentioned.
if (isSsl) {
- jdbcUrl.append("?").append(SSL_MODE);
+ params.add(SSL_MODE);
+ }
+ if (isAdditionalParamsExists) {
+ params.add(config.get(JdbcUtils.JDBC_URL_PARAMS_KEY).asText());
+ }
+
+ if (isSsl || isAdditionalParamsExists) {
+ jdbcUrl.append("?");
+ jdbcUrl.append(String.join("&", params));
}
final ImmutableMap.Builder