-
Couldn't load subscription status.
- Fork 4
Home
- Export any results of any select statement
- Use a list of tablenames with wildcards (?,*) to export a bunch of tables
- Optional export in CSV, JSON, XML or SQL(Insert) format
- GUI and console mode
- Use any export encoding
- Use your own csv separator
- Use your own csv string quote
- Individual indentation for JSON and XML
- Option to create files for Blobs and Clobs instead of inline BASE64 code
- Optional zipping output
- Optional structure information exported
- Automatic update of application on user request
- GUI internationalisation(i18n) for english and german
- Password secured preferences in GUI mode
Java tool to export db data into csv, json, xml or sql files. Oracle DB, MySQL DB, PostgreSQL DB, Firebird DB, SQLite DB, Derby DB and HSQL DB are supported. Includes and uses JavaUtilities library (see wiki, https://github.com/hudeany/java-utilities-no-dependencies). This tool does NOT include the needed db drivers, but they only have to be downloaded and configured once.
See also DbCsvImport project: https://github.com/hudeany/dbcsvimport
This project is also available at Sourceforge: https://sourceforge.net/projects/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. The driver location can be selected in GUI.
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 github.com 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.