Working With ClickHouse From Spring Data Using MySql Driver

Working With ClickHouse From Spring Data Using MySql Driver

Some time ago I got a task to write a service that inserts data into ClickHouse. This article is about Spring Data JDBC is able to communicate with ClickHouse using MySql driver.

Some time ago I got a task to write a service that inserts data into ClickHouse. My team uses Kotlin and Spring Framework so I decided to try Spring Data JDBC as ORM framework for ClickHouse. After some research, I found that ClickHouse has a MySql interface. Thus, probably, Spring Data JDBC is able to communicate with ClickHouse using MySql driver.

Unfortunately, Spring Data JDBC doesn’t work with ClickHouse out of the box thought MySql driver. Several problems have to be solved before this approach will work out.

This article is about overcoming the problems that I encountered while I was implementing the task and solutions for them.

Disclaimer: I write about a rare use case for ClickHouse. ClickHouse is OLAP DB and cannot be used as OLTP DB so unless you are confident this approach is right for you don’t repeat it. ClickHouse doesn’t support UPDATE/DELETE and many others SQL statements, be careful when you choose ClickHouse for your project.

kotlin

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Hire Dedicated Kotlin Developer - WebClues Infotech

Request a free quote for custom web and mobile apps development, Enterprise solutions, IoT Solutions, AR/VR Development, Blockchain and chatbot services. Feel free to get in touch.

How to Develop an Android App with Kotlin?

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

Top Kotlin Android App Development Company in USA

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

Top-notch Kotlin App Development Company in USA

AppClues Infotech is a top Mobile App Development Company in USA building high-quality Android, iOS, and Native apps for Startups, SMBs, & Enterprises. Contact us now!

Kotlin or React Native | React Native vs Kotlin Performance Comparison

This blog provides quick analysis to decide whether to opt for Kotlin or React Native to build robust and secure mobile application.