Re: Unable to load CSV
Load Data is finicky, to put it mildly. Best approach I know is to leave nothing to chance, leave no ambiguities, Debugging Load Data gets more tiresome as the column count grows. With your code ...
- null for Load Data is \N, not \\N
- optionally enclosed by... causes misreads
- lines terminated by ... seems to be necessary
Quoting char values in an input file with just your first line of data ...
... and this cmd ...
LOAD DATA INFILE 'c:/in/in.csv'
INTO TABLE QUESTIONNAIRESUBMISSION_FACT_MIGRATION
FIELDS TERMINATED BY ','
lines terminated by '\n'
IGNORE 1 LINES
.. gets rid of your error but elicits "Row 1 was truncated; it contained more data than there were input columns", which indicates that MySQL is still misreading something in that row. The only way I know to debug that is to make a series of test tables and matching input files till you identify problem input values.
Note too that IGNORE can't work without a primary key.