GithubHelp home page GithubHelp logo

skyoct / clickhouse-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clickhouse/clickhouse-java

0.0 0.0 0.0 5.92 MB

Java client and JDBC driver for ClickHouse

Home Page: https://clickhouse.com

License: Apache License 2.0

Shell 0.02% Java 99.98%

clickhouse-java's Introduction

ClickHouse Java Libraries

GitHub release (latest SemVer including pre-releases) GitHub release (by tag) Coverage Sonatype Nexus (Snapshots) GitHub milestone

Java libraries for connecting to ClickHouse and processing data in various formats. Java client is async, lightweight, and low-overhead library for ClickHouse; while JDBC and R2DBC drivers are built on top of the Java client with more dependencies and features. Java 8 or higher is required to use the libraries. In addition, please use ClickHouse 20.7+ or any of active releases.

image

Features

Category Feature Supported Remark
API JDBC
R2DBC supported since 0.4.0
Protocol HTTP recommended, defaults to java.net.HttpURLConnection and it can be changed to java.net.http.HttpClient(unstable) or Apache HTTP Client 5. Note that the latter was added in 0.4.0 to support custom socket options.
gRPC ⚠️ experimental, works with 22.3+, known to has issue with lz4 compression and may cause high memory usage on server
TCP/Native clickhouse-cli-client(wrapper of ClickHouse native command-line client) was added in 0.3.2-patch10, clickhouse-tcp-client will be available in 0.5
Local/File clickhouse-cli-client will be enhanced to support clickhouse-local
Compatibility Server < 20.7 use 0.3.1-patch(or 0.2.6 if you're stuck with JDK 7)
Server >= 20.7 use 0.3.2 or above. All active releases are supported.
Compression lz4 default
zstd supported since 0.4.0, works with ClickHouse 22.10+
Data Format RowBinary RowBinaryWithNamesAndTypes for query and RowBinary for insertion
TabSeparated ⚠️ does not support as many data types as RowBinary
Data Type AggregateFunction ⚠️ does not support SELECT * FROM table ...
Array(*)
Bool
Date*
DateTime*
Decimal* SET output_format_decimal_trailing_zeros=1 in 21.9+ for consistency
Enum* can be treated as both string and integer
Geo Types Point, Ring, Polygon, and MultiPolygon
Int*, UInt* UInt64 is mapped to long
IPv*
Map(*)
Nested(*) ⚠️ broken before 0.4.1
Object('JSON') supported since 0.3.2-patch8
SimpleAggregateFunction
*String ⚠️ requires use_binary_string=true for binary string support since v0.4.0
Tuple(*)
UUID
High Availability Load Balancing supported since 0.3.2-patch10
Failover supported since 0.3.2-patch10
Transaction Transaction supported since 0.3.2-patch11, use ClickHouse 22.7+ for native implicit transaction support
Savepoint
XAConnection
Misc. Centralized Configuration supported since 0.4.2, limited to JDBC driver and requires custom server setting custom_jdbc_config for all connected JDBC clients - #1290
INFILE & OUTFILE supported since 0.4.2, limited to JDBC driver and requires localFile option - #1291
Implicit Type Conversion String/number to Date/Time/Timestamp and more
Object mapping supported since 0.4.6, slow and limited to simple data types

Usage

The library can be downloaded from both Github Releases and Maven Central. Development snapshots(aka. nightly build) are available on Sonatype OSSRH.

<repositories>
    <repository>
        <id>ossrh</id>
        <name>Sonatype OSSRH</name>
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
</repositories>

Java Client

See examples and the docs on the ClickHouse website.

JDBC Driver

See examples and the docs on the ClickHouse website.

Contributing

Check out our contributing guide.

clickhouse-java's People

Contributors

zhicwu avatar serebrserg avatar enqueue avatar alex-krash avatar izebit avatar jackywoo avatar jkee avatar den-crane avatar alexey-milovidov avatar bgranvea avatar mzitnik avatar tkroman avatar smagellan avatar mshustov avatar dcastanier avatar dysosmus avatar bluedogseyes avatar tobia avatar orloffv avatar meegooo avatar ryan-tu avatar blinkov avatar bentsileviav avatar zgmnkv avatar amaslak avatar andyha avatar starwix avatar cheppali-reddy avatar pan3793 avatar egorlitvinenko avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.