Skip to content

Converts each input event into a separate byte chunk.

write_chunks [field]

The write_chunks operator reads a field from each input event and emits it as a separate byte chunk. The field must be of type blob.

Unlike write_all, which buffers all input and produces a single concatenated chunk at the end, write_chunks emits one chunk per event as data arrives.

This is the inverse of read_chunks.

The field to extract from each event. Defaults to data.

from {data: b"hello"}, {data: b" "}, {data: b"world"}
to_file "output.bin" {
write_chunks
}
from {payload: b"hello"}, {payload: b"world"}
to_file "output.bin" {
write_chunks payload
}
from_file "input.bin" {
read_chunks
}
to_file "output.bin" {
write_chunks
}

Last updated: