Skip to main content

transactions

Creates, updates, deletes, gets or lists a transactions resource.

Overview

Nametransactions
TypeResource
Idaws.lakeformation.transactions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
transaction_end_timestring (date-time)The time when the transaction committed or aborted, if it is not currently active.
transaction_idstringThe ID of the transaction. (pattern: <code>[\p{L}\p{N}\p{P}]*</code>)
transaction_start_timestring (date-time)The time when the transaction started.
transaction_statusstringA status of ACTIVE, COMMITTED, or ABORTED. (ACTIVE, COMMITTED, ABORTED, COMMIT_IN_PROGRESS)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_transactionselectregionReturns the details of a single transaction.
list_transactionsselectregionReturns metadata about transactions and their status. To prevent the response from growing indefinitely, only uncommitted transactions and those available for time-travel queries are returned. This operation can help you identify uncommitted transactions or to get information about transactions.
delete_objects_on_canceldeleteregionFor a specific governed table, provides a list of Amazon S3 objects that will be written during the current transaction and that can be automatically deleted if the transaction is canceled. Without this call, no Amazon S3 objects are automatically deleted when a transaction cancels. The Glue ETL library function write_dynamic_frame.from_catalog() includes an option to automatically call DeleteObjectsOnCancel before writes. For more information, see Rolling Back Amazon S3 Writes.
commit_transactionexecregion, TransactionIdAttempts to commit the specified transaction. Returns an exception if the transaction was previously aborted. This API action is idempotent if called multiple times for the same transaction.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the details of a single transaction.

SELECT
transaction_end_time,
transaction_id,
transaction_start_time,
transaction_status
FROM aws.lakeformation.transactions
WHERE region = '{{ region }}' -- required
;

DELETE examples

For a specific governed table, provides a list of Amazon S3 objects that will be written during the current transaction and that can be automatically deleted if the transaction is canceled. Without this call, no Amazon S3 objects are automatically deleted when a transaction cancels. The Glue ETL library function write_dynamic_frame.from_catalog() includes an option to automatically call DeleteObjectsOnCancel before writes. For more information, see Rolling Back Amazon S3 Writes.

DELETE FROM aws.lakeformation.transactions
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Attempts to commit the specified transaction. Returns an exception if the transaction was previously aborted. This API action is idempotent if called multiple times for the same transaction.

EXEC aws.lakeformation.transactions.commit_transaction
@region='{{ region }}' --required
@@json=
'{
"TransactionId": "{{ TransactionId }}"
}'
;