The TERMINATE JOB statement stops a running stream job. Stream jobs run continuously until explicitly stopped, so use this statement to stop a job when it is no longer needed.
Engine and version
Applies to the stream engine only. Requires version 3.1.8 or later.
Note
To view the current version or perform a minor version update, go to the console.
Syntax
TERMINATE JOB job_nameUsage notes
job_name is the name of the stream job to stop. The job must be in RUNNING status. Use the DESCRIBE statement to confirm the job status before running TERMINATE JOB.
Example
Stop the stream job test_datagen2:
TERMINATE JOB test_datagen2;Verify the result
Run SHOW JOBS; to check the job status. After the statement executes successfully, Job Status for test_datagen2 is CANCELED.
job_name | Job Status | ...
--------------+------------+----
test_datagen2 | CANCELED | ...