#
read-file
Read path and emit events as {payload: chunk}. Will be treated as binary when no encoding is specified. Pipeline shuts down after file is read. strip the headers & footers of supported file formats. Can read from start until end which can be useful to strip static headers & footers of unsupported file formats.
#
Config
Required:
path: File path (supports ~ expansion)
Optional:
encoding: Output encoding (utf8, ascii, base64)start: Start reading from here (default: 0)end: Stop reading from this many bytes from the end (default: 0)strip: Strip header & footer of known formats: gzip
#
Example
Strip the header & footer of a gzip file and process the compressed data.
pipeline:
read-file:
config:
path: in.json.gz
strip: gzip
parse-deflate:
inputs: [read-file]
parse-lines:
inputs: [parse-deflate]
write-stdout:
inputs: [parse-lines]