Configuring your Apache Druid cluster
<DRUID_BASE_DIR>
refers to the base directory in which the Apache Druid cluster is installed on a server.
Enabling SQL
To enable SQL on your Druid database, add this line to the broker/runtime.properties
configuration file:
<DRUID_BASE_DIR>/conf/druid/broker/runtime.properties
Turning off COUNT DISTINCT
approximation (optional)
By default, Druid approximates COUNT DISTINCT
. For precise results, add this line to the broker/runtime.properties
configuration file:
<DRUID_BASE_DIR>/conf/druid/broker/runtime.properties
Configuring a connection
In the Admin section of Looker, select Connections, and then select New Connection.
Fill in the fields as follows:
- Name: The name of the connection.
- Dialect: Apache Druid, Apache Druid 0.13+, or Apache Druid 0.18+.
- Host: DNS or IP of the cluster Broker. You can find this in your
broker/runtime.properties
file. - Port: The port of the Broker. The default port is 8082. If your cluster is secured by SSL, the default port is 8182.
- Database: The name of your database. The default is
druid
. - Username: The database username if your Apache Druid cluster is configured to use Druid Basic Security. If it is not, then you can specify any string.
- Password: The user password. If your cluster is not configured to use Druid Basic Security, then you can specify any string.
- Schema: The default schema to use when there is no schema specified. Entering a schema is optional.
Additional Params: Semicolon delimited Avatica JDBC parameters.
- These properties can be set as connection properties:
useApproximateCountDistinct
useApproximateTopN
useFallback
sqlTimeZone
Example:
useApproximateCountDistinct=false;truststore=/path/to/truststore.jks;truststore_password=changeit
- These properties can be set as connection properties:
PDT and Datagroup Maintenance Schedule: A
cron
expression that indicates when Looker should check datagroups and persistent derived tables. Read more about this setting in our PDT and Datagroup Maintenance Schedule documentation.SSL: Check if your Apache Druid cluster is configured to use Druid TLS.
- Verify SSL: Check to enforce strict hostname verification.
- Max Connections: The default is 25.
- Connection Pool Timeout: The default is 120 seconds.
- SQL Runner Precache: To cause SQL Runner not to preload table information and to load table information only when a table is selected, uncheck this option. Read more about this setting in our SQL Runner Precache documentation.
- Database Time Zone: Database timezone. Supported in Apache Druid 0.13+ and Apache Druid 0.18+.
Click Test These Settings to verify a connection.
Looker runs a
SELECT 1
query to verify a basic connection and perform a query test. It does not validate that the catalog and schema combination exist or that the user has the required access to that schema.If you have any issues, check out our Testing Connections documentation.
Click Add Connection to save these settings.
Test the connection in SQL Runner. Navigate to SQL Runner, select your connection and schema, then check if you can see your database tables.
Feature support
For Looker to support some features, your database dialect must also support them.
In Looker 22.6, Apache Druid supports the following Looker features:
In Looker 22.6, Apache Druid 0.13+ supports the following Looker features:
In Looker 22.6, Apache Druid 0.18+ supports the following Looker features:
Next steps
After you have completed the database connection, configure authentication options.