awswrangler.lakeformation.start_transaction¶
- awswrangler.lakeformation.start_transaction(read_only: bool | None = False, time_out: float | None = inf, boto3_session: Session | None = None) str ¶
Start a new transaction and returns its transaction ID.
The transaction is periodically extended until it’s committed, canceled or the defined time-out is reached.
- Parameters:
read_only (bool, optional) – Indicates that that this transaction should be read only. Writes made using a read-only transaction ID will be rejected. Read-only transactions do not need to be committed.
time_out (float, optional) – Maximum duration over which a transaction is extended.
boto3_session (boto3.Session(), optional) – Boto3 Session. The default boto3 session will be used if boto3_session received None.
- Returns:
An opaque identifier for the transaction.
- Return type:
str
Examples
>>> import awswrangler as wr >>> transaction_id = wr.lakeformation.start_transaction(read_only=False)