Bulk Loading CSV Files Into MySQL Database?

Associate
Joined
22 Dec 2009
Posts
1,286
Location
Upper Skurt
Hi,

Is there a way to bulk load a list of csv files into a MySQL database where a new table is created from the import of the 1st file and then all the remaining csv files are appended to this table.

The files are named:

2011-01-07.csv
2011-01-14.csv
2011-01-21.csv
2011-01-28.csv.....

up to the end of 2011, ie, 52 files.

The files are quite large, each csv file is approx 275mb.

I can create a macro in microsoft access to do it but the problem is that an access database mdb file cannot exceed 2gb and this is exceeded quite quickly. I know that MySQL will not have the same file size constraint but I am not familiar with how to bulk load or create a macro in MySQL to do the job.



Binty
 
Thx for the replies.

Each csv file is has the " symbol as a text qualifier in the appropriate places and the fields are text, number and dates. There are no real issues with the data files so any bulk load process would be OK as I check after the import and do some cleansing anyway.

I will check out the link for the MySQL bulk load.


Thx
 
Back
Top Bottom