Apache Druid
  • 24 Feb 2023
  • 2 Minutes to read
  • Dark

Apache Druid

  • Dark

Article summary


In this article we will explain how to connect an Apache Druid (Imply) database to Preset. So let's get started!

Allowlist Preset IPs

Preset Cloud runs on four regions. For Preset to access your data, first thing you need to do is to add region based Preset IP addresses to your Inbound and Outbound firewall rules.

us-west-2 (us1a)us-east-1 (us2a)eu-north-1 (eu5a)ap-northeast-1 (ap1a)

If you are not sure where your Preset workspace is located, you can refer to the URL on your browser when accessing Preset. It should look like this: https://xxxxxxxx.us2a.app.preset.io/superset..., where us2a means it is in us-east-1.

Step 1: Retrieve Data from Imply

In order to connect Apache Druid (Imply) to Preset, we first need to retrieve some key data from the Imply environment:

  • Required to Construct SQLAlchemy URI
    • Initial Druid API User
    • Initial Druid API Pass
    • Public Load Balancer Endpoint
  • Required Security for Preset
    • Root Certificate

To start, let's navigate to your Imply cluster and then select Manage.


...then select API.

You will notice that this screen contains all of the required information for the subsequent connection steps below.


Step 2: Connect Database to Preset

Add Database

Let's start by selecting + Database — have a look at Connecting your Data if you need help wth this step.

...then, in the Connect a database window, select Apache Druid in the Supported Databases field.


In the Display Name field, enter a meaningful name for the new connection to the Apache Druid database. In this example, we simply used the default Apache Druid.

In the SQLAlchemy URI field, customize your URI connection string using the following syntax:

Alternative URI

In the event that you do not have authorization set up, you can replace druid+https with druid+http and skip the username and password credentials.

Required elements retrieved earlier that will be used here include:

  • Initial Druid API User
  • Initial Druid API Pass
  • Public Load Balancer Endpoint

When done, select the Advanced tab.


Configure Advanced Tab

In the Imply API menu screen referenced in Step 1 above, navigate to the URL in the Root Certificate field and then copy the certificate.

In Preset with the Advanced tab selected, expand the Security section.

In the Root Certificate field, paste the certificate from your system's clipboard.


Next, expand the Other section.


In the Engine Parameters section, enter the following parameters:

        "useGroupingSetForExactDistinct": "true",
        "useUseApproximateCountDistinct": "false"


When done, return to the previous screen by selecting the Basic tab.


Test and Connect

To test your connection, select Test Connection. If successful, a notification message appears:


After a successful test, go ahead and select Connect to finalize the connection.


Congratulations, your Apache Druid database is now connected to Preset!

Was this article helpful?