Skip to main content

SysOut

Writes the input stream to striim-node.log (see Reading log files), which can be useful during development and testing. (If you are Running Striim as a process), it writes output to the terminal running the server instead.)

The only property is name, a string that precedes each event. This allows you to distinguish output from multiple targets. Here is a typical example:

CREATE TARGET SimpleOutput
USING SysOut(name:simple)
INPUT FROM RawDataStream; 

See Writing a simple TQL application for examples of how to use SysOut during development.

Note

SysOut cannot display Kafka streams in Avro format. To work around that limitation, use a CQ to convert the stream to string format. For example:

CREATE TYPE newStreamType (
  AvroString java.lang.String
);
CREATE STREAM newStream OF newStreamType;

CREATE REPLACE CQ ConvertAvro
INSERT INTO newStream
SELECT k.data().toString() 
FROM KafkaAvroStream k;

CREATE TARGET AvroOut 
USING SysOut (name: 'AvroOut')
INPUT FROM newStream;