diff --git a/docs/data-operate/import/import-way/routine-load-manual.md b/docs/data-operate/import/import-way/routine-load-manual.md index 398101f8c3ebe..fb0a9964a184c 100644 --- a/docs/data-operate/import/import-way/routine-load-manual.md +++ b/docs/data-operate/import/import-way/routine-load-manual.md @@ -267,7 +267,7 @@ ReasonOfStateChanged: #### View the Load Subtasks -Use the [SHOW ROUTINE LOAD TASK](../../../sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK) command to view the import subtasks. This command describes the subtask information under the current job, such as the subtask status and the BE id to which the task is dispatched. +Use the [SHOW ROUTINE LOAD TASK](../../../sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK) command to view the import subtasks. You can specify the routine load job by `WHERE JobName = ` or `FOR [.]` (if `` is omitted, the current database is used). This command describes the subtask information under the current job, such as the subtask status and the BE id to which the task is dispatched. The following command shows the subtask information of `testdb.example_routine_load_csv`: @@ -284,6 +284,12 @@ mysql> SHOW ROUTINE LOAD TASK WHERE jobname = 'example_routine_load_csv'; +-----------------------------------+-------+-----------+-------+---------------------+---------------------+---------+-------+----------------------+ ``` +You can also use the following syntax: + +```sql +mysql> SHOW ROUTINE LOAD TASK FOR testdb.example_routine_load_csv; +``` + ### Pause an Import Job You can pause an import job with the [PAUSE ROUTINE LOAD](../../../sql-manual/sql-statements/data-modification/load-and-export/PAUSE-ROUTINE-LOAD) command. After being paused, the job enters the `PAUSED` state, but the job is not terminated. You can restart it with the `RESUME ROUTINE LOAD` command. diff --git a/docs/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md b/docs/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md index e6d407040cc37..c28d56078eee2 100644 --- a/docs/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md +++ b/docs/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md @@ -14,6 +14,8 @@ This syntax is used to view the currently running subtasks of a specified Routin ```sql SHOW ROUTINE LOAD TASK WHERE JobName = ; + +SHOW ROUTINE LOAD TASK FOR [.]; ``` ## Required Parameters @@ -22,6 +24,12 @@ SHOW ROUTINE LOAD TASK WHERE JobName = ; > The name of the routine load job to view. +## Optional Parameters + +**1. ``** + +> The database where the routine load job resides. If omitted, the routine load job is searched in the current database. + ## Return Results The return results include the following fields: @@ -58,4 +66,16 @@ Users executing this SQL command must have at least the following privileges: ```sql SHOW ROUTINE LOAD TASK WHERE JobName = "test1"; - ``` \ No newline at end of file + ``` + +- Show subtask information for the routine load job `test1` in the current database. + + ```sql + SHOW ROUTINE LOAD TASK FOR test1; + ``` + +- Show subtask information for the routine load job `test1` in the database `example_db`. + + ```sql + SHOW ROUTINE LOAD TASK FOR example_db.test1; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md index e7583021bab92..7f721191d3dc6 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md @@ -267,7 +267,7 @@ ReasonOfStateChanged: #### 查看导入子任务 -通过 [SHOW ROUTINE LOAD TASK](../../../sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK) 命令查看导入子任务情况。该命令描述了当前作业下的子任务信息,如子任务状态、下发的 BE id 等。 +通过 [SHOW ROUTINE LOAD TASK](../../../sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK) 命令查看导入子任务情况。可以通过 `WHERE JobName = ` 或 `FOR [.]` 指定例行导入作业(`` 省略时使用当前数据库)。该命令描述了当前作业下的子任务信息,如子任务状态、下发的 BE id 等。 通过以下命令可以查看 `testdb.example_routine_load_csv` 的子任务情况: @@ -284,6 +284,12 @@ mysql> SHOW ROUTINE LOAD TASK WHERE jobname = 'example_routine_load_csv'; +-----------------------------------+-------+-----------+-------+---------------------+---------------------+---------+-------+----------------------+ ``` +也可以使用以下语法: + +```sql +mysql> SHOW ROUTINE LOAD TASK FOR testdb.example_routine_load_csv; +``` + ### 暂停导入作业 可以通过 [PAUSE ROUTINE LOAD](../../../sql-manual/sql-statements/data-modification/load-and-export/PAUSE-ROUTINE-LOAD) 命令暂停导入作业。暂停后作业进入 `PAUSED` 状态,但导入作业并未终止,可以通过 `RESUME ROUTINE LOAD` 命令重启导入作业。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md index 32918c1806b67..b3357e4bdc9d3 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/load-and-export/SHOW-ROUTINE-LOAD-TASK.md @@ -14,6 +14,8 @@ ```sql SHOW ROUTINE LOAD TASK WHERE JobName = ; + +SHOW ROUTINE LOAD TASK FOR [.]; ``` ## 必选参数 @@ -22,6 +24,12 @@ SHOW ROUTINE LOAD TASK WHERE JobName = ; > 要查看的例行导入作业名称。 +## 可选参数 + +**1. ``** + +> 例行导入作业所在的数据库。若省略,则在当前数据库下搜索该例行导入作业。 + ## 返回结果 返回结果包含以下字段: @@ -59,3 +67,15 @@ SHOW ROUTINE LOAD TASK WHERE JobName = ; ```sql SHOW ROUTINE LOAD TASK WHERE JobName = "test1"; ``` + +- 展示当前数据库下名为 test1 的例行导入作业的子任务信息。 + + ```sql + SHOW ROUTINE LOAD TASK FOR test1; + ``` + +- 展示数据库 example_db 下名为 test1 的例行导入作业的子任务信息。 + + ```sql + SHOW ROUTINE LOAD TASK FOR example_db.test1; + ``` diff --git a/ja-source/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md b/ja-source/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md index 4237e9d925a9d..e61220af4f146 100644 --- a/ja-source/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md +++ b/ja-source/docusaurus-plugin-content-docs/current/data-operate/import/import-way/routine-load-manual.md @@ -235,6 +235,12 @@ mysql> SHOW ROUTINE LOAD TASK WHERE jobname = 'example_routine_load_csv'; | 77112dfea5e54b0a-a10eab3d5b19e565 | 197 | PREPARE | 12177 | 2024-01-15 12:21:02 | 2024-01-15 12:21:02 | 20 | 12098 | {"0":3000,"5":2622} | +-----------------------------------+-------+-----------+-------+---------------------+---------------------+---------+-------+----------------------+ ``` + +以下の構文も使用できます: + +```sql +mysql> SHOW ROUTINE LOAD TASK FOR testdb.example_routine_load_csv; +``` ### Import Jobの一時停止 [PAUSE ROUTINE LOAD](../../../sql-manual/sql-statements/data-modification/load-and-export/PAUSE-ROUTINE-LOAD)コマンドを使用してimport jobを一時停止できます。import jobを一時停止すると、PAUSED状態になりますが、import jobは終了せず、RESUME ROUTINE LOADコマンドを使用して再開できます。