home User Guide Getting Started Help Center Documentation Community Training Certification
menu
close
settings
Looker keyboard_arrow_down
language keyboard_arrow_down
English
Français
Deutsch
日本語
search
print
Apache Druid

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

druid.sql.enable=true

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

druid.sql.planner.useApproximateCountDistinct=false

Configuring a connection

  1. In the Admin section of Looker, select Connections, and then select New Connection.

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

      Warning: Druid’s SQL sqlTimeZone support is not supported by Looker. If you set sqlTimeZone, your results may vary.

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

      To connect to an SSL secured cluster, you must install the cluster’s truststore.jks file onto the Looker host and include these parameters in the Additional Params section of Looker’s Connection Settings page (see above):

      • truststore=/path/to/truststore.jks
      • truststore_password=changeit

    If your Looker instance is Looker-hosted, contact your Looker analyst for assistance. If your Looker instance is customer-hosted, you will need command line access to install this file onto your Looker host.

    • 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+.
  3. 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.

  4. Click Add Connection to save these settings.

  5. 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 21.6, Apache Druid supports the following Looker features:

In Looker 21.6, Apache Druid 0.13+ supports the following Looker features:

In Looker 21.6, Apache Druid 0.18+ supports the following Looker features:

Next steps

After you have completed the database connection, configure authentication options.

Top