hililiwei commented on a change in pull request #3749:
URL: https://github.com/apache/iceberg/pull/3749#discussion_r770165074
##########
File path: site/docs/spark-structured-streaming.md
##########
@@ -26,6 +26,28 @@ As of Spark 3.0, DataFrame reads and writes are supported.
|--------------------------------------------------|----------|------------|------------------------------------------------|
| [DataFrame write](#writing-with-streaming-query) | ✔ | ✔ |
|
+## Streaming Reads
+
+Iceberg supports processing incremental data in spark structured streaming
jobs which starts from a historical timestamp:
+
+```scala
+val spark:SparkSession = ...
+val tableIdentifier: String = ...
+
+val df = spark.readStream
+ .format("iceberg")
+ .option(SparkReadOptions.STREAM_FROM_TIMESTAMP,
Long.toString(streamStartTimestamp))
+ .load(tableIdentifier)
+```
+
+The `tableIdentifier` can be:
+
+* The fully-qualified path to a HDFS table, like `hdfs://nn:8020/path/to/table`
+* A table name if the table is tracked by a catalog, like `database.table_name`
+
+!!! Note
+ Iceberg only supports read data from snapshot whose type of Data
Operations is APPEND\REPLACE\DELETE. In particular if some of your snapshots
are of DELETE type, you need to add 'streaming-skip-delete-snapshots' option to
skip it, otherwise the task will fail.
Review comment:
I just want to show this:
https://iceberg.apache.org/#maintenance/
##########
File path: site/docs/spark-structured-streaming.md
##########
@@ -26,6 +26,28 @@ As of Spark 3.0, DataFrame reads and writes are supported.
|--------------------------------------------------|----------|------------|------------------------------------------------|
| [DataFrame write](#writing-with-streaming-query) | ✔ | ✔ |
|
+## Streaming Reads
+
+Iceberg supports processing incremental data in spark structured streaming
jobs which starts from a historical timestamp:
+
+```scala
+val spark:SparkSession = ...
+val tableIdentifier: String = ...
+
+val df = spark.readStream
+ .format("iceberg")
+ .option(SparkReadOptions.STREAM_FROM_TIMESTAMP,
Long.toString(streamStartTimestamp))
+ .load(tableIdentifier)
+```
+
+The `tableIdentifier` can be:
+
+* The fully-qualified path to a HDFS table, like `hdfs://nn:8020/path/to/table`
+* A table name if the table is tracked by a catalog, like `database.table_name`
+
+!!! Note
+ Iceberg only supports read data from snapshot whose type of Data
Operations is APPEND\REPLACE\DELETE. In particular if some of your snapshots
are of DELETE type, you need to add 'streaming-skip-delete-snapshots' option to
skip it, otherwise the task will fail.
Review comment:
I just want to show like this:
https://iceberg.apache.org/#maintenance/
--
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]