Skip to content

Commit ad6e29f

Browse files
committed
editorial changes
Co-authored-by: Grace Cai <qqzczy@126.com>
1 parent 54a5a83 commit ad6e29f

2 files changed

Lines changed: 13 additions & 3 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ The `SHOW IMPORT JOB` statement is used to show `IMPORT` jobs created in TiDB. B
1010
## Required privileges
1111

1212
- `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.
13+
The `SHOW IMPORT JOB` statement is used to show `IMPORT` jobs created in TiDB.
14+
15+
It supports the following two forms:
16+
17+
- `SHOW IMPORT JOBS`
18+
- `SHOW IMPORT JOB <job-id>`
19+
20+
## Required privileges
21+
22+
- `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.
1323
- `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.
1424

1525
## Synopsis
@@ -52,7 +62,7 @@ The output fields of the `SHOW IMPORT JOB` statement are described as follows:
5262
| Cur_Step_Speed | The current data processing speed |
5363
| Cur_Step_ETA | The estimated time remaining for the current step to complete |
5464

55-
## Filtering import jobs
65+
## Filter import jobs
5666

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

0 commit comments

Comments
 (0)