clickhouse-tableau-connector-jdbc icon indicating copy to clipboard operation
clickhouse-tableau-connector-jdbc copied to clipboard

Support load balancing connection string

Open saimon46 opened this issue 1 year ago • 0 comments

Hello, The JDBC clickhouse driver that the connector uses supports already load balancing, specifing in the connection string multiple hosts and ports.

String connString = "jdbc:clickhouse://server1:8123,server2:8123,server3:8123/database";
BalancedClickhouseDataSource balancedDs = new BalancedClickhouseDataSource(
    connString).scheduleActualization(5000, TimeUnit.MILLISECONDS);
ClickHouseConnection conn = balancedDs.getConnection("default", "");

Is it possible support this driver feature on the connector itself? Now only one server is configurable and the connection string is hardcoded https://github.com/ClickHouse/clickhouse-tableau-connector-jdbc/blob/main/clickhouse_jdbc/connectionBuilder.js#L72

Thanks a lot Simone

saimon46 avatar Nov 02 '23 09:11 saimon46