exec_job_async()
relationalai.api
exec_job_async( reasoner_type STRING, reasoner_name STRING, payload STRING, object_reference_obj_array ARRAY DEFAULT NULL, timeout_mins INT DEFAULT NULL, abort_detached BOOLEAN DEFAULT NULL)A procedure that submits a job to a reasoner and returns immediately.
Requires the all_schema_rw application role.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
reasoner_type | STRING | Reasoner type. Valid values include 'predictive' and 'prescriptive'. |
reasoner_name | STRING | Name of the reasoner to run the job on (case-sensitive). |
payload | STRING | Job payload as a JSON string. |
object_reference_obj_array | ARRAY or NULL | Array of Snowflake object references to attach to the job. (Default: NULL) |
timeout_mins | INT or NULL | Timeout in minutes. (Default: NULL) |
abort_detached | BOOLEAN or NULL | Whether to abort detached processes. (Default: NULL) |
Returns
Section titled “Returns”A table with the following columns:
| Column | Type | Description |
|---|---|---|
ID | STRING | Job ID. |
STATE | STRING | Job state. |
DATA | STRING | Job data payload. |
Example
Section titled “Example”Submit a job and return the job id:
CALL relationalai.api.exec_job_async( 'predictive', 'my-reasoner', '{"payload_type": "REQUEST_QUEUE_STATUS"}');