Druid Install:
- Install Druid and run.
- Get broker port number from druid configuration, mostly 8082 if not changed.
- Add a test data source to your druid so you can access that from superset
- Test
- $ curl http://localhost:8082/druid/v2/datasources
- [“testdf”,”plants”]
- Note: You should get a list of configured druid data sources.
- Note: If the above command does not work, please fix it first before connecting with superset.
- $ curl http://localhost:8082/druid/v2/datasources
Superset Install:
- Make sure you have python 3.6 or above
- Install pydruid to connect from the superset
- $ pip install pydruid
- Install Superset and run
Superset Configuration for Druid:
Step 1:
At Superset UI, select “Sources > Drid Clusters” menu option and fill the following info:
- Verbose Name: <provide a string to identify cluster>
- Broker Host: Please input IP Address or “LocalHost” or FQDN
- Broker Port: Please input Broker Port address here (default druid broker port: 8082)
- Broker Username: If configured input username or leave blank
- Broker Password: If configured input username or leave blank
- Broker Endpoint: Add default – druid/v2
- Cache Timeout: Add as needed or leave empty
- Cluster: You can use the same verbose name here
The UI looks like as below:
Save the UI.
Step 2:
At Superset UI, select “Sources > Drid Datasources” menu option and you will see a list of data sources that you have configured into Druid, as below.
That’s all you need to get Superset working with Apache Druid.
Common Errors:
[1]
Error:
Error while processing cluster ‘druid’ name ‘requests’ is not defined
Solution:
You might have missed installing pydruid. Please install pydruid or some other python dependency to fix this problem.
[2]
Error while processing cluster ‘druid’ HTTPConnectionPool(host=’druid’, port=8082): Max retries exceeded with url: /druid/v2/datasources (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x10bc69748>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known’))
Solution:
Either your Druid configuration at Superset is wrong or missing some important value. Please follow the configuration steps to provide correct info.
That’s all for now.
@avkashchauhan