What is DBeaver#
DBeaver is a free multi-platform database tool for developers, database administrators, analysts, and all people who need to work with databases. Supports all popular databases as well as kyuubi JDBC.
Please go to Download DBeaver page to get and install an appropriate release version for yourself.
New in version 22.1.0(dbeaver): DBeaver officially supports apache kyuubi JDBC driver since 06 Jun 2022 via PR 16567.
Using DBeaver with Kyuubi#
If you have successfully installed dbeaver, just hit the button to launch it.
Firstly, we need to create a database connection against a live kyuubi server. You are able to find the kyuubi jdbc driver since dbeaver 22.1.0, as shown in the following figure.
We can also choose Apache Hive or Apache Spark to set up a driver for Kyuubi, because they are compatible with the same client.
Secondly, we configure the JDBC connection settings to format an underlying kyuubi JDBC connection URL string.
Basic Connection Settings#
The basic connection setting contains a minimal set of items you need to talk with kyuubi server,
Host - hostname or IP address that the kyuubi server bound with, default: localhost.
Port - port that the kyuubi server listening to, default: 10009.
Database/Schema - database or schema to use, default: default.
Authentication - identity information, such as user/password, based on the server authentication mechanism.
Session configuration list is an optional part of kyuubi JDBC URLs, which are very helpful to override some configurations of the kyuubi server at session scope. The setup page of dbeaver does not contain any text box for such behavior. However, we can append the semicolon-separated configuration pairs to the Database/Schema filed leading with a number sign(#). Though it’s a bit weird, but it works.
As an example, shown in the picture above, the engine uses 2 gigabytes memory for the driver process of kyuubi engine and will be terminated after idle for 30 seconds.
Connecting in HA mode#
Kyuubi supports HA by service discovery over Apache Zookeeper cluster.
As an example, shown in the above picture, the Host and Port fields can be used to concat the comma separated zookeeper peers, while the serviceDiscoveryMode and zooKeeperNamespace are appended to the Database/Schema field.
It is not necessary but recommended to click Test Connection to verify the connection is set correctly. If something wrong happens at the client side or server side, we can debug ahead with the error message.
Now, we can use the SQL editor to write queries to interact with Kyuubi server through the connection.
DESC NAMESPACE DEFAULT;
CREATE TABLE spark_catalog.`default`.SRC(KEY INT, VALUE STRING) USING PARQUET; INSERT INTO TABLE spark_catalog.`default`.SRC VALUES (11215016, 'Kent Yao');
SELECT KEY % 10 AS ID, SUBSTRING(VALUE, 1, 4) AS NAME FROM spark_catalog.`default`.SRC;
DROP TABLE spark_catalog.`default`.SRC;
For kerberized kyuubi clusters, please refer to Kerberos Authentication for more information.