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:
- Tableau 2018.3 or later (Windows or Mac).
- Imply 2.8.0 or later.
- The Avatica JDBC driver, which you can get from https://static.imply.io/support/avatica-1.12.0.jar. Druid uses an Avatica JDBC server.
Once you have this software installed, follow these steps:
- 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.
- Launch Tableau and choose the "Other databases (JDBC)" connection option.
- 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).
- Select the dialect "SQL92".
- Enter a username and password if you have enabled authentication on your Druid cluster. Otherwise, leave them blank.
- 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.
- Click "Sign In".
- 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.
- Save a copy of the CA to your local machine. If you are using Imply Cloud you can download it from the "API" tab.
- Use keytool to create a truststore: keytool -import -alias druid -file downloaded_crt_file.crt -storetype JKS -keystore truststore.jks
- 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;
Article is closed for comments.