I am having an issue where the mysqlimport command is only reading in every other records of my CSV file ... I know what the real problem is but I cant figure out how to solve it.
mysqlimport is reading past the end of the line for each record and reading into the next line ... it then throws a warning because it exceeded the field length for the last field on the previous line. So the last field is getting what it should be, as well as the first few fields of the next record ... once its field mySQL throws a warning and then moves on to the next line.
the command line that I Am using is:
mysqlimport -u foobar database "g:/path/path/filename" --fields-terminated-by="," --fields-optionally-enclosed-by=""" --lines-terminated-by="\n" --local --verbose --replace
This used to work but I added some fields to the data and it has since stopped working properly ... the mysql table matches the fields in the CSV.
Any ideas on how to fix this? Its coming from a CSV that is pulled out of JDEdwards and placed on my file server every night from the AS400 here so it can be used in a web database (ODBC to the 400 is painfully slow).
Thanks in advance,
Matt Laski
Sysadmin, Pulsafeeder Inc.
mysqlimport is reading past the end of the line for each record and reading into the next line ... it then throws a warning because it exceeded the field length for the last field on the previous line. So the last field is getting what it should be, as well as the first few fields of the next record ... once its field mySQL throws a warning and then moves on to the next line.
the command line that I Am using is:
mysqlimport -u foobar database "g:/path/path/filename" --fields-terminated-by="," --fields-optionally-enclosed-by=""" --lines-terminated-by="\n" --local --verbose --replace
This used to work but I added some fields to the data and it has since stopped working properly ... the mysql table matches the fields in the CSV.
Any ideas on how to fix this? Its coming from a CSV that is pulled out of JDEdwards and placed on my file server every night from the AS400 here so it can be used in a web database (ODBC to the 400 is painfully slow).
Thanks in advance,
Matt Laski
Sysadmin, Pulsafeeder Inc.