yangshangqing95 opened a new issue, #17132:
URL: https://github.com/apache/iceberg/issues/17132

   ### 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:
   
   ```sql
   SHOW METADATA TABLES FOR catalog.db.table;
   ```
   
   Instead, this would reuse Iceberg's existing metadata table model.
   For example, in Spark:
   
   ```sql
   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
   
   - [x] 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to