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 2020/07/01 16:38:49 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #1151: Add Inspecting tables example by HDFS path in the Iceberg User docs

rdblue commented on a change in pull request #1151:
URL: https://github.com/apache/iceberg/pull/1151#discussion_r448486284



##########
File path: site/docs/spark.md
##########
@@ -136,6 +136,11 @@ To show table history, run:
 ```scala
 spark.read.format("iceberg").load("db.table.history").show(truncate = false)
 ```
+
+To show table history by HDFS path, run:
+```scala
+spark.read.format("iceberg").load(table.location() + "#" + MetadataTableType.HISTORY).show( truncate = false)

Review comment:
       Where does `table` come from? And why require loading `MetadataTableType`?
   
   I think it would be better to use just a string, following the pattern of the other HDFS examples:
   
   ```scala
   spark.read.format("iceberg").load("hdfs://nn:8020/warehouse/path/db.db/table#history").show(truncate = false)
   ```




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

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