public interface Transaction
| Modifier and Type | Method and Description |
|---|---|
void |
commitTransaction()
Apply the pending changes from all actions and commit.
|
ExpireSnapshots |
expireSnapshots()
Create a new
expire API to manage snapshots in this table. |
AppendFiles |
newAppend()
Create a new
append API to add files to this table. |
DeleteFiles |
newDelete()
Create a new
delete API to replace files in this table. |
default AppendFiles |
newFastAppend()
Create a new
append API to add files to this table. |
OverwriteFiles |
newOverwrite()
Create a new
overwrite API to overwrite files by a filter expression. |
ReplacePartitions |
newReplacePartitions()
Not recommended: Create a new
replace partitions API to dynamically
overwrite partitions in the table with new data. |
RewriteFiles |
newRewrite()
Create a new
rewrite API to replace files in this table. |
RewriteManifests |
rewriteManifests()
Create a new
rewrite manifests API to replace manifests for this table. |
Table |
table()
Return the
Table that this transaction will update. |
UpdateLocation |
updateLocation()
Create a new
UpdateLocation to update table location. |
UpdateProperties |
updateProperties()
Create a new
UpdateProperties to update table properties. |
UpdateSchema |
updateSchema()
Create a new
UpdateSchema to alter the columns of this table. |
Table table()
Table that this transaction will update.UpdateSchema updateSchema()
UpdateSchema to alter the columns of this table.UpdateSchemaUpdateProperties updateProperties()
UpdateProperties to update table properties.UpdatePropertiesUpdateLocation updateLocation()
UpdateLocation to update table location.UpdateLocationAppendFiles newAppend()
append API to add files to this table.AppendFilesdefault AppendFiles newFastAppend()
append API to add files to this table.
Using this method signals to the underlying implementation that the append should not perform extra work in order to commit quickly. Fast appends are not recommended for normal writes because the fast commit may cause split planning to slow down over time.
Implementations may not support fast appends, in which case this will return the same appender
as newAppend().
AppendFilesRewriteFiles newRewrite()
rewrite API to replace files in this table.RewriteFilesRewriteManifests rewriteManifests()
rewrite manifests API to replace manifests for this table.RewriteManifestsOverwriteFiles newOverwrite()
overwrite API to overwrite files by a filter expression.OverwriteFilesReplacePartitions newReplacePartitions()
replace partitions API to dynamically
overwrite partitions in the table with new data.
This is provided to implement SQL compatible with Hive table operations but is not recommended.
Instead, use the overwrite API to explicitly overwrite data.
ReplacePartitionsDeleteFiles newDelete()
delete API to replace files in this table.DeleteFilesExpireSnapshots expireSnapshots()
expire API to manage snapshots in this table.ExpireSnapshotsvoid commitTransaction()
ValidationException - If any update cannot be applied to the current table metadata.CommitFailedException - If the updates cannot be committed due to conflicts.