Apache Druid
  • 18 Nov 2022
  • 2 Minutes to read
  • Contributors
  • Dark

Apache Druid

  • Dark


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 currently runs on three regions with the IPs listed below, and those need to be allowlisted so Preset can access your data.

Before starting, please take a moment to allowlist the IPs below based on the region that you're deployed in.

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

From the Home Page, in the Toolbar, hover your cursor over Data and then select Databases.


Select + Database.


The Connect a database window appears.

Configure Basic Tab

In the Supported Databases field, select Apache Druid.


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.

And we could mention that they can also use druid+http if that's the case, and skip username/password if they don't have auth set up

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?