SHOW JOB#

SHOW JOB语句根据给定的JOB ID显示已经提交的单个任务详情。

SHOW JOB job_id;

Example#

提交在线数据导入任务:

LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');

输出如下。可以看到该任务的JOB ID为1。

 -------- ------------------- ----------- --------------------- ---------- ------------------------------- ---------- ---------------- ------- ------ ------ ------ ---------- -------------
  job_id   job_type            state       start_time            end_time   parameter                       cluster    application_id   error   db     name   pid    cur_task   component
 -------- ------------------- ----------- --------------------- ---------- ------------------------------- ---------- ---------------- ------- ------ ------ ------ ---------- -------------
  1        ImportOfflineData   Submitted   2023-05-30 19:54:13              /tmp/sql-14193917739024710575   local[*]                            NULL   NULL   NULL   NULL       TaskManager
 -------- ------------------- ----------- --------------------- ---------- ------------------------------- ---------- ---------------- ------- ------ ------ ------ ---------- -------------

查看Job ID为1的任务:

SHOW JOB 1;

-------- ------------------- ----------- --------------------- ---------- ------------------------------- ---------- ---------------- ------- ------ ------ ------ ---------- -------------
  job_id   job_type            state       start_time            end_time   parameter                       cluster    application_id   error   db     name   pid    cur_task   component
 -------- ------------------- ----------- --------------------- ---------- ------------------------------- ---------- ---------------- ------- ------ ------ ------ ---------- -------------
  1        ImportOfflineData   Submitted   2023-05-30 19:54:13              /tmp/sql-14193917739024710575   local[*]                            NULL   NULL   NULL   NULL       TaskManager
 -------- ------------------- ----------- --------------------- ---------- ------------------------------- ---------- ---------------- ------- ------ ------ ------ ---------- -------------

相关语句#

SHOW JOBS

STOP JOBS