Create a stream that collects errors and the events that caused them.
CREATE [LOCAL|OUTPUT] ERROR STREAM name ON source [, source ... ]
name is a string that identifies the newly created error stream.
source is a string that identifies a previously defined stream or window.
Error streams collect error data from the specified streams. Each error record includes the error code and the input event that caused the error. You can simply display these records for monitoring purposes, or they may trigger more processing logic downstream, just like the records from other streams.
In production environments, error streams are used for real-time monitoring of one or more streams in the project. They are also used in development environments to monitor the input and derived streams when debugging a project.
The visibility of an error stream is, by default, LOCAL. To make the error stream visible to external monitoring tools or devices, you must specify OUTPUT when you create it.
You can define more than one error stream in a single project.
CREATE OUTPUT ERROR STREAM AllErrors ON InputStream, DerivedStream1, DerivedStream2
CREATE ERROR STREAM InputErrors ON InputStream1, InputStream2 CREATE ERROR STREAM QueryErrors ON DerivedStream1, DerivedStream2, DerivedStream3