Skip to content

cloud: clarify IMPORT INTO wildcard path matching - #23488

Draft
alastori wants to merge 1 commit into
pingcap:release-8.5from
alastori:fix/import-into-wildcard-paths
Draft

cloud: clarify IMPORT INTO wildcard path matching#23488
alastori wants to merge 1 commit into
pingcap:release-8.5from
alastori:fix/import-into-wildcard-paths

Conversation

@alastori

@alastori alastori commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

What is changed, added or deleted? (Required)

This PR corrects the TiDB Cloud guidance for wildcard paths in IMPORT INTO:

  • Clarifies that wildcards can appear in multiple fixed-depth path components.
  • Explains that a wildcard matches only within one /-separated component and does not provide arbitrary-depth recursive matching.
  • Adds s3://<bucket-name>/dir/subdir*/*.csv as a fixed-depth S3 example.
  • Preserves the existing TiDB Self-Managed v8.5 restriction through platform-specific content in the shared SQL reference.

The previous Cloud wording incorrectly limited wildcards to file names. TiDB now supports component-aware patterns such as dir/subdir*/*.csv, while still requiring each wildcard to remain within one path component.

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

  • master (the latest development version)
  • v8.5 (the branch used by the current TiDB Cloud documentation)
  • v8.4
  • v8.3
  • v8.2
  • v8.1
  • v7.5
  • v7.1
  • v6.5

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

Validation

  • ./scripts/markdownlint sql-statements/sql-statement-import-into.md
  • python3 scripts/file-format-lint.py sql-statements/sql-statement-import-into.md
  • python3 scripts/check-manual-line-breaks.py sql-statements/sql-statement-import-into.md
  • Verified the platform filters retain the new wording and example for TiDB Cloud while preserving the existing TiDB Self-Managed v8.5 text.
  • Ran go test -tags=intest,deadlock ./pkg/importsdk -run 'Test(ValidatePattern|GenerateWildcardPath)$' -count=1 in the TiDB repository. The tests verify that the import SDK accepts and generates dir/subdir*/*.csv.
  • Ran a direct IMPORT INTO smoke test against a local TiDB cluster and an S3-compatible MinIO endpoint using s3://import-smoke/fixture/dir/subdir*/*.csv. The job finished with four imported rows from two matching directories. Decoy objects in a different directory, one level deeper, with a non-CSV extension, and without the final file component were all excluded.

The direct SQL smoke test validates S3 path matching in the TiDB engine. It does not claim an end-to-end test against a live TiDB Cloud cluster or the Aurora/RDS Parquet workflow.

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

@ti-chi-bot

ti-chi-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5d402bf9-9060-4d4e-8a53-66e25f7ce1af

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot

ti-chi-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

[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 assign jackysp for approval. 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

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 10, 2026
@alastori

Copy link
Copy Markdown
Collaborator Author

@GMHDBJD PTAL

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. missing-translation-status This PR does not have translation status info. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant