Superset (Tier 3 – Orchestration & BI)¶
Purpose: SQL exploration and dashboarding UI on top of Trino catalogs (Hive, Delta/Lakehouse).
Image¶
- Custom image built from
docker/superset.Dockerfile, which layers on top ofapache/superset:${SUPERSET_VERSION}. - Installs
psycopg2-binaryfor the PostgreSQL metadata database. - Installs
sqlalchemy-trinoso Superset can talk to Trino catalogs out of the box.
Configuration¶
- Templates:
templates/superset/superset.env.tpl→config/superset/superset.envviamake config-superset.templates/superset/superset_config.py.tpl→config/superset/superset_config.py.- Key environment variables (set in
.env): SUPERSET_VERSION– image tag.SUPERSET_PORT– host/UI port (default8088).SUPERSET_DB_NAME– metadata database (created inside PostgreSQL).SUPERSET_SECRET_KEY– Flask secret key for sessions/CSRF.SUPERSET_ADMIN_*– bootstrap admin user (username, password, email, names).- Runtime dependencies:
- Metadata DB: PostgreSQL (
postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${SUPERSET_DB_NAME}). - Named volume:
flumen_superset_homemounted at/app/superset_home(stores uploads, config, and state).
Usage¶
make build-superset # Build custom image (auto-run by compose if skipped)
make config-superset # Render env + config
make superset-db # Ensure metadata database exists in PostgreSQL
make up-tier3 # Starts Trino + Superset
make health-superset # HTTP health probe
make logs-superset # Tail logs
make shell-superset # Bash shell inside the container
Access the UI at http://localhost:${SUPERSET_PORT} (defaults to http://localhost:8088).
Default Credentials¶
- Username:
admin - Password:
admin123
Update these values in .env before running make config-superset to avoid using the defaults.
Connect Superset to Trino¶
Add a new Database inside Superset:
- Go to Settings → Database Connections → + Database.
- Choose Other and use the SQLAlchemy URI (the
sqlalchemy-trinodriver is already installed): - From inside the Docker network:
trino://trino@trino:8080/lakehouse - From your host:
trino://trino@localhost:8082/lakehouse(orhost.docker.internalon macOS/Windows iflocalhostdoes not reach the container) - Test the connection and save. The catalog list (
hive,delta,lakehouse) becomes available for dataset creation.
Initialization Details¶
The container command performs:
superset db upgrade– apply migrations.superset fab create-admin ...– idempotently create the admin user using.envvalues.superset init– load default roles and permissions.- Start Gunicorn (
gunicorn -w 4 -k gevent ...).
Troubleshooting¶
- Login fails immediately: ensure browser cookies are allowed and
SUPERSET_SECRET_KEYremains stable between restarts (set it explicitly in.env). - Cannot reach Superset: run
make health-supersetand inspectdocker compose -f docker-compose.tier3.yml logs superset. - Metadata DB errors: run
make superset-dbafter Tier 0 (PostgreSQL) is healthy so thesupersetdatabase exists before starting the container. - Timeout when querying Trino: confirm Tier 3 services are on the same Docker network (start with
make up), and verify the SQLAlchemy URI uses the internal hostnametrino.