relationalai.api.get_transaction_problems()
get_transaction_problems(id STRING)A function that retrieves errors and warnings for the transaction with the specified id.
Requires the all_resource_admin application role.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id | STRING | The ID of the transaction to retrieve. |
Returns
Section titled “Returns”A table with the following columns:
| Column Name | Data Type | Description |
|---|---|---|
| TYPE | STRING | The type of the problem. |
| ERROR_CODE | STRING | The error code. |
| MESSAGE | STRING | A short description of the problem. |
| REPORT | STRING | Full server-side report of the problem. |
| PATH | STRING | Information printed as part of the header in API requests. |
| IS_ERROR | BOOLEAN | Whether the problem causes execution errors. |
| IS_EXCEPTION | BOOLEAN | Whether the problem was caused by an exception. |
| JSON | OBJECT | A JSON object with the same information as the rest of the columns. |
Example
Section titled “Example”Use the api.get_transaction_problems() procedure to retrieve details for problems in a transaction:
-- Retrieve the details for the transaction with ID '02c8fa31-1234-5678-90ab-abcdef123456'.SELECT * FROM TABLE(relationalai.api.get_transaction_problems('02c8fa31-1234-5678-90ab-abcdef123456'));/*+----------------+--------------+----------------------------------------------------+------------------------------------------------+------+-------------+--------------+-----------------------------------------+ | TYPE | ERROR_CODE | MESSAGE | REPORT | PATH | IS_ERROR | IS_EXCEPTION | JSON | |---------------+---------------+----------------------------------------------------+------------------------------------------------+------+-------------+--------------+-----------------------------------------| | ClientProblem | PARSE_PROBLEM | Invalid token `.`. Expecting `(`, `=`, `[` or `{`. | 60| def p.foo = \'bar\' | | TRUE | FALSE | { | | | | | ^~~~~~~~~~~~~~~ | | | | "error_code": "PARSE_PROBLEM", | | | | | | | | | "is_error": true, | | | | | | | | | "is_exception": false, | | | | | | | | | "message": "Invalid token `.`. ...", | | | | | | | | | "path": "", | | | | | | | | | "report": "60| ...\n ^~~~~~~~~~~\n", | | | | | | | | | "type": "ClientProblem" | | | | | | | | | } | +---------------+---------------+----------------------------------------------------+------------------------------------------------+------+-------------+--------------+------------------------------------------+ */Transaction IDs can be found in the ID column of the api.transactions view.
IDs are also reported by the RAI debugger.
See Compute Resources for more information on managing transactions.