malon64 opened a new issue, #4485:
URL: https://github.com/apache/iceberg-python/issues/4485

   ### 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.


-- 
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