Skip to content

Commit

Permalink
docs: improved the zh and en version of sql/task_manage/show_jobs (#2356
Browse files Browse the repository at this point in the history
)
  • Loading branch information
michelle-qinqin authored Sep 1, 2022
1 parent d420126 commit 3b3d206
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
19 changes: 10 additions & 9 deletions docs/en/reference/sql/task_manage/SHOW_JOBS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# SHOW JOBS

The `SHOW JOBS` statement displays a list of submitted tasks in the cluster version, including all kinds of jobs in offline mode and `LOAD DATA` jobs in online mode
```SQL
SHOW JOBS;
```

The `SHOW JOBS` statement displays a list of tasks that have been submitted.


## Example

View all current tasks:

```
```sql
SHOW JOBS;

---- ---------- ------- ------------ ---------- ----------- --------- ---------------- -------
Expand All @@ -20,25 +21,25 @@ SHOW JOBS;

Submit an online data import task:

```
LOAD DATA INFIEL 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');
```sql
LOAD DATA INFILE 'file:///tmp/test.csv' INTO TABLE demo_db.t1 options(format='csv', header=false, mode='append');
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
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 all current tasks:
View all current tasks again:

```
```sql
SHOW JOBS;

---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
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
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------

1 row in set
Expand Down
16 changes: 8 additions & 8 deletions docs/zh/reference/sql/task_manage/SHOW_JOBS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# SHOW JOBS

`SHOW JOBS`语句用于显示在集群版下已经提交的任务列表。

```SQL
SHOW JOBS;
```

`SHOW JOBS`语句显示已经提交的任务列表。

## Example

查看当前所有的任务:

```
```sql
SHOW JOBS;

---- ---------- ------- ------------ ---------- ----------- --------- ---------------- -------
Expand All @@ -20,25 +20,25 @@ SHOW JOBS;

提交在线数据导入任务:

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

---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
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
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
```

查看当前所有的任务:

```
```sql
SHOW JOBS;

---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------
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
---- ------------------ ----------- ------------ --------------- ---------------------------------------------------------------------------------------------------------------------------- --------- ---------------- -------

1 row in set
Expand Down

0 comments on commit 3b3d206

Please sign in to comment.