Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions presto-docs/src/main/sphinx/connector/iceberg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1926,6 +1926,37 @@ Iceberg tables do not support running multiple :doc:`../sql/merge` statements on
Failed to commit Iceberg update to table: <table name>
Found conflicting files that can contain records matching true

Transaction support
^^^^^^^^^^^^^^^^^^^

The Iceberg connector supports explicit multi-statement transactions with writes
to a single Iceberg table. To run transaction statements, use
:doc:`/sql/start-transaction` with :doc:`/sql/commit` or :doc:`/sql/rollback`.

The Iceberg connector provides snapshot isolation at ``REPEATABLE READ`` level.
This also satisfies ``READ COMMITTED`` and ``READ UNCOMMITTED``, so these
isolation levels are supported as well. For snapshot semantics, use
``REPEATABLE READ``::

START TRANSACTION ISOLATION LEVEL REPEATABLE READ;
INSERT INTO iceberg.default.test_table (id, status) VALUES (1, 'pending');
UPDATE iceberg.default.test_table SET status = 'committed' WHERE id = 1;
COMMIT;

Limitations:

* Writes in the same transaction can target only one Iceberg table. Attempts
to write to another table fail with ``Not allowed to open write transactions on multiple tables``.
* ``SERIALIZABLE`` isolation is not supported by the Iceberg connector.
* The following statements are only supported in autocommit mode:
``MERGE INTO``, ``CREATE/DROP/RENAME TABLE``,
``CREATE/DROP/RENAME SCHEMA``, ``CREATE/DROP/RENAME VIEW``,
``CREATE/DROP/REFRESH MATERIALIZED VIEW``, ``TRUNCATE TABLE``, and
``ANALYZE``.
* ``CALL`` statements are only supported in autocommit mode.
* If concurrent transactions change table metadata, commit may fail and require
retrying the transaction (for example, ``Table metadata refresh is required``).

.. _iceberg_analyze:

Collecting table and column statistics
Expand Down
Loading