Please answer these questions before submitting your issue. Thanks!
mysql> LOAD DATA LOCAL INFILE '2017Q1-capitalbikeshare-tripdata.csv' INTO TABLE trips
-> FIELDS TERMINATED BY ',' ENCLOSED BY '"'
-> LINES TERMINATED BY '\r\n'
-> IGNORE 1 LINES;
ERROR 1105 (HY000): line 4 column 7 near " 1 LINES" (total length 165)
Big data sets are often distributed as CSV, and in this case it had a header row which needs to be skipped.
mysql [localhost] {msandbox} (bikeshare) > LOAD DATA LOCAL INFILE '2017Q1-capitalbikeshare-tripdata.csv' INTO TABLE trips
-> FIELDS TERMINATED BY ',' ENCLOSED BY '"'
-> LINES TERMINATED BY '\r\n'
-> IGNORE 1 LINES;
Query OK, 646510 rows affected (4.56 sec)
Records: 646510 Deleted: 0 Skipped: 0 Warnings: 0
An error (the IGNORE 1 LINES syntax is not supported).
tidb-server -V or run select tidb_version(); on TiDB)?mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.0-beta-278-g1fa5669fb
Git Commit Hash: 1fa5669fb48ae0c6cf2d99413d62c7652f872c4e
Git Branch: master
UTC Build Time: 2018-08-23 07:38:51
GoVersion: go version go1.10.1 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.01 sec)
I am going to do it, if no one is doing it?
@mccxj Great! You could assign this issue to yourself.
Fixed in #7576
Most helpful comment
I am going to do it, if no one is doing it?