Stdout Sink Node
The stdout node serializes each record it receives with the configured encoding and prints it to the standard output
of the ZephFlow process, one record at a time. Internal ZephFlow engine command for local and CLI runs. Not offered in
Fleak Data Workflow and not supported in Fleak Data Workflow workflows; do not add it to a workflow.
Internal ZephFlow engine command for local and CLI runs. Not offered in Fleak Data Workflow and not supported in Fleak Data Workflow workflows; do not add it to a workflow.
Key Features
- Per-record output: Each record is serialized and printed on its own
- Compact JSON: JSON encodings print a record on a single line, without pretty-printing
- Shared stream: Records and ZephFlow log lines are written to the same standard output
Config Object
The full config object for the stdout node (StdOutDto.Config):
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
encodingType | EncodingType | Yes | — | Output format of each record. One of CSV, JSON_OBJECT, JSON_ARRAY, JSON_OBJECT_LINE. Other values are rejected |
Enum values are case-sensitive: json_object fails DAG compilation.
Output Format
One Record at a Time
Each record is serialized on its own and printed followed by a newline, so the encoding applies to a single record:
encodingType | Output for records {"a":1} and {"a":2} |
|---|---|
JSON_OBJECT | {"a":1} then {"a":2}, one per line |
JSON_OBJECT_LINE | {"a":1} then {"a":2}, one per line |
JSON_ARRAY | [{"a":1}] then [{"a":2}]: each record in its own one-element array |
CSV | A header line and a value line for every record, each followed by an empty line |
CSV lines end with \r\n. A record that fails to serialize is logged at ERROR level and skipped.
Log Lines
ZephFlow writes its log lines to the same standard output, so records appear between timestamped log lines such as
2026-10-08 22:07:07.770 [main] INFO io.fleak.zephflow.clistarter.Main - Selected metric client: noop. When another
program reads the output, keep only the record lines, for example by filtering out lines that match the log format.
Job Context
The DAG definition must contain a jobContext block, which may be empty (jobContext: {}). Without it, the CLI starter
fails with a NullPointerException before the DAG runs.
Examples
DAG Definition
Save as stdout_example.yml:
jobContext: {}
dag:
- id: "stdin_source"
commandName: "stdin"
config:
encodingType: "JSON_ARRAY"
outputs:
- "stdout_sink"
- id: "stdout_sink"
commandName: "stdout"
config:
encodingType: "JSON_ARRAY"
outputs: []
Run it with the CLI starter:
echo '[{"id": 1, "level": "INFO"}, {"id": 2, "level": "ERROR"}]' | docker run -i \
-v $(pwd)/stdout_example.yml:/app/stdout_example.yml \
fleak/zephflow-clistarter:latest -f /app/stdout_example.yml
The input array is split into two records, and each is printed as its own array. Between the log lines, the output
contains the stdin prompt and the records (field order within a record may differ from the input):
use an empty line to quit
[{"level":"INFO","id":1}]
[{"level":"ERROR","id":2}]
Related nodes
- stdin: Read records from standard input
- filesource: Read a single local file
- kafkasink: Write records to a Kafka topic
- s3sink: Write records to AWS S3