Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

stdout / File

The stdout sink writes messages to standard output or a file. This is primarily useful for debugging, testing, and piping pg_tide output to external tools. In development, it lets you verify your pipeline configuration and transforms without needing an external message broker running.

When to Use This Sink

Choose stdout when debugging pipeline configurations, testing JMESPath transforms, validating wire format encoding, or piping events to external command-line tools. It is also useful for log-based delivery patterns where messages are written to a file that is then consumed by a log shipper (Fluentd, Vector, Filebeat).

Configuration

SELECT tide.relay_set_outbox(
    'debug-pipeline',
    'orders',
    'debug-relay',
    '{
        "sink_type": "stdout",
        "format": "json",
        "output_file": null
    }'::jsonb
);

Configuration Reference

ParameterTypeDefaultDescription
sink_typestringMust be "stdout"
formatstring"json"Output format: "json" (one JSON per line) or "pretty" (indented JSON)
output_filestringnullWrite to file instead of stdout (optional)

Use Cases

Debugging transforms

# See what your JMESPath transform produces
pg-tide --postgres-url "..." 2>/dev/null | jq .

Piping to external tools

# Pipe to a custom processor
pg-tide --postgres-url "..." | my-custom-processor

Further Reading