Use CrateDB With DBeaver, a Multipurpose Database Tool for Developers and Database Administrators

2019-05-01, by Naomi Slater

CrateDB is a distributed SQL database that makes it simple to store and analyze massive amounts of machine data in real-time.

Because CrateDB provides a JDBC driver, you can access CrateDB with any client tool that supports JDBC drivers.

For example: DBeaver is free and open source database tool for developers and database administrators. It runs on any platform and supports any database with a JDBC driver.

In this post, I will show you how to get started with CrateDB and DBeaver as a desktop client for macOS. But these instructions should be trivially adaptable for Linux or Windows.

Install CrateDB

If you don't already have CrateDB running locally, it's very easy to get set up.

Run this command:

$ bash -c "$(curl -L https://try.crate.io/)"

This will download CrateDB (version 3.3.2 at the time of writing) and runs it from the tarball. If you'd like to actually install CrateDB a bit more permanently, or you are using Windows, check out our collection of one-step install guides.

If you're using the command above, it should pop open the CrateDB admin UI for you automatically once it has finished. Otherwise, head over to http://localhost:4200/ in your browser.

You should see something like this:

CrateDB admin UI

Get some data

If you’re playing around with a fresh CrateDB install, chances are you don't have any data. So head on over to the Help screen by selecting the question mark icon on the left-hand navigation menu.

The help screen looks like this:

CrateDB admin UI

Select IMPORT TWEETS FOR TESTING and follow the instructions to authenticate your Twitter account.

Don't worry. This isn’t going to post anything on your behalf. It doesn’t even look at your tweets. All this does is import a bunch of recent public tweets on Twitter.

Once you're done, select the Tables icon from the left-hand navigation, and then select the tweets table. You should end up here:

http://localhost:4200/#/tables/doc/tweets

Which should look like this:

CrateDB admin UI

From here, you can select QUERY TABLE, and then EXECUTE QUERY on the following screen to get a table view of your data:

CrateDB admin UI

Get DBeaver running

Head over to the DBeaver download page and select the version you want to download. I'm running macOS, so I chose the Mac OS X (dmg) download for the Community Edition 6.0.3.

When you open DBeaver for the first time, you will be prompted to create a new database connection. From this window, select SQL from the tabbed menu on the left-hand side, and then select CrateDB:

DBeaver interface

Select Next.

On the next screen, all you have to change is the username and password.

Enter crate in both fields:

DBeaver interface

Select Finish.

DBeaver will then prompt you to download and install the CrateDB driver files:

DBeaver interface

Select Download.

Once the driver files are downloaded, DBeaver should connect to CrateDB and a tree menu will be shown in the left-hand pane. Using this tree menu, navigate to doc, Tables, tweets:

DBeaver interface

And there it is! Your tweets table!

Select the Data tab to browse your table data:

DBeaver interface

Wrap up

DBeaver is a free and open source cross-platform multi-purpose database tool with built-in support for CrateDB. Explore your database, run queries, manage your data, and much more.

Now you have DBeaver installed and running, why don't you explore the full list of features.

Don't forget to check out the other clients that work with CrateDB.

Newsletter

Stay up to date

Sign up here to keep informed about CrateDB product news,
events, how-to articles, and community update.