Trino: Distributed SQL Across Data Lakes and Databases

Internet

Trino is an open-source engine for fast, distributed, interactive SQL queries over large data sources. It provides an analytical query layer over data lakes, lakehouses, warehouses, relational databases, NoSQL systems and other sources, without serving as their primary persistent store.

Trino is not a conventional storage database. It connects to other systems, divides queries into work units, executes them across machines and returns results. In modern architectures, it sits between stored data and analytical tools.

It is particularly useful in data lakes and lakehouses. Organisations may store data in Amazon S3, Google Cloud Storage, Azure Data Lake Storage, HDFS or other storage systems. Files may use Parquet, ORC, Avro, JSON or CSV, with tables managed through Apache Iceberg, Delta Lake or Apache Hudi. Trino makes supported sources accessible through SQL.

Its central proposition is to query data where it resides rather than always loading it into one warehouse first. This can reduce permanent duplication, combine systems in one query and make large datasets accessible to SQL users. It does not mean that no data moves during execution, nor does it automatically fix poor modelling, inefficient file layouts, missing metadata or low-quality data. Its value depends on the surrounding architecture.

 

TABLE OF CONTENTS

What Is Trino?

Trino is a distributed SQL query engine for large-scale sources. It analyses and plans a submitted query, divides the work and runs it in parallel on worker nodes before returning results.

A defining capability is querying varied systems through one SQL interface. A query can combine lake-based Parquet data with customer records in PostgreSQL, orders in MySQL and events in Kafka, where suitable connectors and mappings are configured. This is federated querying.

It makes distributed data more accessible to analysts and engineers familiar with SQL. Although the underlying infrastructure can be complex, users can focus on the relevant catalogues, schemas, tables and queries.

It is not intended to handle every workload. Its main strengths include interactive analytics, ad hoc queries, dashboards, data-lake analysis, exploration and federation. It is not designed as an OLTP engine for intensive row-level updates and transactional application processing, or as a standalone persistent store.

 

What Is Trino Used For?

Trino queries large datasets in different systems through SQL. Organisations can analyse data without first consolidating everything into a central warehouse, combine sources and run interactive queries over a lake.

Main applications include:

  • Data-lake querying: Query Parquet, ORC, Avro and other supported formats in S3, HDFS or similar storage.
  • Lakehouse analytics: Query Iceberg, Delta Lake or Hudi tables through their respective connectors.
  • Federated querying: Join tables from different sources in one SQL query.
  • Ad hoc analysis: Explore data and test hypotheses.
  • BI reporting: Connect tools such as Tableau, Power BI and Superset to large datasets.
  • An alternative analytical query layer: Run suitable warehouse-style workloads over a lake or lakehouse.
  • Migration and hybrid architectures: Bridge old and new platforms during a transition.
  • SQL access to big data: Let SQL users analyse data without writing Spark application code.

Trino partly abstracts the physical location of data. A connector accesses the source, distributed workers execute the plan and the engine returns results, creating a more unified analytical experience across systems.

 

Why Was Trino Developed?

The underlying need was fast, interactive SQL analysis over large datasets. Earlier Hadoop querying, particularly traditional Hive-on-MapReduce, was often batch-oriented and slower than analysts wanted. Users sought a warehouse-like interactive experience over their existing data.

Trino grew from Presto, a distributed engine developed for low-latency SQL analysis. The project known as PrestoSQL was renamed Trino in December 2020. It continues as an open-source, community-developed project.

The needs behind it included:

  • Fast queries over data-lake contents.
  • More interactive analysis than traditional batch-oriented Hive deployments offered.
  • Access to big data for SQL users.
  • Analysis without always loading another warehouse.
  • Combining different sources in one query.
  • Connecting BI tools to lakes and lakehouses.

It addresses the desire to query data across locations using SQL. This does not imply equal performance everywhere: connector capabilities, formats, file layout, networking and the execution plan all matter.

 

Is Trino a Database?

Trino is a query engine rather than the primary database that persistently stores application data.

Systems such as PostgreSQL, MySQL, Oracle, SQL Server and Snowflake combine storage and querying in their respective architectures. Trino primarily supplies execution over data held elsewhere: S3 files, Iceberg tables, PostgreSQL, Cassandra, Kafka and other sources.

A simple comparison is:

  • Data warehouse: A managed analytical system that stores and queries organised data.
  • Data lake: Flexible storage for large volumes of raw and processed data.
  • Lakehouse: An architecture adding managed tables and analytical capabilities over lake storage.
  • Trino: A distributed SQL engine querying supported systems and tables.

