querying starburst / trino from apache superset (in 7 steps)

This post offers up a short list of steps for running Superset using Docker Compose on a Mac and then making a client connection to, and querying data from, a Starburst (Enterprise or Galaxy) cluster.

I think I’ve got it down to 7 (relatively) quick steps!

As always, Starburst Documentation has great instructions for making this client connection. It did seem that maybe one additional command was missing, but it is identified in the very next link of the doc page; Trino Community Broadcast 12.

Now that I have referenced where I got all the information… Let’s Do This!!

Step 1

Ensure Docker will allocate >= 6GB of memory.

Step 2

Clone the repo.

cd repos/apache
git clone https://github.com/apache/superset.git

Step 3

Set up the Trino driver.

cd superset
echo "sqlalchemy-trino" >> ./docker/requirements-local.txt

Step 4

Start Superset.

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

Step 5

Log in as user admin with password admin at http://localhost:8088.

Step 6

Create the driver by navigating to Settings (upper-right corner) > selecting Database Connections link from the pull down > clicking on the + DATABASE button > choosing Trino from SUPPORTED DATABASES pulldown > entering an appropriate SQLALCHEMY URI (syntax below) > then clicking on the CONNECT button.

trino://username:password@hostname:port

OK… that was really SIX (sub)steps, or maybe six CLICKS? 😉

Step 7

Navigate to the query editor by visiting SQL > SQL Lab and then running a query.

Published by lestermartin

Developer advocate, trainer, blogger, and data engineer focused on data lake & streaming frameworks including Trino, Hive, Spark, Flink, Kafka and NiFi.

Leave a Reply

Discover more from Lester Martin (l11n)

Subscribe now to keep reading and get access to the full archive.

Continue reading