LinMingQiang commented on code in PR #4953: URL: https://github.com/apache/paimon/pull/4953#discussion_r1921942920
########## docs/content/spark/sql-query.md: ########## @@ -32,6 +32,18 @@ Just like all other tables, Paimon tables can be queried with `SELECT` statement Paimon's batch read returns all the data in a snapshot of the table. By default, batch reads return the latest snapshot. +```sql +-- read all columns +SELECT * FROM t; +``` + +Paimon also supports reading some hidden metadata columns, such as `__paimon_file_path`, `__paimon_partition`, `__paimon_bucket`. + +```sql +-- read all columns and the corresponding file path, partition, bucket of the record +SELECT *, __paimon_file_path, __paimon_partition, __paimon_bucket FROM t; +``` + Review Comment: Suggestion: Use a table to display all metadata fields, maybe new metadata fields will be added in the future, the flink documentation can also be improved. -- 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]
