You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "RussellSpitzer (via GitHub)" <gi...@apache.org> on 2023/03/21 16:16:02 UTC

[GitHub] [iceberg] RussellSpitzer commented on a diff in pull request #7147: Spark 3.3: Add doc for the changelog view procedure.

RussellSpitzer commented on code in PR #7147:
URL: https://github.com/apache/iceberg/pull/7147#discussion_r1143661223


##########
docs/spark-procedures.md:
##########
@@ -587,3 +587,75 @@ Get all the snapshot ancestors by a particular snapshot
 CALL spark_catalog.system.ancestors_of('db.tbl', 1)
 CALL spark_catalog.system.ancestors_of(snapshot_id => 1, table => 'db.tbl')
 ```
+
+## Change Data Capture 
+
+### `create_changelog_view`
+
+Creates a view that contains the changes from a given table. 
+
+#### Usage
+
+| Argument Name | Required? | Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
+|---------------|----------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `table`       | ✔️ | string | Name of the table to create changlog view                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
+| `changelog_view`        |   | string | Name of the view to create                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
+| `options`     |   | map<string, string> | A map of Spark read options to use. For example, `start-snapshot-id`, the snapshot id to start reading from exclusively. If not provided, the table’s first snapshot will be used as the starting point. `end-snapshot-id`, the snapshot id to stop reading at inclusively. Default to the current snapshot. `start-timestamp`, the timestamp to start reading from exclusively. If not provided, the table’s first snapshot will be used as the starting point.`end-timestamp`, the timestamp to stop reading at inclusively. If not provided, the table’s current snapshot will be used as the ending point. | 

Review Comment:
   I think this ends up being hard to read, maybe we should have a small "options" table below here



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