Mysql Workbench doesn't import all rows from CSV to table

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.

Category: 
Analytics

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Moments