Skip to content

Commit

Permalink
Improve migration from from CSV files (#19247)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilin90 authored Oct 30, 2024
1 parent 6ede09d commit 4d8fc88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions migrate-from-csv-files-to-tidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Put all the CSV files in the same directory. If you need TiDB Lightning to recog
- If a CSV file contains the data for an entire table, name the file `${db_name}.${table_name}.csv`.
- If the data of one table is separated into multiple CSV files, append a numeric suffix to these CSV files. For example, `${db_name}.${table_name}.003.csv`. The numeric suffixes can be inconsecutive but must be in ascending order. You also need to add extra zeros before the number to ensure all the suffixes are in the same length.

TiDB Lightning recursively searches for all `.csv` files in this directory and its subdirectories.

## Step 2. Create the target table schema

Because CSV files do not contain schema information, before importing data from CSV files into TiDB, you need to create the target table schema. You can create the target table schema by either of the following two methods:
Expand Down

0 comments on commit 4d8fc88

Please sign in to comment.