Skip to main content

Overview

This template provides a production‑ready Trino instance as a Monk runnable. You can:
  • Run it directly to get a managed distributed SQL query engine
  • Inherit it in your own data infrastructure to query data across multiple sources
Trino (formerly Presto SQL) is a fast distributed SQL query engine for big data analytics. It allows you to query data where it lives, whether in Hadoop, S3, Cassandra, MySQL, or dozens of other data sources, using standard SQL.

What this template manages

  • Trino coordinator
  • Trino workers (optional, for distributed setup)
  • Web UI and query interface
  • Catalog configuration for data sources
  • Query execution engine
  • Web UI on port 8080

Quick start (run directly)

  1. Load templates
  1. Run Trino with defaults
  1. Customize configuration (recommended via inheritance)
Running directly uses the defaults defined in this template’s variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
  • Preferred: inherit and replace variables with secret("...") as shown below.
  • Alternative: fork/clone and edit the variables in trino/trino.yml, then monk load MANIFEST and run.
Once started:
  • Web UI: http://localhost:8080
  • Connect with Trino CLI or JDBC: jdbc:trino://localhost:8080/catalog/schema

Configuration

Key variables you can customize in this template:
Data and configuration are persisted under ${monk-volume-path}/trino on the host. Custom catalog configurations are mounted from ${monk-volume-path}/trino/catalog:/etc/trino/catalog. Inherit the Trino runnable in your data platform and declare connections. Example:
Then set the secrets once and run your data platform group:

Ports and connectivity

  • Service: trino on TCP port 8080
  • Web UI: http://localhost:8080
  • JDBC: jdbc:trino://localhost:8080/catalog/schema
  • From other runnables in the same process group, use connection-hostname("\<connection-name>") to resolve the Trino host.

Persistence and configuration

  • Data path: ${monk-volume-path}/trino:/etc/trino
  • Catalog path: ${monk-volume-path}/trino/catalog:/etc/trino/catalog
  • You can drop additional catalog .properties files into the catalog path to configure data source connectors.

Features

  • Fast Queries: In-memory distributed execution
  • Federated Queries: Query across multiple data sources in one SQL
  • Standard SQL: ANSI SQL support
  • 40+ Connectors: PostgreSQL, MySQL, S3, Hive, Kafka, Elasticsearch, etc.
  • Scalable: Add workers for horizontal scaling
  • No ETL: Query data where it lives, no data movement
  • BI Tool Integration: Tableau, Looker, Metabase, Superset

Supported Connectors

  • RDBMS: PostgreSQL, MySQL, Oracle, SQL Server
  • NoSQL: MongoDB, Cassandra, Redis
  • Cloud Storage: S3, GCS, Azure Blob
  • Data Lakes: Hive, Iceberg, Delta Lake
  • Streaming: Kafka, Kinesis
  • Search: Elasticsearch, OpenSearch
  • And 40+ more…

Catalog Configuration

Example PostgreSQL catalog (/etc/trino/catalog/postgresql.properties):
Example S3/Hive catalog:

Querying with Trino

Connect with Trino CLI:
Run queries:

Use cases

Trino excels at:
  • Data lake analytics
  • Federated queries across silos
  • Interactive analytics on big data
  • Ad-hoc SQL queries
  • BI and reporting on distributed data
  • ETL and data pipeline queries
  • Real-time analytics
  • Data warehouses: postgresql/, clickhouse/, for connecting to RDBMS
  • ETL tools: airflow/, dagster/ for data pipeline orchestration
  • BI platforms: Use Trino as a data source for Tableau, Looker, Metabase, or Superset

Troubleshooting

  • Access Web UI: Navigate to http://localhost:8080 to view running queries and statistics
  • Check catalog connections:
  • Check logs:
  • Slow queries: Check query plan with EXPLAIN statement
  • Connector issues: Verify catalog configuration files in ${monk-volume-path}/trino/catalog
  • Memory errors: Increase query-max-memory or query-max-memory-per-node variables
  • Resource monitoring: Use Web UI to monitor CPU, memory, and query performance
  • Query history: Review failed queries in Web UI for troubleshooting