hililiwei opened a new pull request, #6222:
URL: https://github.com/apache/iceberg/pull/6222

   ## What is the purpose of the change
   
   Support inspecting table in flink sql.
   ```
   select * from {tableName}${metadataTableName}
   ```
   
   The  '$' syntax borrows from 
[Flink-Table-Store](https://github.com/apache/flink-table-store), under the 
Flink umbrella.
   
   
   ## Support List
   *  History
   
   To show table history:
   
   ```sql
   SELECT * FROM prod.db.table$history;
   ```
   
   *   Metadata Log Entries
   
   To show table metadata log entries:
   
   ```sql
   SELECT * from prod.db.table$metadata_log_entries;
   ```
   
   *   Snapshots
   
   To show the valid snapshots for a table:
   
   ```sql
   SELECT * FROM prod.db.table$snapshots;
   ```
   
   *   Files
   
   To show a table's current data files:
   
   ```sql
   SELECT * FROM prod.db.table$files;
   ```
   
   *   Manifests
   
   To show a table's current file manifests:
   
   ```sql
   SELECT * FROM prod.db.table$manifests;
   ```
   
   *   Partitions
   
   To show a table's current partitions:
   
   ```sql
   SELECT * FROM prod.db.table$partitions;
   ```
   
   *   All Metadata Tables
   
   These tables are unions of the metadata tables specific to the current 
snapshot, and return metadata across all snapshots.
   
   - -   All Data Files
   
   To show all of the table's data files and each file's metadata:
   
   ```sql
   SELECT * FROM prod.db.table$all_data_files;
   ```
   
   - -   All Manifests
   
   To show all of the table's manifest files:
   
   ```sql
   SELECT * FROM prod.db.table$all_manifests;
   ```
   
   -  References
   
   To show a table's known snapshot references:
   
   ```sql
   SELECT * FROM prod.db.table$refs;
   ```
   


-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to