This is an automated email from the ASF dual-hosted git repository.

blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/master by this push:
     new 5ae0ed1  Doc: Add HDFS path examples for metadata tables (#1151)
5ae0ed1 is described below

commit 5ae0ed1eba84e5e7ef9cac11c8071bd6d81f2258
Author: zhangdove <[email protected]>
AuthorDate: Sat Jul 4 00:25:44 2020 +0800

    Doc: Add HDFS path examples for metadata tables (#1151)
---
 site/docs/spark.md | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/site/docs/spark.md b/site/docs/spark.md
index 0c3d519..2635a01 100644
--- a/site/docs/spark.md
+++ b/site/docs/spark.md
@@ -49,12 +49,9 @@ Spark 2.4 is limited to reading and writing existing Iceberg 
tables. Use the [Ic
 To read an Iceberg table, use the `iceberg` format in `DataFrameReader`:
 
 ```scala
+// named metastore table
 spark.read.format("iceberg").load("db.table")
-```
-
-Iceberg tables identified by HDFS path are also supported:
-
-```scala
+// Hadoop path table
 spark.read.format("iceberg").load("hdfs://nn:8020/path/to/table")
 ```
 
@@ -134,7 +131,10 @@ Metadata tables are identified by adding the metadata 
table name after the origi
 To show table history, run:
 
 ```scala
+// named metastore table
 spark.read.format("iceberg").load("db.table.history").show(truncate = false)
+// Hadoop path table
+spark.read.format("iceberg").load("hdfs://nn:8020/path/to/table#history").show(truncate
 = false)
 ```
 ```text
 
+-------------------------+---------------------+---------------------+---------------------+
@@ -157,7 +157,10 @@ 
spark.read.format("iceberg").load("db.table.history").show(truncate = false)
 To show the valid snapshots for a table, run:
 
 ```scala
+// named metastore table
 spark.read.format("iceberg").load("db.table.snapshots").show(truncate = false)
+// Hadoop path table
+spark.read.format("iceberg").load("hdfs://nn:8020/path/to/table#snapshots").show(truncate
 = false)
 ```
 ```text
 
+-------------------------+----------------+-----------+-----------+----------------------------------------------------+-------------------------------------------------------+
@@ -204,7 +207,10 @@ order by made_current_at
 To show a table's file manifests and each file's metadata, run:
 
 ```scala
+// named metastore table
 spark.read.format("iceberg").load("db.table.manifests").show(truncate = false)
+// Hadoop path table
+spark.read.format("iceberg").load("hdfs://nn:8020/path/to/table#manifests").show(truncate
 = false)
 ```
 ```text
 
+----------------------------------------------------------------------+--------+-------------------+---------------------+------------------------+---------------------------+--------------------------+---------------------------------+
@@ -219,7 +225,10 @@ 
spark.read.format("iceberg").load("db.table.manifests").show(truncate = false)
 To show a table's data files and each file's metadata, run:
 
 ```scala
+// named metastore table
 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)
 ```
 ```text
 
+-------------------------------------------------------------------------+-------------+--------------+--------------------+--------------------+------------------+-------------------+-----------------+-----------------+--------------+---------------+

Reply via email to