15.4. Configuring Export in the Configuration File

Documentation

VoltDB Home » Documentation » Using VoltDB

15.4. Configuring Export in the Configuration File

To enable export at runtime, you include the <export> and <configuration> tags in the configuration file when you initialize the database root directory. Alternately, you can add or modify the export configuration while the database is running using the voltadmin update command or interactively with the web-based VoltDB Management Center. In the configuration file, the export tags specify the target you are configuring and which export connector to use (with the type attribute). For example:

<export>
   <configuration enabled="true" target="log" type="file">
     . . .
   </configuration>
</export>

To export to multiple destinations, you include multiple <configuration> tags, each specifying the target it is configuring. Any streams identified as exporting to that target (in a CREATE STREAM... EXPORT TO TARGET statement), then use that configuration for export. For example:

<export>
   <configuration enabled="true" type="file" target="log">
     . . .
   </configuration>
   <configuration enabled="true" type="jdbc" target="archive">
     . . .
   </configuration>
</export>

You must also configure each export connector by specifying properties as one or more <property> tags within the <configuration> tag. For example, the following XML code enables export to comma-separated (CSV) text files using the file prefix "MyExport".

<export>
   <configuration enabled="true" target="log" type="file">
     <property name="type">csv</property>
     <property name="nonce">MyExport</property>
  </configuration>
</export>

The properties that are allowed and/or required depend on the export connector you select. VoltDB comes with six export connectors:

As the name implies, the file connector writes the exported data to local files, either as comma-separated or tab-delimited files. Similarly, the JDBC connector writes data to a variety of possible destination databases through the JDBC protocol. The Kafka connector writes export data to an Apache Kafka distributed message queue, where one or more other processes can read the data. In all three cases you configure the specific features of the connector using the <property> tag as described in the following sections.

In addition to the connectors shipped as part of the VoltDB software kit, an export connector for Amazon Kinesis is available from the VoltDB public Github repository (https://github.com/VoltDB/export-kinesis).