Skip to content

IMPORT INTO: update document for SHOW IMPORT#21610

Open
joechenrh wants to merge 8 commits into
pingcap:masterfrom
joechenrh:show-import
Open

IMPORT INTO: update document for SHOW IMPORT#21610
joechenrh wants to merge 8 commits into
pingcap:masterfrom
joechenrh:show-import

Conversation

@joechenrh
Copy link
Copy Markdown
Contributor

@joechenrh joechenrh commented Aug 15, 2025

First-time contributors' checklist

What is changed, added or deleted? (Required)

Add document for SHOW IMPORT GROUP and SHOW IMPORT JOB(s).

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

Only on master

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

What is the related PR or file link(s)?

code PRs: pingcap/tidb#62369

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Signed-off-by: Ruihao Chen <ruihao.chen@pingcap.cn>
@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 15, 2025
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @joechenrh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the documentation for TiDB's IMPORT INTO feature. It introduces comprehensive documentation for the new SHOW IMPORT GROUP statement, which allows users to monitor the progress of grouped import jobs. Additionally, it updates existing documentation for IMPORT INTO to include a GROUP_KEY option and enriches the SHOW IMPORT JOB documentation with more detailed progress metrics.

Highlights

  • Introduced SHOW IMPORT GROUP Documentation: A new dedicated markdown file (sql-statements/sql-statement-show-import-group.md) has been added to detail the syntax, usage, required privileges, and output fields for the SHOW IMPORT GROUP and SHOW IMPORT GROUPS statements.
  • Enhanced IMPORT INTO Statement: The IMPORT INTO statement documentation (sql-statements/sql-statement-import-into.md) now includes a new GROUP_KEY option, enabling users to associate import jobs with specific groups.
  • Improved SHOW IMPORT JOB Details: The SHOW IMPORT JOB documentation (sql-statements/sql-statement-show-import-job.md) has been updated to provide more granular progress information, including Last_Update_Time, Cur_Step, Cur_Step_Processed_Size, Cur_Step_Total_Size, Cur_Step_Progress_Pct, Cur_Step_Speed, and Cur_Step_ETA.
  • Table of Contents and Privilege Updates: The TOC.md and privilege-management.md files have been updated to reflect the inclusion of the new SHOW IMPORT GROUP statement and its associated privilege requirements.
  • Cross-referencing: Relevant "See also" sections in sql-statements/sql-statement-cancel-import-job.md and the sql-statements/sql-statement-overview.md have been updated to link to the new SHOW IMPORT GROUP documentation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces documentation for the new SHOW IMPORT GROUP statement and updates related files. The changes are generally well-executed, adding a new feature to the documentation. My review focuses on improving clarity, consistency, and correctness. I've identified a few issues, including an incorrect link, some misleading descriptions, and formatting errors in code examples that should be addressed to enhance the quality of the documentation.

Comment thread sql-statements/sql-statement-show-import-job.md Outdated
Comment thread sql-statements/sql-statement-show-import-job.md Outdated
Comment on lines +71 to +75
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+
| Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By | Last_Update_Time | Cur_Step | Cur_Step_Processed_Size | Cur_Step_Total_Size | Cur_Step_Progress_Pct | Cur_Step_Speed | Cur_Step_ETA |
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+
| 2 | /path/to/file.csv | `test`.`bar` | 118 | global-sorting | running | 277.5GiB | 0 | | 2025-07-09 10:40:18.580706 | 2025-07-09 10:40:19.092528 | NULL | root@% | 2025-07-09 10:47:15 | encode | 4.55GB | 298GB | 1 | 10.96MB/s | 07:26:03 | +--------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------+----------------+---------+------------------+---------------+----------------+----------------------------+----------------------------+----------+------------+---------------------+----------+-------------------------+---------------------+-----------
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the previous example, the output for SHOW IMPORT JOB 2 is corrupted with extra characters, which makes it hard to read. This should be cleaned up.1

Suggested change
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+
| Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By | Last_Update_Time | Cur_Step | Cur_Step_Processed_Size | Cur_Step_Total_Size | Cur_Step_Progress_Pct | Cur_Step_Speed | Cur_Step_ETA |
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+
| 2 | /path/to/file.csv | `test`.`bar` | 118 | global-sorting | running | 277.5GiB | 0 | | 2025-07-09 10:40:18.580706 | 2025-07-09 10:40:19.092528 | NULL | root@% | 2025-07-09 10:47:15 | encode | 4.55GB | 298GB | 1 | 10.96MB/s | 07:26:03 | +--------+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------+----------+----------------+---------+------------------+---------------+----------------+----------------------------+----------------------------+----------+------------+---------------------+----------+-------------------------+---------------------+-----------
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+--------------+-------------------------+---------------------+-----------------------+----------------+--------------+
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+----------+-------------------------+---------------------+-----------------------+----------------+------------+
| Job_ID | Data_Source | Target_Table | Table_ID | Phase | Status | Source_File_Size | Imported_Rows | Result_Message | Create_Time | Start_Time | End_Time | Created_By | Last_Update_Time | Cur_Step | Cur_Step_Processed_Size | Cur_Step_Total_Size | Cur_Step_Progress_Pct | Cur_Step_Speed | Cur_Step_ETA |
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+----------+-------------------------+---------------------+-----------------------+----------------+------------+
| 2 | /path/to/file.csv | `test`.`bar` | 118 | global-sorting | running | 277.5GiB | 0 | | 2025-07-09 10:40:18.580706 | 2025-07-09 10:40:19.092528 | NULL | root@% | 2025-07-09 10:47:15 | encode | 4.55GB | 298GB | 1 | 10.96MB/s | 07:26:03 |
+--------+-------------------+--------------+----------+----------------+----------+------------------+---------------+----------------+----------------------------+----------------------------+----------------------------+------------+---------------------+----------+-------------------------+---------------------+-----------------------+----------------+------------+

Style Guide References

Footnotes

  1. Documentation should be readable.

Comment thread sql-statements/sql-statement-import-into.md Outdated
Comment thread sql-statements/sql-statement-show-import-group.md Outdated
Comment thread sql-statements/sql-statement-show-import-group.md Outdated
Comment thread sql-statements/sql-statement-show-import-group.md Outdated
Comment thread sql-statements/sql-statement-show-import-group.md
@qiancai qiancai added v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. translation/doing This PR's assignee is translating this PR. labels Sep 4, 2025
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Sep 4, 2025
@qiancai qiancai added missing-translation-status This PR does not have translation status info. for-release This PR relates to a TiDB release but does not have a tracked feature. and removed missing-translation-status This PR does not have translation status info. labels Sep 4, 2025
@qiancai qiancai self-assigned this Sep 25, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented May 22, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiancai. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

```ebnf+diagram
ShowImportJobsStmt ::=
'SHOW' 'IMPORT' 'JOBS'
'SHOW' RawOpt? 'IMPORT' 'JOBS' ShowLikeOrWhereOpt?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since RAW is not implemented yet, maybe update this later

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, I see, only the parser part was added 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for-release This PR relates to a TiDB release but does not have a tracked feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/doing This PR's assignee is translating this PR. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants