File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,8 @@ To select a specific table snapshot or the snapshot at some time in the DataFram
126126
127127* ` snapshot-id ` selects a specific table snapshot
128128* ` as-of-timestamp ` selects the current snapshot at a timestamp, in milliseconds
129+ * ` branch ` selects the head snapshot of the specified branch. Note that currently branch cannot be combined with as-of-timestamp.
130+ * ` tag ` selects the snapshot associated with the specified tag
129131
130132``` scala
131133// time travel to October 26, 1986 at 01:21:00
@@ -143,6 +145,22 @@ spark.read
143145 .load(" path/to/table" )
144146```
145147
148+ ``` scala
149+ // time travel to tag historical-snapshot
150+ spark.read
151+ .option(SparkReadOptions .TAG , " historical-snapshot" )
152+ .format(" iceberg" )
153+ .load(" path/to/table" )
154+ ```
155+
156+ ``` scala
157+ // time travel to the head snapshot of audit-branch
158+ spark.read
159+ .option(SparkReadOptions .BRANCH , " audit-branch" )
160+ .format(" iceberg" )
161+ .load(" path/to/table" )
162+ ```
163+
146164{{< hint info >}}
147165Spark 3.0 and earlier versions do not support using ` option ` with ` table ` in DataFrameReader commands. All options will be silently
148166ignored. Do not use ` table ` when attempting to time-travel or use other options. See [ SPARK-32592] ( https://issues.apache.org/jira/browse/SPARK-32592 ) .
You can’t perform that action at this time.
0 commit comments