This is an automated email from the ASF dual-hosted git repository.

yufei pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b58277540 Docs: Enhance create_changelog_view usage (#9889)
8b58277540 is described below

commit 8b58277540fb9c5bc1936dcbc1a13793a72a6fee
Author: Manu Zhang <[email protected]>
AuthorDate: Thu Mar 14 00:54:20 2024 +0800

    Docs: Enhance create_changelog_view usage (#9889)
---
 docs/docs/spark-procedures.md | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/docs/docs/spark-procedures.md b/docs/docs/spark-procedures.md
index ee8a8466c7..7dc0d1a2aa 100644
--- a/docs/docs/spark-procedures.md
+++ b/docs/docs/spark-procedures.md
@@ -756,8 +756,8 @@ Creates a view that contains the changes from a given table.
 | `table`              | ✔️         | string              | Name of the source 
table for the changelog                                                         
                                                                                
                  |
 | `changelog_view`     |           | string              | Name of the view to 
create                                                                          
                                                                                
                 |
 | `options`            |           | map<string, string> | A map of Spark read 
options to use                                                                  
                                                                                
                 |
-| `net_changes`        |           | boolean             | Whether to output 
net changes (see below for more information). Defaults to false.                
                                                                                
                   |
-| `compute_updates`    |           | boolean             | Whether to compute 
pre/post update images (see below for more information). Defaults to false.     
                                                                                
                  | 
+| `net_changes`        |           | boolean             | Whether to output 
net changes (see below for more information). Defaults to false. It must be 
false when `compute_updates` is true.                                           
                                                                       |
+| `compute_updates`    |           | boolean             | Whether to compute 
pre/post update images (see below for more information). Defaults to true if 
`identifer_columns` are provided; otherwise, defaults to false.                 
                                                                                
      | 
 | `identifier_columns` |           | array<string>       | The list of 
identifier columns to compute updates. If the argument `compute_updates` is set 
to true and `identifier_columns` are not provided, the table’s current 
identifier fields will be used.   |
 
 Here is a list of commonly used Spark read options:
@@ -823,7 +823,10 @@ second snapshot deleted 1 record.
 |2     | Bob      |INSERT      |0      |5390529835796506035|
 |1     | Alice  |DELETE        |1      |8764748981452218370|
 
-Create a changelog view that computes net changes. It removes intermediate 
changes and only outputs the net changes. 
+#### Net Changes
+
+The procedure can remove intermediate changes across multiple snapshots, and 
only outputs the net changes. Here is an example to create a changelog view 
that computes net changes. 
+
 ```sql
 CALL spark_catalog.system.create_changelog_view(
   table => 'db.tbl',

Reply via email to