This is an automated email from the ASF dual-hosted git repository.
etudenhoefner 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 a960d43a58 Docs: Document publish_changes procedure (#8706)
a960d43a58 is described below
commit a960d43a58cc201183027c38ce679f7bf3a43891
Author: Naveen Kumar <[email protected]>
AuthorDate: Thu Oct 5 12:06:34 2023 +0530
Docs: Document publish_changes procedure (#8706)
---
docs/spark-procedures.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/docs/spark-procedures.md b/docs/spark-procedures.md
index 5303982b27..d7930fb01e 100644
--- a/docs/spark-procedures.md
+++ b/docs/spark-procedures.md
@@ -192,6 +192,44 @@ Cherry-pick snapshot 1 with named args
CALL catalog_name.system.cherrypick_snapshot(snapshot_id => 1, table =>
'my_table' )
```
+### `publish_changes`
+
+Publish changes from a staged WAP ID into the current table state.
+
+publish_changes creates a new snapshot from an existing snapshot without
altering or removing the original.
+
+Only append and dynamic overwrite snapshots can be successfully published.
+
+{{< hint info >}}
+This procedure invalidates all cached Spark plans that reference the affected
table.
+{{< /hint >}}
+
+#### Usage
+
+| Argument Name | Required? | Type | Description |
+|---------------|-----------|------|-------------|
+| `table` | ✔️ | string | Name of the table to update |
+| `wap_id` | ✔️ | long | The wap_id to be pusblished from stage to prod |
+
+#### Output
+
+| Output Name | Type | Description |
+| ------------|------|-------------|
+| `source_snapshot_id` | long | The table's current snapshot before publishing
the change |
+| `current_snapshot_id` | long | The snapshot ID created by applying the
change |
+
+#### Examples
+
+publish_changes with WAP ID 'wap_id_1'
+```sql
+CALL catalog_name.system.publish_changes('my_table', 'wap_id_1')
+```
+
+publish_changes with named args
+```sql
+CALL catalog_name.system.publish_changes(wap_id => 'wap_id_2', table =>
'my_table')
+```
+
### `fast_forward`
Fast-forward the current snapshot of one branch to the latest snapshot of
another.