java - Read multiple csv file with CsvJdbc -


i need bind group of csv file in format "yyyy-mm-dd hh:mm:ss.csv" present in same folder unique table contains data present in files.

i need read data java ee application create connection pool inside application server. found csvjdbc driver allows reading of multiple files single entity. starting point this page in section paragraph:

to read several files (for example, daily log files) single table, set database connection property indexedfiles. following example demonstrates how this.

the example fine me problem not have header word in filename string. corresponding table becames empty string makes impossible query table.

how can tell driver map pattern table hasn't header part?

p.s. tried use hsqldb frontend csv files not support multiple files.

setup csvjdbc read several files described in http://csvjdbc.sourceforge.net/doc.html , use empty table name in sql query because csv filenames not have header before filetailpattern regular expression. example:

    props.put("filetailpattern", "(\\d+)-(\\d+)-(\\d+) (\\d+):(\\d+):(\\d+)");      props.put("filetailparts", "year,month,day,hour,minutes,seconds");      ...      resultset results = stmt.executequery("select * \"\" t1"); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -