connect click house to knime

Hello, I am using Windows operating system and I came to Windows using wsl, I installed Ubuntu, then I installed Click House database in Ubuntu, then I also installed jdbc drive in knime. I want to connect Click House database when in node db connection. There is no such thing as clickhouse. What should I do about database type and database dialect? I even wanted to add a new database from the preferences section. I added the clickhouse.jar file. It cannot find its drivers. When I click find driver classes, nothing comes up. What should I do?


Hi @alimly13, please take a look at this post and see if it helps. It was from a couple of years ago so details may have changed a little but hopefully it’s still applicable.

You may need to read a few later comments from that thread too as I think there were a couple of additional complications which may or may not apply.

1 Like

I tried, but I still have the same problem. I edit the directory, I hit find driver classes, but it doesn’t find it - I actually have a database in click house and I want to put my cleaned information in knime inside the clickhouse database, is it possible, please guide me?

Hi @alimly13 , my only experience of Clickhouse was in the above post, but which version of the clickhouse jdbc driver are you using (if you have a link to the download location for the jdbc driver you have, that would be good to save me googling :slight_smile: ), and which version of KNIME? I’ll see if I can install the same driver on my copy of KNIME.

1 Like

I am using knime version 5.2.0 and my jdbc driver is version 2.4.3
My work should be solved as soon as possible. If possible, please help me in this matter.

Hi @alimly13 , like I said, if you are able to post a link to where the driver can be downloaded from it will help me to assist, as otherwise I have to go searching, and I want to be sure we have the same version. thanks

Actually, I found it in a maven repository. I downloaded the jar using the following maven command line into a local repository created for the purpose: “c:\maven-down\download”

mvn -Dmaven.repo.local=c:/maven-down/download dependency:get -DremoteRepositories=http://repo1.maven.org/maven2/ -DgroupId=com.github.housepower -DartifactId=clickhouse-native-jdbc -Dversion=2.4.3

Once that was done, I searched in my c:\maven-down\download folder for “clickhouse” and found the driver jar file here:

C:\maven-down\download\com\github\housepower\clickhouse-native-jdbc\2.4.3\clickhouse-native-jdbc-2.4.3.jar

I then moved the jar file to a separate folder:
C:\jar-files\clickhouse-jdbc

In KNIME 5.2, I opened the database config and clicked Add

I then entered an ID and name…

you will need to work out what the jdbc URL is by looking at the clickhouse documentation. I left it as the default here, but that may well not be correct.

… and clicked Add File

I added the clickhouse jdbc jar file that I had downloaded, and then clicked “Find driver classes”

I clicked OK, and applied changes to exit out of the database configuration screens.

I then created a workflow and dropped a DB Connector onto it, from which I was able to choose the Clickhouse driver

That’s as far as I can go, since I don’t use Clickhouse. I have no way of testing if it works. I assume it will work if you overtype the jdbc parameter with the correct setting for your database, and enter your credentials.

2 Likes

Bro , It worked, thank you very much

1 Like

That’s great to hear @alimly13. Glad it helped.

1 Like

I had a question. My operating system is Windows and I installed Ubuntu using wsl. Then I didn’t choose a user when installing Clickhouse. It only asked for the default password, which I gave. Then I created a database called knime, then according to the mysql port that is in the config file. It was clickhouse, its port is 9004, then according to the specifications that I fill in the photo, the dbconnector node cannot connect to knime, what should I do? I tried with different authentications, but it didn’t work


Hi @alimly13 , like I mentioned I’ve not used Clickhouse.

However, basic troubleshooting is the same no matter the technology, albeit it is more difficult to troubleshoot remotely with no ability to just try things out.

What specifically does “didn’t work” mean? Do you get an error message? If so… What?

If you attempt to connect slightly differently (eg change the jdbc url a little) does the error message change?

(A change of error message can itself give clues about whether you’re getting closer to the solution or further away)

You mentioned you had a default password. A google search suggests the default user for Clickhouse is “default”. Have your tried entering the default user and default password in the DB Connector?

Have you got any other app (not KNIME) that can connect?

Does clickhouse come with a client app that can connect?

Are you sure of the format of the jdbc connection string?

Where does mysql fit into this? You mentioned mysql but I don’t understand where that came from.

1 Like

In the config file of clickhosue in etc/clickhosue-server/config.xml, in that part, I used the port to connect to clickhosue, but no matter what I do, it does not connect. Is there anyone who has connected clickhosue to knime, please guide me.

Hi @alimly13 , I would suggest starting a new thread now, referencing this post, as this has now got marked as resolved, as the initial question was getting the jdbc driver installed although I know you have yet to get the connection issue sorted.

Reference this post, and ask the same question. Also show details of any error messages you get. Say which version of KNIME you are using, and if you are currently using Modern UI, try switching to Classic UI and view the Console log to see if there are error messages in there too.

I will continue to ask questions on the new thread if I can think of anything, although I don’t have any experience of clickhouse.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.