Connecting to Databend with JDBC
Databend provides a JDBC driver that enables connection to Databend from a client application, such as
Related video:
The following shows how to add the Databend JDBC driver to a client application and connect to Databend via the driver, using DBeaver as an example. For more information about the driver, refer to
Example: Connect from DBeaver with JDBC
To connect to Databend from DBeaver with the Databend JDBC driver, you need to add the driver to DBeaver's Driver Manager first, and then select the driver when you create a connection.
Step 1. Add Databend JDBC Driver to DBeaver
In DBeaver, select Database > Driver Manager to open the Driver Manager, then click New to create a new driver.
On the Settings tab, enter the required information for the new driver as follows:
- Driver: databend
- Driver Type: Generic
- Class Name: com.databend.jdbc.DatabendDriver
- URL Template: jdbc:databend://{user}:{password}@{host}:{port}/{database}
- Default Port: 8000
- Default User: root
- On the Libraries tab, click Add Artifact, then copy and paste the following to the Dependency Declaration textbox:
Databend recommends updating to the latest version of the Databend JDBC driver to access the latest features and enhancements, and to resolve any issues you may encounter. Please check for available updates at
<dependency>
<groupId>com.databend</groupId>
<artifactId>databend-jdbc</artifactId>
<version>0.0.8</version>
</dependency>
- Click OK to close the windows.
Step 2. Create a Connection with Databend JDBC Driver
- In DBeaver, search for and select
databend
on Database > New Database Connection first, and then click Next.
- Set your connection settings. The default settings can connect to a local instance of Databend.
- Click Test Connection to check if the connection is successful.