Articles in this section

Connecting Tableau to Druid with JDBC

Tableau 2018.3 introduced support for JDBC connections, which you can use to connect to Druid. This article documents the technique for Imply 2.8+, but it also works for Apache Druid 0.14.0+.

Please note that not all Tableau functions have been fully tested and verified.

To do this, you will need:

Once you have this software installed, follow these steps:

  1. Place the "avatica-1.12.0.jar" file in Tableau's Drivers folder. On Windows this is C:\Program Files\Tableau\Drivers. On Mac it is ~/Library/Tableau/Drivers.
  2. Launch Tableau and choose the "Other databases (JDBC)" connection option.
  3. Enter the URL "jdbc:avatica:remote:url=http://DRUID-QUERY-SERVER:8082/druid/v2/sql/avatica/" (replacing DRUID-QUERY-SERVER with the hostname or IP address of your Druid query broker).
  4. Select the dialect "SQL92".
  5. Enter a username and password if you have enabled authentication on your Druid cluster. Otherwise, leave them blank.
  6. You can set connection context parameters through a properties file, if you like. If you do not need any special context parameters, leave the properties section blank.
  7. Click "Sign In".
  8. Choose database "druid", schema "druid", and then drag the table you wish to query up to the tables area and click "Sheet 1" to open a worksheet. Joins are not supported, so only use one table at a time.

Setting up a TLS truststore

Some extra steps are necessary to connect to a TLS-enabled Druid cluster where you're using your own CA. This includes Imply Cloud clusters (where Imply configures TLS out of the box, with a cluster-specific CA) or an on-premise Druid cluster with TLS enabled.

  1. Save a copy of the CA to your local machine. If you are using Imply Cloud you can download it from the "API" tab.
  2. Use keytool to create a truststore: keytool -import -alias druid -file downloaded_crt_file.crt -storetype JKS -keystore truststore.jks
  3. Use a JDBC URL with the truststore parameters set, such as jdbc:avatica:remote:url=https://DRUID-QUERY-SERVER:9088/druid/v2/sql/avatica/;truststore=/path/to/truststore.jks;truststore_password=changeit;
Was this article helpful?
2 out of 2 found this helpful