Some connectors support creating tables, writing data and `INSERT` operations. That does not turn Trino into the underlying persistent database. Its central role remains analytical access and query execution. Temporary execution state, caches or spill files are different from being the primary store.

 

How Does Trino Work?

Trino receives SQL, builds a plan, divides it and schedules work across a cluster. Workers read relevant portions of source data and perform filtering, joins, aggregations and other operations. Results are delivered through the coordinator.

The process can be described as:

  1. Submission: A SQL client, BI tool or application sends a query to the coordinator.
  2. Parsing: SQL is converted into an internal syntactic structure.
  3. Analysis: Tables, columns, types, permissions and source information are checked.
  4. Planning: The engine builds logical and physical plans.
  5. Optimisation: It chooses available strategies to execute efficiently.
  6. Scheduling: Work is assigned to workers.
  7. Execution: Workers access sources and process data in parallel.
  8. Results: The coordinator provides results to the client.

This parallel execution supports large-scale analysis. Efficient formats, suitable partitioning and well-designed queries remain important to using that capacity effectively.

 

Architecture: Coordinator and Workers

A Trino cluster has two principal server roles.

What Is the Coordinator?

The coordinator accepts SQL, analyses and optimises queries, plans execution and coordinates workers. Clients normally connect to it.

Its responsibilities include:

  • Accepting SQL statements.
  • Parsing and planning queries.
  • Using metadata.
  • Managing worker participation.
  • Scheduling query tasks.
  • Returning results.

What Is a Worker?

Workers execute parts of the query plan. They process source-data units called splits, perform operations and exchange intermediate results. Their number and resources influence parallel capacity.

Their responsibilities include:

  • Reading source data.
  • Filtering, aggregating, joining and projecting columns.
  • Exchanging intermediate results with other workers or the coordinator.
  • Executing tasks belonging to query stages.

A development installation can combine both roles on one machine. Production deployments generally use a dedicated coordinator and multiple workers.

 

Connectors, Catalogues, Schemas and Tables

These concepts organise access to data.

Connector

A connector adapts Trino to a particular kind of source. Examples include Hive, PostgreSQL, Iceberg, Kafka, MySQL and MongoDB connectors.

Catalogue

A catalogue is a configured instance of a connector with its connection settings. For example, `iceberg_sales` could connect to Iceberg tables on S3, while `postgres_crm` connects to a PostgreSQL customer database.

Schema

A schema is a logical grouping within a catalogue, comparable to a relational database schema. Examples include `sales`, `finance` and `marketing`.

Table

A table is a data object to query. A fully qualified reference commonly uses `catalogue.schema.table`, for example:

“`sql
iceberg.sales.orders
“`

This identifies the `orders` table in the `sales` schema of the `iceberg` catalogue.

These abstractions present different sources through a common SQL organisation, even though their underlying implementations differ.

 

Connector Architecture

Connectors are central to Trino’s flexibility. They translate its access requirements into the source system’s operations.

They address questions such as:

  • Which schemas and tables exist?
  • What are the columns and their data types?
  • How can data be read?
  • Can filters be pushed to the source?
  • Can aggregations or limits be delegated?
  • Are writing, updating and deleting supported?
  • How are security and authorisation applied?

Features differ. One connector may be read-only; another may support table creation and writes. Predicate, projection and aggregation pushdown can significantly affect performance.

This makes federation powerful, but connector maturity and capabilities should not be assumed identical. Review the relevant documentation for production use.

 

What Is Federated Querying?

Federation combines data from different sources in one query. A query might join transaction logs in S3 with a PostgreSQL customer table.

Consider an organisation where:

  • Customer records reside in PostgreSQL.
  • Order history is held in Iceberg tables on S3.
  • Web clicks are stored as Parquet in a data lake.
  • Campaign records are in MySQL.

Trino can connect through the relevant connectors and combine these sources without requiring a permanent consolidated copy first.

Benefits include:

  • Potentially reducing duplication.
  • Combining systems for analysis more quickly.
  • Querying old and new platforms during migration.
  • Giving analysts one SQL access layer.

Federation is not automatically fast. Network latency, source capacity, connector optimisation and join strategy affect results. Joining large tables across systems can transfer substantial data and become expensive. It needs careful architectural choices.

 

Trino and Data Lakes

Trino often provides the SQL layer over a lake. Files in object storage or a distributed filesystem need an engine to interpret their metadata and query their contents.

A typical arrangement includes:

  • Storage in S3, Azure Data Lake Storage, Google Cloud Storage or HDFS.
  • Files in Parquet, ORC, Avro, JSON or CSV.
  • Metadata in Hive Metastore, AWS Glue Data Catalog or another compatible catalogue.
  • Access through an appropriate Trino connector.
  • SQL queries from analysts and applications.

