Skip to content

Commit

Permalink
Document row level deletes for Iceberg
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjo2144 authored and findepi committed Apr 27, 2022
1 parent b2fb2b5 commit 940b6d9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/src/main/sphinx/connector/iceberg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -374,12 +374,14 @@ above, this SQL will delete all partitions for which ``country`` is ``US``::
DELETE FROM iceberg.testdb.customer_orders
WHERE country = 'US'

Currently, the Iceberg connector only supports deletion by partition.
This SQL below will fail because the ``WHERE`` clause selects only some of the rows
in the partition::
Tables using either v1 or v2 of the Iceberg specification will perform a partition
delete if the ``WHERE`` clause meets these conditions.

DELETE FROM iceberg.testdb.customer_orders
WHERE country = 'US' AND customer = 'Freds Foods'
Row level deletion
^^^^^^^^^^^^^^^^^^

Tables using v2 of the Iceberg specification support deletion of individual rows
by writing position delete files.

Rolling back to a previous snapshot
-----------------------------------
Expand Down Expand Up @@ -434,7 +436,7 @@ Property Name Description

``format_version`` Optionally specifies the format version of the Iceberg
specification to use for new tables; either ``1`` or ``2``.
Defaults to ``1``. Version ``2`` is required for row level deletes.
Defaults to ``2``. Version ``2`` is required for row level deletes.
================================================== ================================================================

The table definition below specifies format Parquet, partitioning by columns ``c1`` and ``c2``,
Expand Down

0 comments on commit 940b6d9

Please sign in to comment.