Updated on 2023-08-31 GMT+08:00

Setting Properties

Set connection properties in the examples of creating connections in the ClickhouseJDBCHaDemo, Demo, NativeJDBCHaDemo, and Util files. The following code sets the socket timeout interval to 60 seconds:

ClickHouseProperties clickHouseProperties = new ClickHouseProperties();
clickHouseProperties.setSocketTimeout(60000);
If sslUsed in the clickhouse-example.properties configuration file in Configuring and Importing a Sample Project is set to true, set the following connection properties in the examples for creating connections in the ClickhouseJDBCHaDemo, Demo, NativeJDBCHaDemo, and Util files:
clickHouseProperties.setSsl(true);
clickHouseProperties.setSslMode("none");