Skip to content

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.

NameTypeDescription
idSTRINGThe ID of the transaction to retrieve.

A table with the following columns:

Column NameData TypeDescription
TYPESTRINGThe type of the problem.
ERROR_CODESTRINGThe error code.
MESSAGESTRINGA short description of the problem.
REPORTSTRINGFull server-side report of the problem.
PATHSTRINGInformation printed as part of the header in API requests.
IS_ERRORBOOLEANWhether the problem causes execution errors.
IS_EXCEPTIONBOOLEANWhether the problem was caused by an exception.
JSONOBJECTA JSON object with the same information as the rest of the columns.

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.