Package io.delta.kernel.transaction
Interface ReplaceTableTransactionBuilder
- All Known Implementing Classes:
ReplaceTableTransactionBuilderV2Impl
Builds a
Transaction to replace an existing Delta table.
Replace table creates a new table definition (schema, properties, layout) and atomically replaces the existing table.
- Since:
- 3.4.0
-
Method Summary
Modifier and TypeMethodDescriptionBuild the transaction for replacing the Delta table.Set the data layout specification for the new table definition.withMaxRetries(int maxRetries) Set the maximum number of retries to retry the commit in the case of a retryable error.withTableProperties(Map<String, String> properties) Set table properties for the new table definition.
-
Method Details
-
withTableProperties
Set table properties for the new table definition.- Parameters:
properties- A map of table property names to their values.
-
withDataLayoutSpec
Set the data layout specification for the new table definition.- Parameters:
spec- The data layout specification.- See Also:
-
withMaxRetries
Set the maximum number of retries to retry the commit in the case of a retryable error.- Parameters:
maxRetries- The maximum number of retries. Must be at least 0. Default is 200.
-
build
Build the transaction for replacing the Delta table.The transaction must be committed using
Transaction.commit(Engine, io.delta.kernel.utils.CloseableIterable)to apply the changes.- Parameters:
engine- TheEngineinstance to use for the transaction. Cannot be null.- Returns:
- A configured
Transactionfor replacing the table.
-