Struct deltalake::DeltaTransaction[][src]

pub struct DeltaTransaction<'a> { /* fields omitted */ }
Expand description

Object representing a delta transaction. Clients that do not need to mutate action content in case a transaction conflict is encountered may use the commit method and rely on optimistic concurrency to determine the appropriate Delta version number for a commit. A good example of this type of client is an append only client that does not need to maintain transaction state with external systems. Clients that may need to do conflict resolution if the Delta version changes should use the prepare_commit and try_commit_transaction methods and manage the Delta version themselves so that they can resolve data conflicts that may occur between Delta versions.

Please not that in case of non-retryable error the temporary commit file such as _delta_log/_commit_<uuid>.json will orphaned in storage.

Implementations

Creates a new delta transaction. Holds a mutable reference to the delta table to prevent outside mutation while a transaction commit is in progress. Transaction behavior may be customized by passing an instance of DeltaTransactionOptions.

Add an arbitrary “action” to the actions associated with this transaction

Add an arbitrary number of actions to the actions associated with this transaction

Create a new add action and write the given bytes to the storage backend as a fully formed Parquet file

add_file accepts two optional parameters:

partitions: an ordered vec of WritablePartitionValues for the file to be added actions: an ordered list of Actions to be inserted into the log file ahead of the Add action for the file added. This should typically be used for txn type actions

Commits the given actions to the delta log. This method will retry the transaction commit based on the value of max_retry_commit_attempts set in DeltaTransactionOptions.

Low-level transaction API. Creates a temporary commit file. Once created, the transaction object could be dropped and the actual commit could be executed with DeltaTable.try_commit_transaction.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.