stream

Either receives output from the specified stream or forwards input data to the specified stream. Administrative privileges are required to execute this command.

Syntax

stream [forward=BOOL] [window=INT{y|mon|w|d|h|m|s}] STREAM[, ...]
Required Parameters
STREAM, ...
Name of the stream. Use comma (,) as a separator to specify multiple log streams. You can use a wildcard (*) in the stream name. If you use a wild card, it receives the output from all streams matching a specific string pattern in stream name at once.
Optional Parameters
forward=BOOL
Option to receive output from or forward input to the specified stream specified by STREAM, ... (default: f).
  • t: Forwards the input to the stream specified by STREAM, .... Use this option only when you explicitly enable the streaming feature. This option cannot be used when the window option is specified.
  • f: Receives the input from the stream specified by STREAM, ....
window=INT{y|mon|w|d|h|m|s}
Amount of time to receive data in real time from the time the query is executed. You can specify time in units of y (year), mon (month), w (week), d (day), h (hour), m (minute), and s (second). When the unit is y, only 1y is allowed. For example, 10s refers to "the next 10 seconds" from the time the query was executed. This option cannot be used when forward=t.

Usage

  1. Receive the outputs of sample1 and sample2 stream queries in real time for 10 seconds

    stream window=10s sample1, sample2
    
  2. Pass 100 records from the test table to stream sample1 and sample2 as input.

    table limit=100 test | stream forward=t sample1, sample2