I am a using MySQL locally to my Mac. I have a CSV file all fields enclosed in double quotes. Here is an extract of the first rows of my CSV file:
$ head -5 companies.csv
"COMPANY_ADDRESS1","COMPANY_ADDRESS2","COMPANY_CITY","COMPANY_COUNTRY","COMPANY_FAX","COMPANY_GERMANY","COMPANY_ID","COMPANY_INDIANAPOLIS","COMPANY_NAME","COMPANY_STATE","COMPANY_TELEPHONE","COMPANY_VAT","COMPANY_ZIP"
"980 Madison Avenue","6th Floor","New York","USA","","","1393","","Lucky Fives LLC","NY","212-74-2313","","10075"
"1209 Orange Street","","Wilmington","USA","","","1394","","Global Five Holdings","DE","-","","19801"
"2020 Ponce de Leon Boulevard","PH2","Coral Gables","USA","","1015110","1395","","Lion Aero Corporation","FL","305-755-5120","","33134"
"100 NE Adams Street","","Peoria","USA","","","1396","","Caterpillar Inc.","IL","+13096755975","","61630"
And here is my import command:
$ mysqlimport --local --ignore-lines=1 my_db companies.csv -u root --fields-enclosed-by='\"' --lines-terminated-by='\r\n' --fields-terminated-by=','
I am getting all records imported, nothing is skipped:
companies: Records: 3063 Deleted: 0 Skipped: 0 Warnings: 104
However, why I am getting all data imported in the first column and all other columns are populated with NULL?
The table was previously created with all columns necessary to support the data to be loaded.