ClickHouse#

Clickhouse connectivity works over JDBC. The official JDBC driver is built-into Querona.

Note

ClickHouse is an open-source column-oriented database management system capable of real-time generation of analytical data reports using SQL queries.

For more information about ClickHouse please visit https://clickhouse.yandex/.

Connection settings#

To create a connection to Clickhouse, please select the JDBC driver, and the Clickhouse JDBC dialect.

The obligatory settings are:

Setting name

Example value

Connection string

DriverPath=c:\ProgramData\Querona\jdbc\clickhouse-jdbc.jar; DriverClass=ru.yandex.clickhouse.ClickHouseDriver

Server name

jdbc:clickhouse://<server_name>:8123/<database_name>

User name

default

Password

<user password>

The available and recommeded JDBC connection settings are:

Setting name

Default value

Description

apache_buffer_size

65536

buffer_size

65536

The number of bytes in the result to buffer in the server memory.

compress

0

connection_timeout

10000

Connection timeout in milliseconds.

enable_http_compression

0

Enables or disables data compression in the response to an HTTP request. Possible values: 0 — Disabled, 1 — Enabled, default 0.

socket_timeout

30000

ssl

false

Enable SSL/TLS for the connection.

sslrootcert

SSL/TLS root certificate.

sslmode

strict

Verify or not certificate: none (don’t verify), strict (verify).

use_server_time_zone

true

Whether to use timezone from server.

use_time_zone

Which time zone to use.

use_server_time_zone_for_dates

false

Whether to use timezone from server on Date parsing in getDate(). If false, Date returned is a wrapper of a timestamp at start of the day in client timezone. If true - at start of the day in server or use_timezone timezone.

For the full list of the supported options please refer to the Clickhouse Jdbc driver documentation.

Limited data type support#

  • Int256 (mapped to varchar)

  • Int128 (mapped to varchar)

  • Array(T)

  • Enum

  • Tuple(T1, T2, …)

  • AggregateFunction(name, types_of_arguments…)

  • Nested(Name1 Type1, Name2 Type2, …)

  • Expression

  • Set

See also#