Skip to content

Reads and parses events from standard input.

from_stdin {}

The from_stdin operator reads bytes from standard input and passes them through the provided parsing pipeline to produce events. This is useful when piping data into the tenzir executable as part of a shell script or command chain.

The pipeline to parse the incoming bytes into events. The pipeline receives raw bytes and must produce events. For example, { read_json } parses the input as JSON.

Terminal window
echo '{"foo": 42}' | tenzir
from_stdin {
read_json
}
{
foo: 42,
}
Terminal window
cat data.csv | tenzir -f pipeline.tql
from_stdin {
read_csv
}
Terminal window
tail -f /var/log/syslog | tenzir -f pipeline.tql
from_stdin {
read_syslog
}

Last updated: