Menu

Home

HuDeanY

Java DB CSV Export

This project ia also available at GitHub: https://github.com/hudeany/dbcsvexport

The needed drivers are not included in the jar-file or the project.
Those can be downloaded at following locations:
MySQL (mysql-connector-java-5.1.xx-bin.jar): https://dev.mysql.com/downloads/connector/j/
Oracle (ojdbc6.jar): http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html
(Oracle download needs registration)
PostgreSQL: https://jdbc.postgresql.org/download.html
Firebird: http://www.firebirdsql.org/en/jdbc-driver (make sure to use the "...full...".jar, because of this drivers J2EE dependencies)
Apache Derby: https://db.apache.org/derby/derby_downloads.html
SQLite: https://bitbucket.org/xerial/sqlite-jdbc/downloads
HSQL: http://hsqldb.org/download

When using the DbCsvExport.jar for the first export, the console version asks for the driver location and stores it in %HOME%/.DbCsvExport.config file for later uses.
In GUI mode the file %HOME%/.DbCsvExport.config is also created, but contains no data and must be edited manually once.

Export parameters allow to export a single SQL-select statement or a list (separated by blanks, comma or semicolon) of tables with wildcards '*' and/or '?' and the '!'-operator to ignore some tables also with wildcards '*' and/or '?'.
For example: mytables_*_tbl,!mytables_not_this_tbl

One file per select or table is created. Tables are sorted by their primary key if available. Any SQL-select statement is allowed, so also "SELECT CURRENT_TIMESTAMP FROM DUAL".
By optional parameter log files for each exported csv file are available, which include information about the export parameters like separator or exact statement.

If DB is only available via SSH-tunnel any local port may be used for db connection.

Export progress is shown in GUI and console mode (use parameter -v for verbose output).

The exported encoding may be adjusted and also the language format for numeric and date values.

Output to console is also available and also in a short mode, so you may see only the columnname and value as a result in console.

DB user password may be entered in console mode as a parameter or is asked interactively in console, so it doesn't appear in bash history.

Console parameter -update checks the local version with latest available version on sourceforge.net and asks for download and installation. Same does the "Check Update" button in GUI.

GUI mode can store a bunch of preferences sets for repeated exports in a convenient way.

Help page:
[help_page]

Project Members:


Related

Wiki: help_page

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.