Skip to content

Feature: Revive atomic REPLACE TABLE support in PyIceberg #4485

Backlog

Description

@malon64

Feature Request / Improvement

I’d like to revive support for atomic table replacement (RTAS) in PyIceberg.

This functionality already exists in Apache Iceberg Java through createOrReplaceTransaction(), but there is no equivalent high-level API in PyIceberg.

The feature was previously discussed in #281, with implementations proposed in #433 and, more recently, #3220. Unfortunately, the latter was closed due to inactivity without being merged.

Why this matters

With Polars 2.2 introducing extensive Iceberg SQL support, atomic CREATE OR REPLACE TABLE AS SELECT is one of the remaining capabilities needed for production-grade dbt workloads.

It allows rebuilding and replacing tables without risking downtime or broken downstream pipelines if a transformation fails.

Since Polars relies on PyIceberg for catalog operations and commits, implementing this upstream would directly benefit Polars and potentially other Python-based engines.

Proposed direction

The previous PR #3220 already introduced a promising API:

with catalog.replace_table_transaction(
identifier="analytics.orders",
schema=new_schema,
) as tx:
tx.append(data)

Ideally, this would provide atomic replacement of data and metadata, preserve Iceberg history, and support REST catalogs.

Would the maintainers be open to reviving #3220, or is there a preferred alternative approach?

I’d be happy to contribute to this effort.

Activity

  1. added a commit that references this issue on Nov 25, 2026
    f1d881c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions