You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sql-statements/sql-statement-import-into.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ The supported options are described as follows:
141
141
142
142
| Option name | Supported data sources and formats | Description |
143
143
|:---|:---|:---|
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. |
145
145
|`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`. |
146
146
|`FIELDS_TERMINATED_BY='<string>'`| CSV | Specifies the field separator. The default separator is `,`. |
147
147
|`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;
263
263
264
264
#### Assign a group key to the import job
265
265
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:
267
267
268
268
```sql
269
269
IMPORT INTO t FROM'/path/to/file.csv' WITH GROUP_KEY='user_group';
Copy file name to clipboardExpand all lines: sql-statements/sql-statement-show-import-job.md
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,16 @@ summary: An overview of the usage of SHOW IMPORT JOB in TiDB.
5
5
6
6
# SHOW IMPORT JOB
7
7
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>`
9
14
10
15
## Required privileges
11
16
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.
13
18
-`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.
14
19
15
20
## Synopsis
@@ -30,8 +35,8 @@ The output fields of the `SHOW IMPORT JOB` statement are described as follows:
30
35
31
36
| Column | Description |
32
37
|------------------|-------------------------|
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 |
35
40
| Data_Source | Information about the data source |
36
41
| Target_Table | The name of the target table |
37
42
| 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:
44
49
| Start_Time | The time when the task is started |
45
50
| End_Time | The time when the task is ended |
46
51
| 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 |
48
53
| Cur_Step | The specific sequential processing step of this job |
49
54
| Cur_Step_Processed_Size | The amount of data that has been processed within the current step |
50
55
| Cur_Step_Total_Size | The total size of the data to be processed in the current step |
51
56
| Cur_Step_Progress_Pct | The estimated completion percentage of the current step |
52
57
| Cur_Step_Speed | The current data processing speed |
53
58
| Cur_Step_ETA | The estimated time remaining for the current step to complete |
54
59
55
-
## Filtering import jobs
60
+
## Filter import jobs
56
61
57
62
Only `SHOW IMPORT JOBS` supports filtering import jobs with a `WHERE` or `LIKE` clause. `SHOW IMPORT JOB <job-id>` does not support these clauses.
0 commit comments