I was trying to import the contents from CSV file to a MySQL table while using MySQL workbench. Interestingly, it just won't import all the rows which were in the CSV file.
Things I tried -
1. Try keeping only 3 columns and then try importing -- all rows successfully got imported
2. Removed few columns which were having dashes as values and not null. Removing those and then trying importing the csv again led to import of lesser no. of rows.
3. Searching for any problematic values in the columns which could be making MySQL to skip the rows.
- When I replaced double quote with an inverted comma, no. of imported rows increased. That's a sign of relief.
- Further replacing inverted comma with a blank, I could import all rows, hence we should focus on handling the double quotes to be able to import the rows smoothly.
Recently I rediscovered PostgresSQL after lamenting to use it for a decade and what an amazing RDBMS it is. It doesn't suffer of CSV related hiccups which are prevalent in MySQL (MySQL Workbench). Explore PostgresSQL more by watching a series of tutorials here.
Add new comment