Note that there are some explanatory texts on larger screens.

plurals
  1. POJava Desktop Application to Upload CSV Files to Database
    primarykey
    data
    text
    <p>I'm working on desktop application (Extract Transform Load type of app) that requires uploading of large CSV files (about 6 GB) to a database using Java as front end and Oracle as a backend but I'm open to other databases and tools as well (i.e. SQLite, H2, HSQLDB, MySQL).</p> <p>I tried using OpenSource Java libraries for parsing and uploading CSV files such as:</p> <ol> <li><a href="http://opencsv.sourceforge.net/" rel="nofollow">OpenCSV</a> </li> <li><a href="http://supercsv.sourceforge.net/" rel="nofollow">Super CSV</a></li> </ol> <p>The problem with these libraries is efficiency. They require too much time for uploading. For example, It'll take 6 hours to upload 4 Gb of CSV file.</p> <p>Having this experience, I decided to try database utilities for uploading CSV files. One of them is Oracle SQL*Loader. It's faster and offers desirable result. It can remove whitespaces, load CSV files to various tables, use oracle functions suchs as decode, etc. </p> <p>However, I have the following problems:</p> <ol> <li><p>I couldn't find a way to get SQL*Loader's errors/logs in Java and display them to the user.</p></li> <li><p>Since, SQL*Loader is proprietary, there's no way to embed it to my application installation. For example, the user needs to download and install Oracle Client separately before installing my application. Another thing is I need to check if Oracle Client is installed before installation process begins.</p></li> </ol> <p>I looked for other probable solutions and found headless databases like SQLite and H2.</p> <p>On SQLite, I use the .import command to upload CSV files. But there's no way I could call it in Java.</p> <p>I turn to H2 database but I have hard time uploading since it does not support escaping the header row.</p> <p>Please let me know your suggestions.</p> <p>Thanks you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload