Skip to content

Concatenates one field from all input events into a byte stream.

write_all field

The write_all operator takes one field selector and appends the field’s values in input order. It accepts fields of type blob and string.

For blob fields, write_all appends the bytes verbatim. For string fields, it appends the existing string bytes without adding separators or escaping.

The operator skips null values and events where the selected field is missing. It emits no bytes if all values are skipped.

from {data: "hello"}, {data: " "}, {data: "world"}
to_stdout {
write_all data
}
hello world

Use read_all with binary=true to read a file into a blob field, then write that field back as raw bytes.

from_file "/tmp/report.pdf" {
read_all binary=true
}
to_file "/tmp/report-copy.pdf" {
write_all data
}
from {payload: {data: b"foo"}}, {payload: {data: b"bar"}}
to_file "/tmp/payload.bin" {
write_all payload.data
}

Last updated: