You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "ajantha-bhat (via GitHub)" <gi...@apache.org> on 2023/10/03 17:33:08 UTC

Re: [PR] Docs: Document publish_changes procedure [iceberg]

ajantha-bhat commented on code in PR #8706:
URL: https://github.com/apache/iceberg/pull/8706#discussion_r1344466143


##########
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.

Review Comment:
   ```suggestion
   Publish changes from a staged WAP ID into the current table state.
   ```



##########
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                                     |

Review Comment:
   remove extra spaces and keep one trailing space. 
   
   For example,  refer `cherrypick_snapshot`



##########
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. |

Review Comment:
   nit: remove fullstop



##########
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                                     |

Review Comment:
   same for all the new tables



##########
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'

Review Comment:
   ```suggestion
   publish_changes with WAP ID 'wap_id_1'
   ```



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org