Execute SQL on CSV files via JDBC

前端 未结 7 1730
后悔当初
后悔当初 2020-12-28 19:46

I need to apply an SQL query to CSV files (comma-separated text files). My SQL is predefined from another tool, and is not eligible to change. It may contain embedded select

7条回答
  •  死守一世寂寞
    2020-12-28 20:11

    I know, it's a very old case, but...

    CsvJdbc is a cool library, but there are some issues using DbUtils while mapping ResultsSets to PoJos. A second bad thing is, that dosn't have a good support for different Datatypes.

    After playing with CSVJdbc I will use a stupid CsvParser to read the Files an pump them into a HsqlDB or something like that.

提交回复
热议问题