@Evolving public interface TransactionBuilder
Transaction to mutate a Delta table.| Modifier and Type | Method and Description |
|---|---|
Transaction |
build(Engine engine)
Build the transaction.
|
TransactionBuilder |
withPartitionColumns(Engine engine,
java.util.List<String> partitionColumns)
Set the list of partitions columns when create a new partitioned table.
|
TransactionBuilder |
withSchema(Engine engine,
StructType schema)
Set the schema of the table when creating a new table.
|
TransactionBuilder |
withTableProperties(Engine engine,
java.util.Map<String,String> properties)
Set the table properties for the table.
|
TransactionBuilder |
withTransactionId(Engine engine,
String applicationId,
long transactionVersion)
Set the transaction identifier for idempotent writes.
|
TransactionBuilder withSchema(Engine engine, StructType schema)
engine - Engine instance to use.schema - The new schema of the table.TransactionBuilder instance.TransactionBuilder withPartitionColumns(Engine engine, java.util.List<String> partitionColumns)
engine - Engine instance to use.partitionColumns - The partition columns of the table. These should be a subset of the
columns in the schema.TransactionBuilder instance.TransactionBuilder withTransactionId(Engine engine, String applicationId, long transactionVersion)
engine - Engine instance to use.applicationId - The application ID that is writing to the table.transactionVersion - The version of the transaction. This should be monotonically
increasing with each write for the same application ID.TransactionBuilder instance.TransactionBuilder withTableProperties(Engine engine, java.util.Map<String,String> properties)
engine - Engine instance to use.properties - The table properties to set. These are key-value pairs that can be used to
configure the table. And these properties are stored in the table metadata.TransactionBuilder instance.Transaction build(Engine engine)
engine - Engine instance to use.ConcurrentTransactionException - if the table already has a committed transaction with
the same given transaction identifier.InvalidConfigurationValueException - if the value of the property is invalid.UnknownConfigurationException - if any of the properties are unknown to TableConfig.