Awesome ClickHouseScala

crobox/clickhouse-scala-client

⭐ 118 Scala repository created 2017-03-31

The project "crobox/clickhouse-scala-client" is a Scala client library designed to interact with the Clickhouse database using reactive streams. It leverages Pekko Http to provide a reactive streams implementation, enabling efficient and reactive access to Clickhouse. The client supports both read and write query execution, allowing users to perform database operations in a reactive manner. It offers Pekko streaming sources for parsing query results and Pekko streaming sinks for data insertion, facilitating seamless streaming data workflows. Key features include streaming query progress (experimental), comprehensive HTTP interface settings, load balancing with internal health checks, and support for multi-host and cluster-aware host balancing. The client also includes the ability to retry queries, enhancing reliability in distributed environments. It supports multiple Scala versions (2.12 and 2.13) and is available as artifacts on Maven Central and Sonatype repositories. The project provides detailed configuration options for clients and indexers, including connection types such as single-host, balancing-hosts, and cluster-aware connections. Health checks are implemented to monitor host availability, ensuring queries are routed only to healthy nodes. The indexer configuration supports batch size, concurrent requests, and flush intervals to optimize data insertion performance. The client API offers various methods for query execution, including read-only queries, write queries, streaming delimited results, streaming raw results, and sink streaming bodies. Experimental support for query progress tracking is also included. The project documentation includes quick setup guides, configuration details, client API usage, and a DSL for query construction. Overall, this project provides a robust and reactive Scala client for Clickhouse, enabling efficient and scalable database interactions with advanced features like load balancing, health checks, and streaming data support.

https://github.com/crobox/clickhouse-scala-client

akkaapiclickhousecluster-awareconfigurationdata-insertiondslhealth-checksindexerload-balancingmulti-hostpekko-httpquery-executionreactivereactive-streamsretry-queriesscalascala-clientstreaming