Package org.apache.iceberg
Interface ReplacePartitions
-
- All Superinterfaces:
PendingUpdate<Snapshot>,SnapshotUpdate<ReplacePartitions>
- All Known Implementing Classes:
BaseReplacePartitions
public interface ReplacePartitions extends SnapshotUpdate<ReplacePartitions>
Not recommended: API for overwriting files in a table by partition.This is provided to implement SQL compatible with Hive table operations but is not recommended. Instead, use the
overwrite APIto explicitly overwrite data.This API accumulates file additions and produces a new
Snapshotof the table by replacing all files in partitions with new data with the new additions. This operation is used to implement dynamic partition replacement.When committing, these changes will be applied to the latest table snapshot. Commit conflicts will be resolved by applying the changes to the new latest snapshot and reattempting the commit. This has no requirements for the latest snapshot and will not fail based on other snapshot changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReplacePartitionsaddFile(DataFile file)Add aDataFileto the table.ReplacePartitionsvalidateAppendOnly()Validate that no partitions will be replaced and the operation is append-only.-
Methods inherited from interface org.apache.iceberg.PendingUpdate
apply, commit, updateEvent
-
Methods inherited from interface org.apache.iceberg.SnapshotUpdate
deleteWith, set, stageOnly
-
-
-
-
Method Detail
-
addFile
ReplacePartitions addFile(DataFile file)
Add aDataFileto the table.- Parameters:
file- a data file- Returns:
- this for method chaining
-
validateAppendOnly
ReplacePartitions validateAppendOnly()
Validate that no partitions will be replaced and the operation is append-only.- Returns:
- this for method chaining
-
-