Skip to content

Commit afa772d

Browse files
committed
editorial changes
Co-Authored-By: Grace Cai <qqzczy@126.com>
1 parent 54a5a83 commit afa772d

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

sql-statements/sql-statement-import-into.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The supported options are described as follows:
141141

142142
| Option name | Supported data sources and formats | Description |
143143
|:---|:---|:---|
144-
| `GROUP_KEY='<string>'` | All file formats | Specifies an optional group key for the job. The group key does not affect the import itself; TiDB groups import jobs with the same group key so that you can monitor related jobs collectively using [`SHOW IMPORT GROUPS`](/sql-statements/sql-statement-show-import-group.md). The key can contain only alphanumeric characters, underscores (_), or hyphens (-), and can be up to 256 characters long. If no group key is set, the job does not belong to any group and does not appear in `SHOW IMPORT GROUPS` results. |
144+
| `GROUP_KEY='<string>'` | All file formats | Specifies an optional group key for the job. The group key does not affect the import process itself. It enables you to monitor import jobs with the same group key collectively using [`SHOW IMPORT GROUPS`](/sql-statements/sql-statement-show-import-group.md). The group key can contain only alphanumeric characters, underscores (`_`), and hyphens (`-`), up to 256 characters. If no group key is specified, the job does not belong to any group and does not appear in `SHOW IMPORT GROUPS` results. |
145145
| `CHARACTER_SET='<string>'` | CSV | Specifies the character set of the data file. The default character set is `utf8mb4`. The supported character sets include `binary`, `utf8`, `utf8mb4`, `gb18030`, `gbk`, `latin1`, and `ascii`. |
146146
| `FIELDS_TERMINATED_BY='<string>'` | CSV | Specifies the field separator. The default separator is `,`. |
147147
| `FIELDS_ENCLOSED_BY='<char>'` | CSV | Specifies the field delimiter. The default delimiter is `"`. |
@@ -263,7 +263,7 @@ IMPORT INTO t FROM '/path/to/file.csv' WITH DETACHED;
263263

264264
#### Assign a group key to the import job
265265

266-
To group related import jobs so that you can monitor them together using [`SHOW IMPORT GROUPS`](/sql-statements/sql-statement-show-import-group.md), specify the `GROUP_KEY` option:
266+
To monitor related import jobs collectively using [`SHOW IMPORT GROUPS`](/sql-statements/sql-statement-show-import-group.md), assign them the same group key with the `GROUP_KEY` option:
267267

268268
```sql
269269
IMPORT INTO t FROM '/path/to/file.csv' WITH GROUP_KEY='user_group';

sql-statements/sql-statement-show-import-job.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ summary: An overview of the usage of SHOW IMPORT JOB in TiDB.
55

66
# SHOW IMPORT JOB
77

8-
The `SHOW IMPORT JOB` statement is used to show `IMPORT` jobs created in TiDB. By default, `SHOW IMPORT JOBS` shows jobs created by the current user. To view all import jobs, you need the `SUPER` privilege.
8+
The `SHOW IMPORT JOB` statement is used to show `IMPORT` jobs created in TiDB.
9+
10+
It supports the following two forms:
11+
12+
- `SHOW IMPORT JOBS`
13+
- `SHOW IMPORT JOB <job-id>`
914

1015
## Required privileges
1116

12-
- `SHOW IMPORT JOBS`: if a user has the `SUPER` privilege, this statement shows all import jobs in TiDB. Otherwise, this statement only shows jobs created by the current user.
17+
- `SHOW IMPORT JOBS`: by default, this statement only shows jobs created by the current user. To view all import jobs, you need the `SUPER` privilege.
1318
- `SHOW IMPORT JOB <job-id>`: only the creator of an import job or users with the `SUPER` privilege can use this statement to view a specific job.
1419

1520
## Synopsis
@@ -30,8 +35,8 @@ The output fields of the `SHOW IMPORT JOB` statement are described as follows:
3035

3136
| Column | Description |
3237
|------------------|-------------------------|
33-
| Job_ID | The ID of the job |
34-
| Group_Key | The group key of the job |
38+
| Job_ID | The ID of the job |
39+
| Group_Key | The group key of the job |
3540
| Data_Source | Information about the data source |
3641
| Target_Table | The name of the target table |
3742
| Table_ID | The ID of the target table |
@@ -44,15 +49,15 @@ The output fields of the `SHOW IMPORT JOB` statement are described as follows:
4449
| Start_Time | The time when the task is started |
4550
| End_Time | The time when the task is ended |
4651
| Created_By | The name of the database user who creates the task |
47-
| Last_Update_Time | The time when the job was last updated |
52+
| Last_Update_Time | The time when the job was last updated |
4853
| Cur_Step | The specific sequential processing step of this job |
4954
| Cur_Step_Processed_Size | The amount of data that has been processed within the current step |
5055
| Cur_Step_Total_Size | The total size of the data to be processed in the current step |
5156
| Cur_Step_Progress_Pct | The estimated completion percentage of the current step |
5257
| Cur_Step_Speed | The current data processing speed |
5358
| Cur_Step_ETA | The estimated time remaining for the current step to complete |
5459

55-
## Filtering import jobs
60+
## Filter import jobs
5661

5762
Only `SHOW IMPORT JOBS` supports filtering import jobs with a `WHERE` or `LIKE` clause. `SHOW IMPORT JOB <job-id>` does not support these clauses.
5863

0 commit comments

Comments
 (0)