This example demonstrates how to render groups data from upstream Snaps
such as Group By Fields Snap.
In a scenario where the JSON Formatter Snap needs to
format data groups, you can enhance the Snap's output to format each group as a separate
document, where each line is a member of the group.
Download the Sample Pipeline.
-
Configure the JSON Generator Snap to pass the raw JSON content to be formatted.
-
The Group By Fields Snap is set to group the incoming data by $key with the Target field as $group.
-
Notice that the incoming data is grouped by key in this output.
-
-
When the JSON Formatter Snap received data groups, we can select the fields JSON lines and Format each document checkboxes in unison and the Snap formats the content as multiple documents – one per group (key1, key2, and key3 in this example) with one line for each element in these groups.
To reuse the pipeline:
- Download and import the pipeline into SnapLogic.
- Configure Snap accounts as applicable.
- Provide pipeline parameters as applicable.