Fokko commented on code in PR #3809:
URL: https://github.com/apache/iceberg-python/pull/3809#discussion_r3907232795
##########
mkdocs/docs/api.md:
##########
@@ -365,6 +365,34 @@ for buf in tbl.scan().to_arrow_batch_reader():
print(f"Buffer contains {len(buf)} rows")
```
+### Write API modes: `Table` and `Transaction`
+
+Every write operation is available through two APIs.
+
+The **`Table` API** exposes each operation directly on the table object:
`tbl.append(...)`, `tbl.overwrite(...)`, `tbl.delete(...)`,
`tbl.dynamic_partition_overwrite(...)` and `tbl.upsert(...)`. Each call opens a
transaction, applies the single operation, and commits it as one atomic
snapshot. This is the simplest mode and the right default when you only need a
single write.
Review Comment:
A small nit in the wording. The `tbl.upsert(...)` could potentially generate
more than one snapshot, but it will be written atomically. Maybe we should be
less strict in the wording:
```suggestion
The **`Table` API** exposes each operation directly on the table object:
`tbl.append(...)`, `tbl.overwrite(...)`, `tbl.delete(...)`,
`tbl.dynamic_partition_overwrite(...)` and `tbl.upsert(...)`. Each call opens a
transaction, applies the operation, and commits atomically. This is the
simplest mode and the right default when you only need a single write.
```
--
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]