This project is a template to help import large CSV files into Oracle databases. Table e column names must be adjusted to fit specific needs. The solution relies on threads and batch inserts to achieve the task in reasonable time. Tests (in a Mac mini with a 2,8GHz Intel Core i5 and SSD) could parse and save a 700k line long file in 1 minute and 33 seconds.
The project adopts Apache Maven as build/dependencies manager.
The dependency of ojdbc (Oracle JDBC-compliant driver) was added to pom.xml. However, it is not available on public repositories. So, install it in your local Maven repository (~/.m2/repository). This post shows how to do it.
To generate the .jar file, use one of the following commands.
# mvn clean package
or
# mvn clean install
The second command will place a copy of the .jar file in your local Maven repository.
The .jar file name will be importador--jar-with-dependencies.jar
java -jar importador-<version>-jar-with-dependencies.jar <parameters>