I am attempting to import a csv file into a MySQL table using the Table Data Import Wizard. The sample section at the bottom of the Configure Import Settings screen looks fine and when I run the import, it says all of my entries were loaded successfully. However, when I go to view the contents of the table, only the columns are there and none of my actual data loaded. Does anyone know why this might be happening and how to correct it?
EDIT:
These are a few lines from my CSV file:
STATION,STATION_NAME,ELEVATION,LATITUDE,LONGITUDE,DATE,MLY-TAVG-NORMAL,MLY-TMAX-NORMAL,MLY-TMIN-NORMAL,Average Temp,Max Temp,Min Temp GHCND:USW00094085,PIERRE 24 S SD US,647.4,44.0194,-100.353,201001,218,322,113,21.8,32.2,11.3 GHCND:USW00094085,PIERRE 24 S SD US,647.4,44.0194,-100.353,201002,246,354,137,24.6,35.4,13.7 GHCND:USW00094085,PIERRE 24 S SD US,647.4,44.0194,-100.353,201003,339,451,226,33.9,45.1,22.6 GHCND:USW00094085,PIERRE 24 S SD US,647.4,44.0194,-100.353,201004,463,588,337,46.3,58.8,33.7 GHCND:USW00094085,PIERRE 24 S SD US,647.4,44.0194,-100.353,201005,573,696,450,57.3,69.6,45
Here are some images of the import process:
And here is what I see when I attempt to view the newly created table:
Second Edit:
Here is an image of my settings:
And here is an image of my CSV file showing line endings:
Importing CSV file using MySQL Workbench The following are steps that you want to import data into a table: Open table to which the data is loaded. Review the data, click Apply button. MySQL workbench will display a dialog “Apply SQL Script to Database”, click Apply button to insert data into the table.
The Data Import Wizard makes it easy to import data for many standard Salesforce objects, including accounts, contacts, leads, solutions, campaign members, and person accounts. You can also import data for custom objects. You can import up to 50,000 records at a time.
Verify the encoding of your file. When parsing a source file as UTF-8, the workbench silently bombs out when it encounters non UTF-8 characters. I used cp1250 (windows 1250) for a file exported from Excel and everything worked properly.
You need to ensure that your csv options are set correctly when importing the table.
When you get to the below screen notice how red arrow points to the wrench. By clicking that an option drop down to set your line separator, enclosing strings, and field separator will appear. If these are not set right then the data will load unsuccessfully.
Below is a sample CSV file. Notice how in Notepad++ the wrapper button is pressed so you can see the end of line. In this case the end of line is CR LF. The default option for Workbench Import wizard is just LF. Additionally, default field separator appears to be a ;
and not a ,
.
You can read more here at dev.mysql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With