CANCEL JOB_RUN
Description
Cancel an in-progress Job run.
Note that the SQL statement does not end with ;
Syntax
CANCEL JOB_RUN `<job_run_id>`
JOB_NAME = <string>
Examples
CANCEL JOB_RUN `acde070d-8c4c-4f0d-9d8a-162843c10333`
JOB_NAME = 'my_job'
Required parameters
<job_run_id>
: Specify the ID of the Job run to cancel. Note, this should be surrounded by backticks (`), NOT single-quotes.JOB_NAME
: Specify the name of the Job that is running.
Status API
Status API response
API_OPERATION_STATUS_SUCCESS
from Status API indicates that the Job run has been cancelled.API_OPERATION_STATUS_FAILED
from Status API does not necessarily mean the Job run was not cancelled. To confirm whether the Job run was canceled, send a request to the DESCRIBE JOB_RUN API and refer to thesparkJobRun.status
field from its Status API response.
Example Status API response
The Status API response of successful Job cancellation.
{
"apiStatus": "API_OPERATION_STATUS_SUCCESS",
"apiResponse": {}
}