To enable export at runtime, you include the <export>
and <configuration>
tags in the deployment file, specifying the stream you are configuring and
which export connector to use (with the type
attribute). For example:
<export> <configuration enabled="true" stream="log" type="file"> . . . </configuration> </export>
To export to multiple destinations, you include multiple <configuration>
tags, each specifying the export stream it is configuring. Any tables identified as belonging to that stream (in an EXPORT
TABLE... TO STREAM statement), then use that configuration for export. For example:
<export> <configuration enabled="true" type="file" stream="log"> . . . </configuration> <configuration enabled="true" type="jdbc" stream="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" stream="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.