Connecting Superset to StarTree Cloud
How to Install Superset
Pre-requisites
To allow Superset to work, Python 3 is required. You must also have pinotdb
and postgres
installed on your device. To install pinotdb
, run pip3 install pinotdb
. For postgres
, install by running pip3 install postgres
.
Start Superset with Docker Image
Start running Superset Image with pre-built Superset Pinot connector.
- Run below command to start a standalone Superset deployment
docker run \
--name=superset \
-p 8088:8088 \
-d apachepinot/pinot-superset:latest
- (First time) Setup Admin account by running below command and follow instructions to set password.
docker exec -it superset superset fab create-admin \
--username admin \
--firstname Superset \
--lastname Admin \
--email admin@superset.com \
--password admin
- (First time) DB upgrade and Initialize Superset
docker exec -it superset superset db upgrade
docker exec -it superset superset init
- Import Pre-defined Pinot Datasources and Dashboard
docker exec \
-t superset \
bash -c 'superset import_datasources -p /etc/examples/pinot/pinot_example_datasource_quickstart.yaml && \
superset import_dashboards -p /etc/examples/pinot/pinot_example_dashboard.json'
- Go to SuperSet UI: http://localhost:8088/ to play around with dashboard.
Connecting to SuperSet using Apache Pinot
This guide will show you how to connect to Superset using Apache Pinot.
In Superset, click the + button, hover over Data, and select Connect database.
Next, click on the Supported Databases dropdown, then select Other.
Superset uses the following URL syntax when asking for your SQLALCHEMY URI:
pinot+https://<my-user>:<my-password>@<pinot-broker-host>:<pinot-broker-port><pinot-broker-path>?controller=https://<pinot-controller-host>:<pinot-controller-port>/[&&verify_ssl=<true/false>]
For example:
pinot+https://{username}:{password}@my-secure-pinot-broker:443/query/sql?controller=https://my-secure-pinot-controller/&&verify_ssl=true
Please follow the doc to generate a API token and Credential.
For example:
Below is your Pinot API Token NGNlZmI4NDgwZjhmNGE3ODg2YTVjOWRhMTA1NmE3YjU6eVlHVVlsV1BVaU5OTjQ2bkZaY09vM2FUT3FJQ1AyYUFrMXF4VDVCOEFKUT0=
And the username and password are:
username = 4cefb8480f8f4a7886a5c9da1056a7b5
password = yYGUYlWPUiNNN46nFZcOo3aTOqICP2aAk1qxT5B8AJQ=
Copy your username and password and enter the parameters into your URL like the example below:
pinot+https://4cefb8480f8f4a7886a5c9da1056a7b5:yYGUYlWPUiNNN46nFZcOo3aTOqICP2aAk1qxT5B8AJQ=@my-secure-pinot-broker:443/query/sql?controller=https://my-secure-pinot-controller/&&verify_ssl=true
Now that you have your URL, click Apache Pinot and enter your SQLALCHEMY URI in the above format.
Test the connection to ensure the URI works, then click Connect.