Skip to content

read_delimited

Parses an incoming bytes stream into events using a string as delimiter.

read_delimited separator:string|blob, [binary=bool, include_separator=bool]

The read_delimited operator takes its input bytes and splits it using the provided string as a delimiter. This is useful for parsing data that uses simple string delimiters instead of regular expressions or standard newlines.

The resulting events have a single field called data.

The string or blob to use as delimiter. The operator will split the input whenever this exact sequence is matched. When a blob literal is provided (e.g., b"\x00\x01"), the binary option defaults to true.

Treat the input as binary data instead of UTF-8 text. When enabled, invalid UTF-8 sequences will not cause warnings, and the resulting data field will be of type blob instead of string.

When enabled, includes the matched separator string in the output events. By default, the separator is excluded from the results.

load_file "data.txt"
read_delimited "||"
load_file "custom.csv"
read_delimited ";;;"
load_file "data.txt"
read_delimited "||", include_separator=true
load_file "binary.dat"
read_delimited b"\x00\x01"
load_file "data.txt"
read_delimited b"||", include_separator=true
load_file "binary.dat"
read_delimited "\x00\x01", binary=true

read_all, read_delimited_regex, read_lines, read_ssv, read_tsv, read_xsv

Last updated: