Updated on 2022-09-14 GMT+08:00

Setting Properties

Set the connection properties. In the following sample code, the socket timeout interval is set to 60s.

ClickHouseProperties clickHouseProperties = new ClickHouseProperties();
clickHouseProperties.setSocketTimeout(60000);
If sslUsed in the clickhouse-example.properties file in Configuring and Importing a Sample Project is set to true, set the following connection properties:
clickHouseProperties.setSsl(true);
clickHouseProperties.setSslMode("none");