Interactive SQL makes raw or processed lake data accessible to analysts and BI tools. Poor layouts, excessive small files, unsuitable partitioning and missing metadata can still undermine performance.

 

Trino and Lakehouses

A lakehouse combines flexible lake storage with warehouse-style table management, reliability, performance and governance. Trino can provide its SQL execution layer.

It can:

  • Query Iceberg, Delta Lake and Hudi tables.
  • Connect BI tools to managed lake tables.
  • Support ad hoc analysis.
  • Query across catalogues.
  • Access open-format lake data.
  • Provide a warehouse-like analytical interface.

A folder of Parquet files alone does not provide every capability required for enterprise tables. Schema evolution, partition management, versioned reads, transactional behaviour and metadata management need suitable table technology. Trino accesses those capabilities through connectors, whose precise support varies.

 

Trino and Apache Iceberg

Iceberg is an open table format for large analytical datasets. It adds reliable table organisation and management over data-lake storage. Combined with Trino, it can support an open lakehouse.

Important aspects include:

  • SQL querying of Iceberg tables.
  • Efficient reads of columnar formats such as Parquet.
  • Schema and partition evolution.
  • Supported writes and table-management operations through the Iceberg connector.
  • BI access through Trino.

Iceberg supplies the table-format layer; Trino supplies query execution. They have complementary roles.

 

Comparing Trino with Other Systems

Trino and Hive

Hive introduced SQL-style processing to Hadoop. Historically it was strongly associated with batch workloads, while Trino was designed for interactive, low-latency analytics. Hive can support substantial batch transformations; Trino may better suit interactive analyst queries. Modern Hive deployments have several execution options, so this is a historical and workload-based distinction rather than a universal benchmark.

Trino and Spark

Spark is a general-purpose distributed engine for ETL, batch processing, streams, machine learning and engineering pipelines. Trino concentrates on SQL queries. Spark may be a natural fit for broad transformation pipelines and Trino for interactive SQL, although their capabilities overlap.

Trino and Presto

Trino derives from the Presto ecosystem. PrestoSQL became Trino in 2020; PrestoDB and Trino now develop separately. Compare community activity, connectors, releases, performance and integration before choosing.

Trino and a Data Warehouse

A warehouse stores, models and queries analytical data. Trino generally leaves persistent data in its sources and provides execution. It can replace some warehouse query workloads, but does not automatically supply the entire modelling, governance, optimisation or enterprise-metrics layer.

Trino and DuckDB

DuckDB is an embedded analytical database particularly useful for local, single-machine analysis, files and data science. Trino distributes queries across a cluster and federates sources. Local analytics and distributed federation have different requirements; neither is universally superior.

 

Which Sources Can Trino Connect To?

Connectors cover relational databases, lake tables, NoSQL products, search and analytical systems, events and cloud warehouses.

Examples include:

  • Lakes and lakehouses: Hive, Iceberg, Delta Lake and Hudi.
  • Relational databases: PostgreSQL, MySQL, MariaDB, Oracle and SQL Server.
  • Cloud warehouses: BigQuery, Redshift and Snowflake.
  • NoSQL: Cassandra, MongoDB and Redis.
  • Search and analytics: Elasticsearch, OpenSearch, Druid and Pinot.
  • Streaming and events: Kafka.
  • Files and object storage: S3, HDFS and other supported storage through lake connectors and their filesystem integrations.
  • Other sources: Google Sheets, Prometheus, JMX and test connectors.

This breadth supports federation and platform integration. It does not mean every connector offers identical operations or performance. Evaluate both the source’s characteristics and the connector’s current support.

 

When Is Trino Useful?

Its strongest fit is large-scale, SQL-oriented analysis over one or several sources.

SQL over a Data Lake

Analysts can query large Parquet or ORC datasets without writing Spark code.

A Lakehouse Query Layer

Trino can run BI and analytical queries over supported Iceberg, Delta Lake and Hudi tables.

Federation

It can combine systems for migrations, temporary analysis and insights requiring several sources.

Connecting BI Tools to a Lake

Power BI, Tableau, Superset and similar tools can access lake or lakehouse data through supported clients and drivers.

Ad Hoc Exploration

Analysts and data scientists can filter, join and investigate patterns through SQL, making exploration easier in large-data environments.

Platform Migrations

During a transition from a warehouse to a lakehouse, Trino can bridge query access across both environments.

 

When Is Trino a Poor Fit?

