Home » Blog » Connect to CnosDB through DBeaver

Connect to CnosDB through DBeaver

Hey database explorers:

How could you avoid using DBeaver in your CnosDB journey? Let me teach you step by step how to do it once and for all.

Connect to CnosDB through DBeaver

 

Adding Arrow Flight SQL's JDBC driver to the DBeaver driver can be downloaded here: https://mvnrepository.com/artifact/org.apache.arrow/flight-sql-jdbc-driver/13.0.0 

1. Add driver

1. In the menu bar, select Database > Driver Manger .

 

2. In the dialog box, click New.

3. In the Create new driver  section, fill in the following information:
a.  Fill in the driver  with a loud name, such as CnosDB.
b.   Select  Generic as Driver Type .
c.  Class Name org.apache.arrow.driver.jdbc.ArrowFlightJdbcDriver .
d.  The URL Template changes to jdbc:arrow-flight-sql://{host}:{port} .
e.  Default port: 8904, yes this is the default port of the CnosDB arrow-flight interface.

4. Switch to the Libraries  tab, click Add File , and then select the .jar file of the JDBC driver for Arrow Flight SQL.
5. Click OK again .

2. Create CnosDB connection

Now, let's open the door to CnosDB:

1. Jump to Database > New Database Connection .
2. Select the ” CnosDB ” driver just added , and then click  Next .
3. In the Main  tab:

1.Connect by  selecting  Host  .

2.Host  fill in the IP of CnosDB, for example: 127.0.0.1 .

3.  Fill in  the port 8904 , remember not to make a mistake.

 4. Don’t forget to write Username  and  Password .

5. Go to the Driver Setting  tab and right-click on User Properties. Create a new   attribute  named useEncryption and set the value to false .

6. Click Test Connection…. If successful, a  small connected  pop-up window will pop up. Click  OK  to close it.

7. Hey, remember to fill in the correct host address and port. If the test connection is successful, you are done!

8. Finally, click Finish .

9. Now, you can query the data in DBeaver.

I hope this article helps you in your database adventure. Keep rocking, data warriors!