MySQL Forums
Forum List  »  Newbie

LOAD DATA LOCAL INFILE Error report meaning?
Posted by: Duane Mitchell
Date: October 21, 2017 10:20AM

I'm loading data in MySQL from a csv file. It seems to be working, all the rows are imported, but I'm getting warnings that I don't understand and I don't know how to track down. Here's the statement:

###############################

LOAD DATA LOCAL INFILE '/pathtofile/Anesthesiology.csv' INTO TABLE hpp.doctors CHARACTER SET utf8 FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r' SET `creation_date` = NOW();

12897 row(s) affected, 64 warning(s):

1366 Incorrect integer value: 'id_doctors' for column 'id_doctors' at row 1 1265 Data truncated for column 'creation_date' at row 1 1265 Data truncated for column 'modification_date' at row 1 1262 Row 1 was truncated; it contained more data than there were input columns

1366 Incorrect integer value: '' for column 'id_doctors' at row 2 1265 Data truncated for column 'creation_date' at row 2 1265 Data truncated for column 'modification_date' at row 2 1262 Row 2 was truncated; it contained more data than there were input columns

###############################

These errors repeat for a number of rows. Same error for each row.

I'm a newbie so would like some comments, suggestions, and/or advice on this.

So I load the csv file. The column `id_doctors` is the PK and is autoincremented. So it seems I can ignore that error as it's working as expected.

The `creation_date` column is SET to NOW() on the import and that seems to be working as expected. I'm hoping I can ignore that error also.

The `modification_date` column is TIMESTAMP, has a default value of 0000-00-00 00:00:00, not null, and is time stamped on update. That comes in as the set default value.

It doesn't seem to me that I should be concerned about these errors and perhaps they are being generated before the values for the 3 columns are generated?

Thank you.

Options: ReplyQuote


Subject
Written By
Posted
LOAD DATA LOCAL INFILE Error report meaning?
October 21, 2017 10:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.