The Distributed SQL Blog

Thoughts on distributed databases, open source, and cloud native

Getting Started with DBeaver EE and YugabyteDB Cloud Query Language (YCQL)

Ecosystem Software Engineer

Developers and DBAs widely use SQL editors to design database schemas, write ad hoc queries, troubleshoot, and manage the security policies and database users. For these reasons, it is essential for us as builders of YugabyteDB to bring native integration with popular database tools like DBeaver.

If you are following the YugabyteDB project and our blog posts, you’ll know YugabyteDB currently supports two APIs – YSQL and YCQL (NoSQL) – for querying the database. The DBeaver Community and Enterprise editions already have support for YSQL, which you can learn about in this blog post. Over the last few months, we worked with the DBeaver engineering team to also bring in first-class support for YCQL in the DBeaver Enterprise edition, and we are excited that it is now generally available.

Starting in DBeaver EE 21.0.0, DBeaver brings in first-class support for working with the YugabyteDB YCQL API. DBeaver EE supports the YugabyteDB YCQL Java driver, which allows natively querying of YugabyteDB YCQL tables and allows querying of the JSONB data type. This blog post walks you through the steps of getting started with DBeaver EE and the YugabyteDB YCQL API.

Prerequisites

You’ll need access to a YugabyteDB cluster. There are multiple ways to set up a YugabyteDB cluster, and we’ll be using the YugabyteDB cluster deployed on a public cloud. The instructions to deploy a YugabyteDB cluster on a public cloud can be found in the docs. Also, if you’re looking for a DBaaS offering with automated deployment, you can check out Yugabyte Platform and Yugabyte Cloud.

Installing DBeaver

Download and Install DBeaver

The first thing to do is download the latest version of DBeaver Enterprise edition, v21.0.0. DBeaver comes in two editions – Community and Enterprise. In this blog post, we are installing the DBeaver Enterprise edition version v21.0.0 on Mac.

We have created a table dbeavertest.books for demo purposes specifically to show the JSONB support in DBeaver.

Schema

Database: dbeavertest

Table: dbeavertest.books

CREATE TABLE dbeavertest.books ( id INT PRIMARY KEY, details JSONB );

Working with DBeaver EE

Launching DBeaver

Once you have installed it, let’s launch DBeaver EE and configure a connection to YugabyteDB YCQL. The DBeaver connection wizard will walk you through the setting up the connection as shown below.

Launch DBeaver EE and Connect to YugabyteDB YCQL

Create a new database connection for connecting to the YugabyteDB cluster:

Creating a New Database Connection for Connecting to YugabyteDB Cluster

And let’s test the connectivity before proceeding.

Test the Connectivity for Yugabyte Cluster

Database Navigator

After the connection is set up you should be able to explore YugabyteDB YCQL tables using the database navigator as shown below.

Database Navigator for YugabyteDB YCQL

Working with the Sample Dataset

Now we are ready to explore the sample dataset and run queries on the JSONB dataset.

Sample JSONB Dataset

We can create a new SQL editor for running YCQL queries. Let’s create a new SQL editor with dbeavertest connected keyspaces.

Example JSON Query:

SELECT * FROM books WHERE details->'author'->>'first_name' = 'William' AND details->'author'->>'last_name' = 'Shakespeare';

Test Shakespeare Sample JSONB Dataset

Conclusion and What’s Next

Now that first-class support for YCQL is generally available in DBeaver Enterprise edition, we wanted to show you how easy it is to get started with DBeaver EE and the YugabyteDB YCQL API. There are many more development and administrative capabilities inside of DBeaver. Make sure to check out the DBeaver.io site to dig into how all their various features work.

Also if you haven’t already, join us in the YugabyteDB community Slack to ask questions, get answers, and participate in the discussion.

Related Posts

Ecosystem Software Engineer