Skip to main content

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.

Connect to Apache Druid

  1. In the Dremio console, click Add Data on the Home page.
  2. In the Add Data dialog, select Apache Druid.
  3. Configure the connection using the sections below, then click Save.

General

  1. In the Name field, specify the name of the connection. 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 Apache Druid.
    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 username and password for Dremio to use when connecting to Apache Druid.

Advanced Options

On the Advanced Options page, you can set values for these optional parameters:

OptionDescription
Maximum Idle ConnectionsThe total number of connections allowed to be idle at a given time. The default is 8.
Connection Idle TimeThe amount of time (in seconds) allowed for a connection to remain idle before the connection is terminated. The default 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. This is 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 object names such as databases and tables. Set the time interval using this parameter.

    ParameterDescription
    Fetch every (Optional)The frequency to fetch object names in minutes, hours, days, or weeks. The default is 1 hour.
  • Dataset Details: The metadata that Dremio needs for query planning, such as information about fields, types, shards, statistics, and locality. These are the parameters to fetch the dataset information.

    ParameterDescription
    Fetch modeChoose to fetch only from queried datasets (set by default). Dremio updates details for previously queried objects. Fetching from all datasets is deprecated.
    Fetch everyThe frequency to fetch dataset details in minutes, hours, days, or weeks. The default is 1 hour.
    Expire afterThe expiry time of dataset details in minutes, hours, days, or weeks. The default is 3 hours.

Privileges

This connection inherits privileges from Project settings. To grant specific users or roles additional privileges in this connection:

  1. Enter the username 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.

See Privileges for additional information about privileges.

Edit an Apache Druid Connection

  1. On the Open Catalog page, under Connections, right-click the connection and select Settings.
  2. Update the connection configuration as needed.
  3. Click Save.

Delete an Apache Druid Connection

  1. On the Open Catalog page, under Connections, right-click the connection and select Delete.
  2. Click Delete to confirm.

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
||