Skip to main content

Query Presto Cluster with Apache Superset

This page will help you configure Apache Superset so that you can query your Presto Clusters.

Open Apache Superset#

Find Apache Superset Endpoint information#

The cluster detail page for each cluster includes a section that provides information about Apache Superset. Start by going to the Apache Superset Information section in the Presto cluster detailed screen and copy the Apache Superset Endpoint.

Apache Superset endpoints

Login to Apache Superset#

Apache Supserset Login

Go to Databases Screen#

After loggin in, go to the Sources tab in the Superset console and select Databases.

Next click on the + icon on the top right of the Databases screen.

Apache Supserset Databases Screen

Setup the connection string in Apache Superset#

On the Add Database page, you will configure Superset to point it to your Presto Cluster.

  • Enter a database name: This is only to give you a reference in Supetset. It doesn't need to match with the database name in Presto or schema name or any resource.

  • Enter the SQLAlchemy URI: This is the connection string provided to you on your cluster details page as Apache Superset Connection. The connection string must include the catalog name you want to connect to. To connect to the Ahana-managed Hive Metastore, append /ahana_hive at the end of the connection string as shown in the image below.

Example connection string to connect to Ahana-managed Hive Metastore catalog of the Presto Cluster


Apache Superset and the Presto Clusters are all located in the Ahana Compute Plane deployed on Amazon Elastic Kubernetes Service. Because of this, an internal endpoint can be used for the connection string with subdomain svc.cluster.local with port 8585.

Apache Supserset Add Database

  • You can click on the Test Connection button to check if Superset is able to get a response from the endpoint.

  • To query the Presto cluster by running queries in Apache Superset, remember to check ✔ the box for Expose in SQL Lab.

  • To run statements like CREATE TABLE, don’t forget to check ✔ the Allow DML box in your Database configuration.

Query Presto with Apache Superset#

Once the configuring Superset with the connection information is complete, you are ready to begin querying your Presto clusters.

Bring up SQL Editor#

Go to the SQL Lab tab in the Superset menu and click on SQL Editor as shown below.

Apache Supserset SQL Editor

Select the Presto cluster#

In the SQL Editor, select the database you just configured on the box on the left as shown below.

Select Presto cluster in SQL Editor

Query the Presto cluster#

Next, select the schema and the table you want to query. Type in a query into the query editor section and click Run Query. You are now off to querying Presto with Apache Superset.

Select Presto cluster in SQL Editor