Skip to main content
Version: current [25.x]

Apache Druid

Apache Druid is a high performance, real-time analytics database that delivers sub-second queries on streaming and batch data at scale and under load.

Prerequisite

Ensure that your Dremio cluster is at version 24.2 or later.

Configuring Apache Druid as a Source

  1. On the Datasets page, to the right of Sources in the left panel, click This is the Add Source icon..
  2. In the Add Data Source dialog, under Databases, select Druid.

General

  1. In the Name field, specify the name by which you want the Druid source to appear in the list of data sources. The name cannot include the following special characters: /, :, [, or ].

  2. Under Connection, follow these steps:

    1. In the Host field, specify the hostname or IP address of the Druid source.
    2. In the Port field, specify the port to use. The default port is 8888.
    3. (Optional) Select Use SSL to use SSL to secure connections.
  3. Under Authentication, specify the Apache Druid username. Then, choose a method for providing the Apache Druid password from the dropdown menu:

    • Dremio: Provide the Apache Druid password in plain text. Dremio stores the password.

    • Azure Key Vault: Provide the URI for the Azure Key Vault secret that stores the Apache Druid password. The URI format is https://<vault_name>.vault.azure.net/secrets/<secret_name> (for example, https://myvault.vault.azure.net/secrets/mysecret).

      note

      To use Azure Key Vault as your application secret store, you must:
      - Deploy Dremio on Azure.
      - Complete the Requirements for Authenticating with Azure Key Vault.

      It is not necessary to restart the Dremio coordinator when you rotate secrets stored in Azure Key Vault. Read Requirements for Secrets Rotation for more information.

    • AWS Secrets Manager: Provide the Amazon Resource Name (ARN) for the AWS Secrets Manager secret that holds the Apache Druid password, which is available in the AWS web console or using command line tools.

    • HashiCorp Vault: Choose the HashiCorp secrets engine you're using from the dropdown menu and enter the secret reference for the Apache Druid password in the correct format in the provided field.

Advanced Options

On the Advanced Options page, you can set values for these non-required options:

OptionDescription
Maximum Idle ConnectionsThe total number of connections allowed to be idle at a given time. The default maximum idle connections is 8.
Connection Idle TimeThe amount of time (in seconds) allowed for a connection to remain idle before the connection is terminated. The default connection idle time is 60 seconds.
Query TimeoutThe amount of time (in seconds) allowed to wait for the results of a query. If this time expires, the connection being used is returned to an idle state.

Reflection Refresh

On the Reflection Refresh page, set the policy that controls how often reflections are scheduled to be refreshed automatically, as well as the time limit after which reflections expire and are removed.

OptionDescription
Never refreshSelect to prevent automatic reflection refresh, default is to automatically refresh.
Refresh everyHow often to refresh reflections, specified in hours, days or weeks. This option is ignored if Never refresh is selected.
Never expireSelect to prevent reflections from expiring, default is to automatically expire after the time limit below.
Expire afterThe time limit after which reflections expire and are removed from Dremio, specified in hours, days or weeks. This option is ignored if Never expire is selected.

Metadata

On the Metadata page, you can configure settings to refresh metadata and handle datasets.

Dataset Handling

These are the optional Dataset Handling parameters.

ParameterDescription
Remove dataset definitions if underlying data is unavailableBy default, Dremio removes dataset definitions if underlying data is unavailable. Useful when files are temporarily deleted and added back in the same location with new sets of files.

Metadata Refresh

These are the optional Metadata Refresh parameters:

  • Dataset Discovery: The refresh interval for fetching top-level source object names such as databases and tables. Set the time interval using this parameter.
ParameterDescription
(Optional) Fetch everyYou can choose to set the frequency to fetch object names in minutes, hours, days, or weeks. The default frequency to fetch object names is 1 hour.
  • Dataset Details: The metadata that Dremio needs for query planning such as information required for fields, types, shards, statistics, and locality. These are the parameters to fetch the dataset information.
ParameterDescription
Fetch modeYou can choose to fetch only from queried datasets that are set by default. Dremio updates details for previously queried objects in a source. Fetching from all datasets is deprecated.
Fetch everyYou can choose to set the frequency to fetch dataset details in minutes, hours, days, or weeks. The default frequency to fetch dataset details is 1 hour.
Expire afterYou can choose to set the expiry time of dataset details in minutes, hours, days, or weeks. The default expiry time of dataset details is 3 hours.

Privileges

On the Privileges tab, you can grant privileges to specific users or roles. See Access Controls for additional information about privileges.

note

All privileges are optional.

  1. For Privileges, enter the user name or role name that you want to grant access to and click the Add to Privileges button. The added user or role is displayed in the USERS/ROLES table.
  2. For the users or roles in the USERS/ROLES table, toggle the checkmark for each privilege you want to grant on the Dremio source that is being created.
  3. Click Save after setting the configuration.

Updating a Druid Source

To update a Druid source:

  1. On the Datasets page, under Databases in the panel on the left, find the name of the source you want to update.
  2. Right-click the source name and select Settings from the list of actions. Alternatively, click the source name and then the The Settings icon at the top right corner of the page.
  3. In the Source Settings dialog, edit the settings you wish to update. Dremio does not support updating the source name. For information about the settings options, see Configuring Apache Druid as a Source.
  4. Click Save.

Deleting a Druid Source

note

If the source is in a bad state (for example, Dremio cannot authenticate to the source or the source is otherwise unavailable), only users who belong to the ADMIN role can delete the source.

To delete a Druid source, perform these steps:

  1. On the Datasets page, click Sources > Databases in the panel on the left.
  2. In the list of data sources, hover over the name of the source you want to remove and right-click.
  3. From the list of actions, click Delete.
  4. In the Delete Source dialog, click Delete to confirm that you want to remove the source.
note

Deleting a source causes all downstream views that depend on objects in the source to break.

Predicate Pushdowns

These operations are performed by Druid:

!=
*
+
-
/
<
<=
<>
=
>
>=
abs
acos
and
asin
atan
atan2
avg
cast
ceil
concat
convert_timezone
cos
cot
degrees
floor
is not null
is null
length
like
ln
log
lower
lpad
ltrim
max
min
mod
not
or
power
radians
regexp_like
replace
reverse
round
rpad
rtrim
sign
sin
substr
substring
sum
tan
tanh
trim
upper
||