Skip to content

Commit

Permalink
v8.1.1 lightning: add description about terminator for strict-format …
Browse files Browse the repository at this point in the history
…CSV files (#17786) (#18555)
  • Loading branch information
ti-chi-bot authored Aug 27, 2024
1 parent 11d634d commit 9847437
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions migrate-from-csv-files-to-tidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ data-source-dir = "${data-path}" # A local path or S3 path. For example, 's3://m
separator = ','
# Delimiter. Can be zero or multiple characters.
delimiter = '"'
# Line terminator. By default, \r, \n, and \r\n are all treated as line terminators.
# terminator = "\r\n"
# Configures whether the CSV file has a table header.
# If this item is set to true, TiDB Lightning uses the first line of the CSV file to parse the corresponding relationship of fields.
header = true
Expand Down Expand Up @@ -103,6 +105,8 @@ In a strict-format CSV file, each field only takes up one line. It must meet the
- The delimiter is empty.
- Each field does not contain CR (`\r`) or LF (`\n`).

You need to explicitly specify the line terminator `terminator` for a `strict-format` CSV file.

If your CSV file meets the above requirements, you can speed up the import by enabling the `strict-format` mode as follows:

```toml
Expand Down

0 comments on commit 9847437

Please sign in to comment.