Skip to content

Commit

Permalink
docs: improved the zh and en version of sql/task_manage/show_job (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-qinqin authored Aug 19, 2022
1 parent b5c0210 commit 4e42579
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
20 changes: 11 additions & 9 deletions docs/en/reference/sql/task_manage/SHOW_JOB.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
# SHOW JOB

The `SHOW JOB` statement is used to display the details of a single job that has been submitted according to the given JOB ID.

```SQL
SHOW JOB;
SHOW JOB job_id;
```

The `SHOW JOB` statement displays the details of a single job that has been submitted.

## Example

Submit an online data import task:

```sql
LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');
```
LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');
The output is shown below. The job id of the above command is 1.
```sql
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
id job_type state start_time end_time parameter cluster application_id error
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
```

View jobs with Job ID 1:

```
Check the job whose Job ID is 1:
```sql
SHOW JOB 1;

---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
id job_type state start_time end_time parameter cluster application_id error
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
```

Expand Down
18 changes: 11 additions & 7 deletions docs/zh/reference/sql/task_manage/SHOW_JOB.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,38 @@
# SHOW JOB

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

```SQL
SHOW JOB;
SHOW JOB job_id;
```

`SHOW JOB`语句显示已经提交的单个任务详情。


## Example

提交在线数据导入任务:

```sql
LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');
```
LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');
输出如下。可以看到该任务的JOB ID为1。
```sql
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
id job_type state start_time end_time parameter cluster application_id error
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
```

查看Job ID为1的任务:

```
```sql
SHOW JOB 1;

---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
id job_type state start_time end_time parameter cluster application_id error
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
1 ImportOnlineData Submitted 0 1641981373227 LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append'); local
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
```

Expand Down

0 comments on commit 4e42579

Please sign in to comment.