Export is a special feature of VoltDB that lets VoltDB export data continuously to an external target, such as CSV files or another database. What data is exported is defined by the export-only tables in the database schema. Whether export occurs or not is a runtime decision. The VoltDB Enterprise Manager has a separate panel for enabling and configuring export, which is described in this section. For an overview of the export process and when and why to use export, see the chapter on "Exporting Live Data" in the Using VoltDB manual.
Click on Edit in the export panel to bring up the export configuration dialog box. The first choice you have is whether to enable export or not. By default, export is not enabled. If you click on the checkbox to enable export, you then have three choices for how to process the export:
Export to files
Export to another database through JDBC
Export data through a remote export client
What additional options you can set depends on which export target you choose, as described in the following sections.
When exporting to files, the Enterprise Manager lets you configure all of the file export options in the export dialog box. Although default options are provided, two fields you should consider adjusting are:
Output directory — By default, exported files are stored in the sever process working directory (a subfolder of the destination directory specified in the Edit Database dialog). You may want to use a different output directory. For example, if you use scripts to periodically copy and archive exported data from multiple databases, using a common output directory can simplify the process.
Unique name (file prefix) — Although a default prefix is provided, it is the same prefix for all databases. Using a prefix, such as the database name, that identifies the source of the data can help keep your export files organized.
When exporting to a database through JDBC, the Enterprise Manager lets you configure the JDBC connection in the export dialog box. A number of fields are optional or only needed in certain cases. However, it is important that these fields are filled out appropriately for the database you intend to access:
Connection URL — You must provide the appropriate JDBC connection string for the target database. The connection string is a URL that identifies the database driver and the location of the remote database.
Driver Class Name — You do not need to specify the driver class name when using common database drivers, such as MySQL, Netezza, Oracle, PostgreSQL, and Vertica. However, you must specify the class name when accessing databases from other vendors or when using non-standard drivers.
Extensions currently loaded — To use the specified driver, VoltDB must be
able to access the JAR files associated with that driver. VoltDB does not provide the JDBC drivers for other
databases. However, it does include a special directory,
/lib/extension under the VoltDB
installation root, where you can place JARs that are needed at runtime.
This field of the dialog box lists all of the JARs currently in the extensions directory. You cannot change the contents from the dialog box, but you must make sure the JARs needed by the driver are included. If not:
Stop the Enterprise Manager.
Copy the necessary JAR files into the
Restart the Enterprise Manager.
When exporting data to Hadoop, you must run the export client remotely. Choose "Use a Remote Export Client" as the target and configure the export client using the command line on the remote system. See the "Export to Hadoop" section of Using VoltDB for details.