Skip to content

Core: Add metadata table for discovering metadata tables #17132

Description

@yangshangqing95

Feature Request / Improvement

Feature request

Iceberg exposes many useful metadata tables, such as files, data_files, delete_files, manifests, snapshots, history, metadata_log_entries, refs, and others.

I would like to propose adding a new metadata table that lists the metadata tables available for a given Iceberg table.

Motivation / use case

Metadata tables are useful for debugging, observability, table maintenance, and understanding Iceberg table internals. For example, users can inspect files, manifests, snapshots, refs, and metadata log entries directly through SQL.

However, users currently need to know these metadata table names ahead of time from documentation, examples, or source code. It would be helpful to make metadata tables self-discoverable from SQL.

A self-describing metadata table would make Iceberg metadata easier to explore without adding engine-specific SQL syntax such as:

SHOW METADATA TABLES FOR catalog.db.table;

Instead, this would reuse Iceberg's existing metadata table model.
For example, in Spark:

SELECT * FROM catalog.db.table.metadata_tables;

Excepted output:

entries
files
data_files
delete_files
history
metadata_log_entries
snapshots
refs
manifests
partitions
all_data_files
all_delete_files
all_files
all_manifests
all_entries
position_deletes
metadata_tables

Query engine

Spark

Willingness to contribute

  • I can contribute this improvement/feature independently
  • I would be willing to contribute this improvement/feature with guidance from the Iceberg community
  • I cannot contribute this improvement/feature at this time

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementPR that improves existing functionality

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions