Skip to content

Script in Java to load huge data from CSV file into MySQL database

Notifications You must be signed in to change notification settings

itmanlee/java-csv-to-mysql

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

java-csv-to-mysql

Motivation

Needed a way to load more than 500,000 rows in a single CSV file (huge filesize of 60mb) into MySQL database. Scripted in Java to read each line of CSV file and insert into MySQL database in batches of 100 to speed things up.

Libraries used

Usage:

Compile: javac App.java

Run (make sure to have the jdbc.jar file in the same directory): java -cp .;jdbc.jar App

About

Script in Java to load huge data from CSV file into MySQL database

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published