prefect.transactions
get_transaction
transaction
-
: An identifier to use for the transaction-
: The store to use for persisting the transaction result. If not provided,
a default store will be used based on the current run context.-
: The commit mode controlling when the transaction and
child transactions are committed-
: Whether to overwrite an existing transaction record in the store-
: Whether to write the result to the store on commit. If not provided,
will default will be determined by the current run context. If no run context is
available, the value of PREFECT_RESULTS_PERSIST_BY_DEFAULT
will be used.atransaction
-
: An identifier to use for the transaction-
: The store to use for persisting the transaction result. If not provided,
a default store will be used based on the current run context.-
: The commit mode controlling when the transaction and
child transactions are committed-
: Whether to overwrite an existing transaction record in the store-
: Whether to write the result to the store on commit. If not provided,
the default will be determined by the current run context. If no run context is
available, the value of PREFECT_RESULTS_PERSIST_BY_DEFAULT
will be used.IsolationLevel
auto
enum.auto()
to avoid requiring a second import to use AutoEnum
CommitMode
auto
enum.auto()
to avoid requiring a second import to use AutoEnum
TransactionState
auto
enum.auto()
to avoid requiring a second import to use AutoEnum
BaseTransaction
add_child
get
set
method.
Args:
name
: The name of the value to getdefault
: The default value to return if the value is not foundget
get_active
get_parent
is_active
is_committed
is_pending
is_rolled_back
is_staged
model_copy
prepare_transaction
serialize
set
name
: The name of the value to setvalue
: The value to setstage
Transaction
add_child
begin
commit
get
set
method.
Args:
name
: The name of the value to getdefault
: The default value to return if the value is not foundget_active
get_parent
is_active
is_committed
is_pending
is_rolled_back
is_staged
prepare_transaction
read
reset
rollback
run_hook
set
name
: The name of the value to setvalue
: The value to setstage
AsyncTransaction
add_child
begin
commit
get
set
method.
Args:
name
: The name of the value to getdefault
: The default value to return if the value is not foundget_active
get_parent
is_active
is_committed
is_pending
is_rolled_back
is_staged
prepare_transaction
read
reset
rollback
run_hook
set
name
: The name of the value to setvalue
: The value to setstage