Ensure both connectors are configured: the Iceberg connector (e.g., catalog name iceberg) with iceberg.catalog.type set to glue, hive, or rest, and the PostgreSQL connector (e.g., catalog name pg) with the appropriate JDBC connection properties
Write a cross-catalog join query using fully qualified table names: SELECT i.customer_id, i.order_total, p.customer_segment FROM iceberg.sales.orders i JOIN pg.crm.customers p ON i.customer_id = p.id WHERE i.order_date >= DATE '2024-01-01'
Push down predicates explicitly in each branch of the query to limit data movement: Trino will push predicates to each connector independently but may not always push complex expressions; verify with EXPLAIN that partition/index pruning is applied on both sides
Tune the join strategy: for large Iceberg tables joined to small PostgreSQL dimension tables, ensure the PostgreSQL side is the build side of the hash join by placing it in the right-hand position or using the /*+ broadcast */ hint if supported
Monitor cross-connector joins in the Trino Web UI; network transfer bytes between stages indicates data shuffled across the cluster — large values suggest the predicate pushdown is not limiting the PostgreSQL side sufficiently
Known gotchas
Trino fetches data from each connector independently and performs the join in Trino workers; there is no pushdown of the join itself to either system — ensure both sides are filtered aggressively before the join to avoid pulling large datasets into Trino memory
PostgreSQL connector may not push down all Trino function calls (e.g., Trino-specific date functions); wrap predicates in forms the JDBC connector can translate to SQL, or apply them as post-join filters
Cross-catalog transactions are not supported in Trino; each connector operates independently, so a federated INSERT INTO SELECT across catalogs is not atomic — a failure mid-query may result in partial writes
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp