Articles in this section

How to connect an Imply druid cluster with SuperSet

Table of contents:

1) Installing Apache Superset.

2) Pre-requisite to setup the druid connection

3) Creating Druid Connection

4) Adding the druid data source as a superset dataset

 

Installing Apache Superset.

Please follow the official documentation to install Apache superset.

To install the instance using docker-compose, follow this:

https://superset.apache.org/docs/installation/installing-superset-using-docker-compose

To Install SuperSet on macOS , follow the guide here: http://superset.apache.org/installation.html

 

Once it is installed and started, you can access the superset at <IP_ADDR>:8088.

Default Credentials:

admin/admin

 

http://44.192.126.178:8088/
admin/admin
Above instance is created through docker compose

If it is not accesible , start the instance

1)log into the instance and cd /home/ubuntu/superset/
2)change to root user sudo -su root
3)Run the docker compose command to start the instance

docker-compose -f docker-compose-non-dev.yml up

 

Prerequisites to Create Druid connection

The main prerequisite to having a druid connection created is to have pydruid installed on the superset instance.

pip install pydruid.

For superset installed on docker, please perform the below steps

https://superset.apache.org/docs/databases/docker-add-drivers

1) run echo "pydruid" >> ./docker/requirements-local.txt
2) docker-compose build --force-rm
3) docker-compose up

https://superset.apache.org/docs/databases/druid

 

Creating a Connection:

Once the pydruid is installed, the next step is to create the connection.

1) On superset UI, click on the add ‘Database’

7781881f-c866-48e9-b101-4244a0fe7d7a.png

2) Choose ‘Apache Druid’

fbc84e54-dd7b-497d-888a-49d7bec26747.png

 

3) Provide a Unique Display name, SQL Alchemy URI (see notes below), and Security Info.

72b5fe3d-25a8-4c50-978c-990460608e03.png

SQL Alchemy URI:

For Localhost or Imply private or druid opensource etc:

druid://<ip_add_broker>:8082/druid/v2/sql

For Imply Hybrid:

druid://<User>:<password>@<Host>:<Port-default-9088>/druid/v2/sql

Get the details from the Imply Manager UI > API > Security Section

Download the Root Certificate and paste it into the Advanced Tab > Security > Root Certificate.Pasted Graphic (1).png

 

f29b498b-eb29-4499-9a89-9935b1b57ed2.png

 

You can also disable the SSL verification by adding below in the Advanced Tab> Security >Secure Extra section

44db8783-51e1-4f04-826a-de0af7e28fa8.png

 

4) Test the connection.

 

Adding the Druid data source as a Superset dataset

 

Once the test connection is successful and created, the next step is to add the dataset.

 

1) Under Datasets tab > click on add ‘Dataset’

8c36bbd6-a066-402c-8ab0-8d19f0bc6c4d.png

2) Choose the Database (Created in the previous step), Schema as a druid, and Table schema (datasources in druid)

 

000a24be-ebd1-4328-9532-2a0fb0e427e1.png

 

3) Then click on 'Add dataset and create chart'

41ef6e5a-321b-4249-9535-5ae68e05f764.png

14e6902d-3a1e-464e-9e71-6ec7a2be413d.png

 

 

 

Explore the Superset official documentation for more information on the charts etc.

https://superset.apache.org/docs/creating-charts-dashboards/creating-your-first-dashboard/

 

 

 

Was this article helpful?
0 out of 0 found this helpful