relationalai.api.cancel_transaction()
cancel_transaction(transaction_id STRING)A procedure that issues a cancelation request for the transaction with the specified transaction_id.
Once the transaction is canceled, its STATE is reported as CANCELED in the api.transactions view.
Requires the eng_user application role.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
transaction_id | STRING | The ID of the transaction to cancel. |
Returns
Section titled “Returns”STRING
Example
Section titled “Example”Use the api.cancel_transaction() procedure to cancel a transaction:
-- Cancel the transaction with ID '02c8fa31-1234-5678-90ab-abcdef123456'.CALL relationalai.api.cancel_transaction('02c8fa31-1234-5678-90ab-abcdef123456');/*+------------------------+ | Cancelling transaction | +------------------------+ */Transaction IDs can be found in the ID column of the api.transactions view.
IDs are also reported by the RAI debugger.
It may take a few moments for the transaction to be canceled.
Use the transactions view or the get_transaction() procedure to check the status of the transaction.
Once the transaction is canceled, its STATE is reported as CANCELED.
See Compute Resources for more information on managing transactions.