Overview of ClickHouse Java Client and JDBC Driver
mainThe clickhouse-java repository provides two primary ways to interact with the ClickHouse Database via the HTTP Protocol:
- Java Client: The core component providing a native API for ClickHouse interaction.
- JDBC Driver: An implementation of the JDBC specification that uses the Java Client API internally.
There are two versions of these components available to allow for a smooth migration path:
- V2 (Recommended): The modern implementation (
client-v2andjdbc-v2). - V1 (Legacy): The older version, which is scheduled for deprecation in 2025.
Key features supported by both versions include HTTP connection, LZ4 compression, HTTPS, mTLS, Named Parameters, and Session Roles. Note that V2 adds Java Object SerDe support, while V1 supports Failover, Load-balancing, and Server auto-discovery.