@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 |
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.Transaction build(Engine engine)
engine
- Engine
instance to use.ConcurrentTransactionException
- if the table already has a committed transaction with
the same given transaction identifier.