Skip to content

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.

NameTypeDescription
reasoner_typeSTRINGReasoner type. Valid values include 'predictive' and 'prescriptive'.
reasoner_nameSTRINGName of the reasoner to run the job on (case-sensitive).
payloadSTRINGJob payload as a JSON string.
object_reference_obj_arrayARRAY or NULLArray of Snowflake object references to attach to the job. (Default: NULL)
timeout_minsINT or NULLTimeout in minutes. (Default: NULL)
abort_detachedBOOLEAN or NULLWhether to abort detached processes. (Default: NULL)

A table with the following columns:

ColumnTypeDescription
IDSTRINGJob ID.
STATESTRINGJob state.
DATASTRINGJob data payload.

Submit a job and return the job id:

CALL relationalai.api.exec_job_async(
'predictive',
'my-reasoner',
'{"payload_type": "REQUEST_QUEUE_STATUS"}'
);