Example—Error pipeline

Example of an Error pipeline.

This example demonstrates how to create an error pipeline and associate it with the main pipeline.

Create a error pipeline

  1. Create a pipeline containing the Mapper, JSON Formatter, and File Writer Snaps.

    Configure error pipeline

  2. Configure the Mapper Snap to gather data from the main pipeline.

    Mapper configuration in error pipeline

  3. Next, we connect a JSON Formatter Snap to format the document output into JSON format and write the file to SL database using the File Writer Snap.

Create the main pipeline

  1. Create a simple pipeline containing the JSON Generator and Mapper Snaps.


  2. Configure the JSON Generator Snap with the message Hello World and number 1.

    Mapper Snap Settings

  3. Configure the Mapper pipeline as follows. Specify $status in the Mapping table.

    There is no statusobject in the input data, hence the Snap results in an error.


    Mapper Snap Settings

    Set the Snap to Route to Error Pipeline under the Views tab.
    Mapper Snap Settings

  4. Right-click the Mapper Snap’s context menu and select, Link Output to Error Pipeline. You can see err in the Mapper connector.

    Linked Output in Mapper connector



  5. Click the Properties icon in the Desinger toolbar, and select the Error Pipeline that you want to link.
  6. Click Save.
Run the Main Pipeline to route the error data to the Error Pipeline. After you run, you can view the errors in the preview of the Pipeline Execution Statistics. You can also navigate to the SnapLogic Monitor to view the pipeline execution details.