Insert documents into a MongoDB collection

This example pipeline demonstrates how to insert documents into a MongoDB collection using the JSON Generator and Mapper Snaps to prepare and map the input data.


MongoDB Insert Example Pipeline

In this example, the documents are inserted into a collection using the MongoDB Insert Snap. The documents are passed using the upstream JSON Generator Snap and the Mapper Snap respectively.

  1. The JSON Generator Snap passes the documents to be inserted into the MongoDB collection.

    JSON Generator configuration

  2. The Mapper Snap maps the input documents to the database collection.

    Mapper Snap configuration

  3. The MongoDB Insert Snap inserts the documents into the collection test collection.

    MongoDB Insert Snap configuration

  4. Validate the pipeline.
    The successful execution of the pipeline displays the output preview showing the inserted documents.
    MongoDB Insert output

To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.