It is powerful, but not appropriate for every workload.

  • OLTP: It is not the application database for order creation, payments or intensive transaction processing.
  • Standalone storage: Persistent storage must be provided elsewhere.
  • Heavy ETL: Some large, complex transformations may suit Spark or another processing system better, although Trino supports substantial SQL transformations.
  • Poor file layouts: Small files, unsuitable partitions and inefficient formats still impair execution.
  • Sensitive operational sources: Heavy federated queries can overload them.
  • Complete governance: Ownership, quality, cataloguing and metadata policies still require deliberate design.

Treat it as an analytical execution layer rather than assume it replaces an OLTP database, warehouse, ETL platform and governance system simultaneously.

 

Improving Performance

Capacity is only part of the picture. Formats, file sizes, partitions, connectors, SQL and networking all matter.

Use Columnar Formats

Parquet and ORC often suit analytics better than CSV or JSON because readers can access required columns without reading every field.

Avoid Excessive Small Files

Each file adds metadata and access overhead. Suitable file sizes, compaction and table optimisation can reduce it.

Design Partitions Carefully

Partition pruning can avoid unnecessary reads. Too many partitions can increase metadata and small-file overhead. Choose fields such as date, region or category based on actual query patterns.

Use Predicate Pushdown

Push filters into the source or file-reading layer where supported, reducing data read or transferred. The connector and format determine what is possible.

Select Only Needed Columns

`SELECT *` can be expensive. Projecting only required columns can reduce work, particularly with columnar storage or supported projection pushdown.

Examine Join Strategies

Large joins can be costly. Key types, distribution, table sizes and filters matter. Suitable dimension tables, pre-aggregation or materialised views may help where supported.

Configure Resources Appropriately

Worker count, memory, CPU, spill or exchange configuration, network bandwidth and coordinator capacity affect execution. Their relevance depends on the execution mode and workload.

Maintain Metadata

Hive Metastore, Glue or Iceberg catalogue performance can become a bottleneck with many tables and partitions. Statistics also help planning.

 

Trino and Business Intelligence

Trino can connect lake or lakehouse data to dashboards. Tableau, Power BI, Superset, Looker, Metabase and similar products can query it through supported integrations.

A typical path is:

  1. Data resides in a lake or lakehouse.
  2. Trino connects as the SQL engine.
  3. The BI tool uses a compatible client or driver, such as JDBC or an available ODBC integration.
  4. Users interact with dashboard filters and visualisations.
  5. Trino executes queries and returns results.

Dashboard performance still needs attention. Many users can generate concurrent queries. Capacity, appropriate caching layers, pre-aggregation, semantic models and data modelling become important. Not every caching capability belongs to Trino itself.

 

Trino and Artificial Intelligence

Trino is not primarily a model-training tool. It can provide access to training data, feature sets and analytical information spread across sources.

Applications include:

  • Preparing training datasets from several systems.
  • SQL transformations for feature engineering.
  • Exploring lake data.
  • Querying logs for performance and drift analysis.
  • Analysing document metadata or usage data for RAG systems.
  • Querying lakehouse events produced by AI applications.

Provenance, processing history and quality remain essential. Trino can simplify access, but quality, lineage, permissions and model governance still need their own design.

 

Advantages

  • Distributed SQL: Parallel queries over large datasets.
  • Open source: Community-developed software.
  • Standards-based SQL: Familiar concepts for SQL users, without implying support for every ANSI SQL feature.
  • Multiple sources: Federation within one query.
  • Lake and lakehouse integration: Connectors for Iceberg, Hive, Delta Lake and Hudi.
  • BI integration: Access from tools such as Tableau, Power BI and Superset.
  • Less permanent duplication: Suitable data can be queried in its existing system.
  • Interactive analysis: Support for responsive exploration where the architecture and workload permit it.
  • Deployment flexibility: Cloud and on-premises environments.

 

Limitations and Risks

It Is Not the Persistent Storage Layer

Reliable storage, table formats, metadata and lifecycle management must be provided separately.

It Can Burden Operational Databases

Federated analysis can send expensive queries to application databases. Protect their capacity and workload priorities.

Performance Depends on Data Layout

Poor formats, small files, unsuitable partitions, missing statistics and weak pushdown can slow queries.

Operations Require Expertise

Deployment, memory, capacity, security, access control, monitoring and workload management need skilled administration.

It Does Not Suit Every Workload

OLTP, intensive row-level updates and some complex long-running transformations can be better handled elsewhere.

Governance Is Not Automatic

Access alone does not establish ownership, quality, lineage, a catalogue strategy or a semantic layer.

 

Where Does Trino Fit in Enterprise Architecture?

It commonly serves federation and open-lakehouse analytics, above the data sources and below BI tools and analytical users.

A representative architecture is:

  1. Operational systems such as PostgreSQL, MySQL, Kafka and applications produce data.
  2. Pipelines move relevant data into a lake or lakehouse.
  3. Iceberg, Delta Lake or another table technology manages analytical tables.
  4. A metadata catalogue tracks tables.
  5. Trino provides SQL access to these and other sources.
  6. Power BI, Tableau or Superset produces reports.
  7. Analysts and data scientists explore data through SQL.

Trino is the query-access component in this arrangement. Its effectiveness depends on the architecture around it.

 

Concepts to Learn

  • Cluster: The coordinator and worker environment.
  • Coordinator: Accepts and plans queries and coordinates workers.
  • Worker: Executes query tasks.
  • Connector: Adapts Trino to a source.
  • Catalogue: A configured connector instance.
  • Schema: A logical group within a catalogue.
  • Table: A queryable data object.
  • Split: A source-data work unit.
  • Stage: A distributed portion of the execution plan.
  • Task: A stage’s unit of execution on a worker.
  • Pushdown: Delegating filters, projections, aggregations or other supported operations to a source.
  • Federated query: Combining sources through one SQL query.

These explain why Trino is a distributed engine rather than an ordinary storage database.

 

Frequently Asked Questions

What Is Trino?

An open-source engine for distributed SQL analysis over large datasets.

What Is It Used For?

Querying lakes, lakehouses, warehouses, relational databases and other sources, including combining supported sources in one query.

Is It a Database?

It is not the primary persistent storage database. It executes queries over data held in other systems.

Is Trino the Same as Presto?

They share origins. PrestoSQL was renamed Trino in 2020; Trino and PrestoDB now develop separately.

How Does It Differ from Spark?

Spark is a general distributed-processing engine for ETL, batch, streaming and learning. Trino specialises in SQL analytics, especially interactive and federated querying.

Can It Query a Data Lake?

Yes. Appropriate connectors can query supported files such as Parquet, ORC, Avro, JSON and CSV. Format support depends on the chosen connector and table configuration; an Iceberg table does not support arbitrary CSV or JSON data files.

Does It Work with Iceberg?

Yes. The Iceberg connector supports querying and documented write and table-management operations.

Can It Work with Power BI and Tableau?

Yes, through supported client integrations and drivers. Check the required driver and authentication setup for the BI product.

Is It an ETL Tool?

It supports operations such as CTAS and `INSERT`, but its primary role is query execution. Spark or other processing engines may suit complex transformations, dbt can organise SQL transformations, and Airflow can orchestrate workflows; these tools play different roles rather than being interchangeable ETL engines.

When Should It Be Used?

Consider it for SQL analytics over lakes and lakehouses, multi-source federation and BI access to open data platforms.

 

Conclusion

Trino fills an important role in modern data architecture. It queries data across sources using distributed execution rather than acting as the primary store, making it particularly useful for lakes, lakehouses and federation.

It helps SQL users access the wider data ecosystem. Analysts, engineers, BI teams and data scientists can examine S3 files, Iceberg tables, PostgreSQL records or Kafka events through a common layer. This can reduce permanent copying and simplify cross-system analysis.

Its role must remain clear. It does not automatically replace a warehouse, OLTP database, governance platform or general-purpose processing engine. Successful deployments need well-designed storage and tables, appropriate formats, sound metadata, suitable connectors, security and performance work.

Open table formats, object storage, lakehouses and self-service BI make engines such as Trino strategically useful. Organisations need not only to consolidate data, but also to query information distributed across existing systems intelligently.

Trino is a strong example of querying data where it resides. With appropriate architecture, it makes lake contents and lakehouse tables accessible through SQL and brings analytical data closer to business users. Its contribution lies in a common query language and execution layer across a varied data environment.

 

References

 

Further reading

🗓️ Publication date: November 22, 2026
🔄 Last updated: November 22, 2026
🎯 Who this is for: This article is for readers interested in Trino, big data, data lakes, lakehouses, Apache Iceberg, SQL engines, federated queries, warehouses, business intelligence, data engineering and modern data architecture. It is also an introductory reference for engineers, analysts, BI specialists, architects, developers, technology managers, students and anyone building an open data platform.

Content information
This article contains approximately 4122 words and 29400 characters. Estimated reading time: 14 min. It was prepared in accordance with Invictus Wiki's editorial principles and published on the basis of reliable, verifiable sources. The information is reviewed regularly to keep it up to date.
Would you like to share this article?