Does anyone have any experience connecting to Druid using Tableau desktop?
I have followed this document here https://community.tableau.com/thread/290365
And then I try to use the model file as mention here: https://calcite.apache.org/docs/druid_adapter.html . I defined the model and safe as a file. On the Tableau login box I select the model properties file. Login is fine, but there is still no schema or table show up after I connect.
What am I missing?
What version of Druid and Tableau are you using?
With Tableau 2018.3+ and Druid 0.14+ it’s much easier: just use Tableau’s JDBC connectivity with the Avatica jar, which you can get from here: https://search.maven.org/artifact/org.apache.calcite.avatica/avatica/1.13.0/jar and follow the instructions for JDBC on the Druid SQL page: http://druid.io/docs/latest/querying/sql
Thanks for the respond. I am using Druid 0.14 and Tableau 2019.01. Yes, I dowloaded the jar and jdbc connect. I was able to connect, but unable to see any tables. Do I need to do anything extra? Or any places I should check for the missing tables? while i use dsql, it shows all datasources and i have put all all datasources in the default druid schema.
It should work if you do the following:
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 this 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.
Thanks Gian. I was doing the same as you mentioned. I could login but it just does not show any database or table from selection.
If I do the dsql, it shows all tables.
│ TABLE_SCHEMA │ TABLE_NAME │
│ druid │ event_stats │
│ druid │ batch_event_stats_2019_04_17_01 │
│ druid │ batch_event_stats_2019_04_17_local_01 │
│ druid │ batch_event_stats_2019_04_18_01 │
│ druid │ batch_event_stats_2019_04_18_02 │
│ druid │ CRICKET_event_stats │
│ INFORMATION_SCHEMA │ COLUMNS │
│ INFORMATION_SCHEMA │ SCHEMATA │
│ INFORMATION_SCHEMA │ TABLES │
│ sys │ segments │
│ sys │ server_segments │
│ sys │ servers │
│ sys │ tasks │
Retrieved 13 rows in 0.02s.
Here is what I found from the broker log:
2019-04-29T18:39:07,835 ERROR [qtp1657920572-112] org.apache.calcite.runtime.CalciteException - org.apache.calcite.sql.validate.SqlValidatorException: Ordinal out of range
2019-04-29T18:39:07,836 ERROR [qtp1657920572-112] org.apache.calcite.runtime.CalciteException - org.apache.calcite.runtime.CalciteContextException: At line 5, column 10: Ordinal out of range
I think this is probably the issue why the database is not found. I will look for an answer.
I found I was wrong about my druid distribution. It was 0.13.0. Not 0.14.0. After I upgraded to the newer version. I am able to connect to Tableau and see all the tables in the druid schema.