trino_iceberg

Optimize Apache Iceberg table design and maintenance through Trino.

14|1|Updated May 5, 2026
One-click install
npx skills add https://github.com/ivanshamaev/de-agent-skills --skill trino-iceberg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trino_iceberg
Source: https://github.com/ivanshamaev/de-agent-skills/tree/main/skills/trino_iceberg
Command: npx skills add https://github.com/ivanshamaev/de-agent-skills --skill trino-iceberg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you create, query efficiently, and safely maintain Apache Iceberg tables when working through Trino, preventing slow scans caused by poor partitioning, missing stats, or incorrect maintenance workflows.

Core Features & Use Cases

  • Design high-performance Iceberg tables: Define partition transforms, bucketing, and sorted writing to improve pruning and join efficiency, then validate behavior with EXPLAIN and stats.
  • Execute all Iceberg DDL/DML operations in Trino: Cover CREATE, ALTER (including schema evolution and property updates), INSERT/UPDATE/DELETE/MERGE, TRUNCATE, and time travel reads for rollback.
  • Run production maintenance and diagnostics: Perform OPTIMIZE, EXPIRE_SNAPSHOTS, REMOVE_ORPHAN_FILES, OPTIMIZE_MANIFESTS, then verify with metadata table queries like $partitions and $snapshots.

Quick Start

Use the trino_iceberg skill to diagnose a slow Iceberg query by running EXPLAIN (TYPE DISTRIBUTED) and then deciding whether to change partitioning, add bucketing/sorted_by, and apply ANALYZE or table maintenance.

Frequently Asked Questions about trino_iceberg

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow Trino queries on Apache Iceberg tables?

To optimize slow Trino queries on Apache Iceberg tables, run EXPLAIN (TYPE DISTRIBUTED) to diagnose scan bottlenecks, then adjust partition transforms, add bucketing or sorted_by properties, and apply ANALYZE to update table statistics for improved partition pruning.

How do I run maintenance procedures like compaction and snapshot expiration on Iceberg tables in Trino?

Run maintenance procedures like compaction and snapshot expiration on Iceberg tables in Trino by executing OPTIMIZE for data compaction, EXPIRE_SNAPSHOTS to remove old snapshots, and REMOVE_ORPHAN_FILES to clean up unreferenced data files.

How does time travel query work for rollback in Trino Iceberg?

Time travel query works for rollback in Trino Iceberg by reading historical table snapshots, allowing you to query past data states for recovery and audit purposes without altering the current table data.

Can I perform schema evolution and partition updates on Iceberg tables through Trino?

Yes, you can perform schema evolution and partition updates on Iceberg tables through Trino using ALTER TABLE statements, which support adding columns, evolving schemas, and updating table properties to adapt to changing data requirements.

Why are my Iceberg partition pruning scans still slow in Trino?

Iceberg partition pruning scans in Trino remain slow when table statistics are missing or outdated, requiring you to run ANALYZE and verify metadata table diagnostics like $partitions and $snapshots to ensure correct partition transform behavior.

What is the best way to diagnose Iceberg table metadata issues in Trino?

The best way to diagnose Iceberg table metadata issues in Trino is to query metadata tables like $partitions and $snapshots, which provide detailed insights into partition distribution and snapshot history for troubleshooting table maintenance and performance.