Fokko commented on code in PR #8374:
URL: https://github.com/apache/iceberg/pull/8374#discussion_r1302507284


##########
python/mkdocs/docs/api.md:
##########
@@ -150,32 +150,25 @@ catalog.create_table(
 
 Add new columns through the `Transaction` or `UpdateSchema` API:
 
-Use the Transaction API:
-
 ```python
-with table.transaction() as transaction:
-    transaction.update_schema().add_column("x", IntegerType(), "doc").commit()
+with table.update_schema() as update:
+    update.add_column("x", IntegerType(), "doc")
 ```
 
-Or, without a context manager:
+Or, without a context manager by calling the `.commit()` explicitly:
 
 ```python
-transaction = table.transaction()
-transaction.update_schema().add_column("x", IntegerType(), "doc").commit()
-transaction.commit_transaction()
+table.update_schema().add_column("x", IntegerType(), "doc").commit()
 ```
 
-Or, use the UpdateSchema API directly:
+Use the Transaction API:

Review Comment:
   ```suggestion
   Alternatively, use the transaction API to combine changes from multiple 
operations:
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to