Example 7: Send records in a batch using a POST method

The following example pipeline demonstrates how to pass input documents in a batch using the Group By N and HTTP Client Execute Snap. In this pipeline, the HTTP Client Snap collects input documents until a batch of 20 is reached, then sends them as a list in the payload through a single request.

ex-bs-pipeline-overview.png

Configure the Group By N Snap to batch the entities in groups of 20.

ex-bs-group-by-n-config.png

Configure the HTTP Client Snap with the POST request and the URI to which the request should be sent.

On validation, you can view the status code 200, indicating that the payload was successfully sent. Additionally, you can view the entity data in batches of 20 records.

Configure the Mapper Snap with $entity.data and $statusLine to further use this data downstream.

On validation, you can view the entity data in a batch of 20 records.

Important steps to successfully reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

  File Modified

File Example_HTTP_Client_Batch_Size.slp

Jun 05, 2024 by Kalpana Malladi