liuml07 commented on code in PR #4709:
URL: https://github.com/apache/iceberg/pull/4709#discussion_r867304962


##########
docs/spark/spark-queries.md:
##########
@@ -332,4 +332,15 @@ Metadata tables can be loaded in Spark 2.4 or Spark 3 
using the DataFrameReader
 spark.read.format("iceberg").load("db.table.files").show(truncate = false)
 // Hadoop path table
 
spark.read.format("iceberg").load("hdfs://nn:8020/path/to/table#files").show(truncate
 = false)
-```
\ No newline at end of file
+```
+
+You can also inspect Iceberg metadata tables with the time travel feature:
+
+```scala
+// get table's all data files and each data file's metadata at snapshot-id 
7277403863961056344
+spark.read
+        .format("iceberg")
+        .option("snapshot-id", 7277403863961056344L)
+        .load("db.table.files")
+        .show()
+```

Review Comment:
   Yes adding to that section also works. But my concern was that, the 
`TimeTravel` section is before metadata tables section. By then, readers may 
not understand what the table name `db.table.files` is for.



-- 
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