Class CreateTableTransactionBuilderImpl
- All Implemented Interfaces:
CreateTableTransactionBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionCreateTableTransactionBuilderImpl(String tablePath, StructType schema, String engineInfo) -
Method Summary
Modifier and TypeMethodDescriptionBuild the transaction for creating the Delta table.withCommitter(Committer committer) Provides a custom committer to use at transaction commit time.Set the data layout specification for the new Delta table.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 Delta table.
-
Constructor Details
-
CreateTableTransactionBuilderImpl
-
-
Method Details
-
withTableProperties
Description copied from interface:CreateTableTransactionBuilderSet table properties for the new Delta table.This method can be called multiple times to add additional properties. If a property key already exists from a previous call with a different value, an
IllegalArgumentExceptionwill be thrown.Note, user-properties (those without a '.delta' prefix) are case-sensitive. Delta-properties are case-insensitive and are normalized to their expected case before writing to the log.
- Specified by:
withTablePropertiesin interfaceCreateTableTransactionBuilder- Parameters:
properties- A map of table property names to their values.
-
withDataLayoutSpec
Description copied from interface:CreateTableTransactionBuilderSet the data layout specification for the new Delta table.The data layout specification determines how data files are organized within the table, such as partitioning and clustering strategies.
The default, if not specified in the builder, is unpartitioned.
- Specified by:
withDataLayoutSpecin interfaceCreateTableTransactionBuilder- Parameters:
spec- The data layout specification.- See Also:
-
withMaxRetries
Description copied from interface:CreateTableTransactionBuilderSet the maximum number of retries to retry the commit in the case of a retryable error.- Specified by:
withMaxRetriesin interfaceCreateTableTransactionBuilder- Parameters:
maxRetries- The maximum number of retries. Must be at least 0. Default is 200.
-
withCommitter
Description copied from interface:CreateTableTransactionBuilderProvides a custom committer to use at transaction commit time.Catalog implementations that wish to support the catalogManaged Delta table feature should provide to engines their own catalog-specific Committer implementation which may, for example, send a commit RPC to the catalog service to finalize the commit.
If no committer is provided, a default committer will be created that only supports writing into filesystem-managed Delta tables.
- Specified by:
withCommitterin interfaceCreateTableTransactionBuilder- Parameters:
committer- the committer to use- Returns:
- a new builder instance with the provided committer
- See Also:
-
withClock
-
build
Description copied from interface:CreateTableTransactionBuilderBuild the transaction for creating the Delta table.This validates all the configuration and creates a
Transactionthat can be used to create the new Delta table. The transaction must be committed usingTransaction.commit(Engine, CloseableIterable)to actually create the table.- Specified by:
buildin interfaceCreateTableTransactionBuilder- Parameters:
engine- TheEngineinstance to use.- Returns:
- A configured
Transactionfor creating the table.
-
getTablePropertiesOpt
-
getCommitterOpt
-