Write

The Write Stage writes events to an existing Output.

Stage Write Target

Target

Use the reference panel to define the list of Outputs you want the stage to write.

Write Return

When set to Ignore Return, the pipeline will continue processing without waiting for the completion of the write. Use Wait for Completion to wait for the completion of the write and conditionally deal with write failures.

Success / Failure

The Write Stage provides alternative paths for successful and failed writes. This allows for pipelines to have special handling for write failures.

A failed write occurs if any target fails to write, and a single event is sent to the Failure path. The event includes the original event being written, as well as a writeResults metadata value that contains the status of each write. The metadata looks as follows:

typescript
[{ // order matches the order of the target reference list
reference: string   // the target reference name
quality: string     // good or bad for success/failure
reason: string      // the error message for the failed write
}]

If the Failure path is not connected, the stage produces an error. Below is an example of a pipeline write error taking the failure path. Note the warning is only shown in replay mode.

Stage Write New Target

If all targets successfully write, the event takes the Success path.

Custom Failure Handling

To perform error handling and then force an error in the pipeline, use a transform stage and throw an exception using code like the following.

js
throw("some error message")