You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/05/07 07:38:10 UTC

[GitHub] [iceberg] hililiwei commented on a diff in pull request #4709: Docs: Make it clear metadata tables support time travel in Spark

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


##########
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:
   +1 for show it here.



-- 
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-unsubscribe@iceberg.apache.org

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


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