Skip to content

Feature Request: Support for INSERT OVERWRITE / Atomic Table Overwrite #620

Description

@carc-prathyush-shankar

Summary

Add INSERT OVERWRITE support to enable atomic single-snapshot table overwrites, matching the behavior available in Spark, Trino, and PyIceberg. There currently does not seem to be a way to atomically replace all rows in a table with new data in a single commit.

Use Case

Batch ETL pipelines commonly need to fully replace table contents on each run. For example:

INSERT OVERWRITE my_catalog.my_schema.target_table
SELECT * FROM source_table WHERE ...

This pattern is standard in workflows where a batch job reads from source tables, applies transformations, and overwrites a target table.

Additional Context

The Iceberg spec already supports the overwrite snapshot operation type, and I see it's defined in the codebase (IcebergSnapshotOperationType::OVERWRITE). The AddUpdateSnapshot function already creates overwrite snapshots for UPDATE operations, so the underlying infrastructure may partially exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions