transactions
Creates, updates, deletes, gets or lists a transactions resource.
Overview
| Name | transactions |
| Type | Resource |
| Id | aws.lakeformation.transactions |
Fields
The following fields are returned by SELECT queries:
- describe_transaction
- list_transactions
| Name | Datatype | Description |
|---|---|---|
transaction_end_time | string (date-time) | The time when the transaction committed or aborted, if it is not currently active. |
transaction_id | string | The ID of the transaction. (pattern: <code>[\p{L}\p{N}\p{P}]*</code>) |
transaction_start_time | string (date-time) | The time when the transaction started. |
transaction_status | string | A status of ACTIVE, COMMITTED, or ABORTED. (ACTIVE, COMMITTED, ABORTED, COMMIT_IN_PROGRESS) |
| Name | Datatype | Description |
|---|---|---|
next_token | string | A continuation token indicating whether additional data is available. |
transactions | array | A list of transactions. The record for each transaction is a TransactionDescription object. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_transaction | select | region | Returns the details of a single transaction. | |
list_transactions | select | region | Returns 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_cancel | delete | region | 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. | |
commit_transaction | exec | region, TransactionId | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_transaction
- list_transactions
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
;
Returns 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.
SELECT
next_token,
transactions
FROM aws.lakeformation.transactions
WHERE region = '{{ region }}' -- required
;
DELETE examples
- delete_objects_on_cancel
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
- commit_transaction
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 }}"
}'
;