Skip to content

Singlefile

The singlefile sink writes stream items to a single local output file using buffered I/O. It ensures data durability by performing an fsync every few lines.

It requires parallelism to be set to 1 - only a single thread can write to it.

The file will be created if does not exist, otherwise new elements will be appended to it.

SingleFileSinkConfigBuilder.builder()
     .withPath("/path/to/output.txt");
sink:
  singlefile:
    path: "/path/to/output.txt"

Properties

path

The file to append data to. Cannot be a directory. Required.

Type: string

Java dependency management

Add this declaration to your dependency management system to access the configuration DSL for this plugin in Java.

<dependency>
    <groupId>org.voltdb</groupId>
    <artifactId>volt-stream-connectors-api</artifactId>
    <version>1.4.0</version>
</dependency>
implementation group: 'org.voltdb', name: 'volt-stream-connectors-api', version: '1.4.0'