hililiwei commented on a change in pull request #3749:
URL: https://github.com/apache/iceberg/pull/3749#discussion_r770167693
##########
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`
Review comment:
I can't find a reference anywhere in the document yet, how about I link
it to the Java
Doc(https://iceberg.apache.org/javadoc/0.12.1/org/apache/iceberg/catalog/TableIdentifier.html)?
Maybe I add its definition to the document in this issuse? or we create a
separate issuse trace for this?
--
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]