Group By Fields
In this article
Snap type: | Transform | |||||||
---|---|---|---|---|---|---|---|---|
Description: | The Snap groups input documents by the field values into batches of output documents. Each batch is an output document with a list of input Map data as a value at the location specified by the Target field property. Input documents with the same group-by field values are grouped into the same output document. The Snap expects the input documents with the same group-by field values to be contiguous and whenever the group-by field values change, the Snap produces a new output document. Therefore, if all input documents with the same group-by field values are expected to be grouped into one output document, the Sort Snap can be used in front of the Group By Fields Snap so that the input document stream are sorted by the group-by field values.
| |||||||
Prerequisites: | All input documents should be of Map data type and contain values specified by the Fields property. | |||||||
Support and limitations: | Does not work in Ultra Pipelines. | |||||||
Account: | Accounts are not used with this Snap. | |||||||
Views: |
| |||||||
Settings | ||||||||
Label | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | |||||||
Fields | Required. The fields to group by. Example: $OrderNumber Default value: [None] | |||||||
Memory Sensitivity | Required. Indicates the Snap's behavior towards memory changes. Choose one of the available options:
Default value: [None] | |||||||
Min. Part Size | Activated when Memory Sensitivity is set to Dynamic. Enter the minimum part size that you want Snap to split larger groups into multiple parts. This limit does not apply to the last part of the multi-part group or a single part of the group that's smaller than the size of the part mentioned here. Example: 100 Default value: 10 | |||||||
Target field | Required. Target field name to be used as a key in the output document or a JSON path where a list of input Map data would be located. Example: batch Default value: group | |||||||
Minimum memory (MB) | If the available memory is less than this property value while processing input documents, the Snap stops to fetch the next input document until more memory is available. This feature is disabled if this property value is 0. Example: 500 Default value: 750 | |||||||
Out-of-memory timeout (minutes) | If the Snap pauses longer than this property value while waiting for more memory available, it throws an exception to prevent the system from running out of memory. Example: 30 Default value: 20 | |||||||
Snap Execution | Select one of the three modes in which the Snap executes. Available options are:
Default Value: Execute only |
Examples
Related Content
- SnapLogic Community Posts: