CSVReader Java (WIP)
- This CSVReader was created in java.
- This program will convert the CSV file into MySQL database
- The program using JDBC without using the CSV to MySQL java library
- The program need some common library for input output
There are more upcoming feature in classDB
https://github.com/SnowBases/CSVReader/blob/master/C2ImportFamRelSample.csv
Dataset must be identical to this
| Header | Header | Header | Header | Header |
| Value | Value | Value | Value | Value |
| Value | Value | Value | Value | Value |
| Value | Value | Value | Value | Value |
| Value | Value | Value | Value | Value |
...
ClassDB mysql = new ClassDB("mysql");
mysql.createDB("CSVReader");
ClassDB db = new ClassDB("CSVReader");
Please note : paramTableSQL(readCSVContent(0) means the first column of CSV file will be the HEADER
db.createTables("TableName", paramTableSQL(readCSVContent(0) ) );
for(int n=1; n < getCSVLines() ; n++) db.insertRecords("CSVReader", paramRecordSQL(readCSVContent(n) , n));
Eclipse EE IDE 2018-9
- commons-io-2.6.jar
- mysql-connector-java-8.0.13
Please ensure lower_case_table_names = 2 is set in my.ini