Federated SQL over a Data Lake with Trino and an Apache Iceberg REST Catalog

Should analytical SQL read a data lake and an operational database where the data live, or should a copy job first move everything into one database? History tables (TPC-H lineitem, orders, part, partsupp and NYC yellow taxi trips of 2024) are stored as an Apache Iceberg lake with an Apache Polaris REST catalog; operational tables (customer, supplier, nation, region, taxi zones) live in PostgreSQL. Three designs answer the same 13 SQL queries (9 TPC-H, 4 taxi): Trino queries the lake and PostgreSQL in place; a copy job copies all ten tables into one PostgreSQL database; and, as an ablation, the operational tables are copied into Iceberg so that Trino reads the lake only. Two data sizes (TPC-H SF1 + 3 taxi months, 18.2 M rows; TPC-H SF3 + 4 taxi months, 39.0 M rows) were measured from scratch: query times, the copy job, freshness after a change in each source, storage, effort and memory.

NOTE: Public data only (TPC-H tables generated with the dbgen algorithm, NYC TLC yellow taxi trips of 2024); the same 13 SQL queries answered by three designs, one design at a time, at two data sizes measured from scratch; every service ran locally on a standard laptop.

Category: Big Data

Big Data Project BD03 from ProTechSC Academy, with graphical abstract, video demonstration and project guidance.