Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this article

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

Overview

You can use this Snap to apply aggregate functions on input data using the Group By support. You can calculate perform an aggregate function on a set of values to return a single scalar value.

  • This Snap does not support list and map objects referenced in the JSON paths.

  • If the input documents areunsorted and GROUP-BY fields are used, you must use the Sort Snap upstream of the Aggregate Snap to presort the input document stream and set the Sorted stream field Ascending or Descending to prevent the out-of-memory error. Learn more about presorting unsorted input documents to be processed by the Aggregate Snap.

...

The following example pipeline demonstrates how to concatenate unique string values.

...

Snap Configuration

...

Output

...

Image Removed

...

Configure the JSON Generator Snap to pass product and order details. Then, use the Aggregate Snap to concatenate the Order IDs and group the fields by Product names. To achieve this, configure this Snap with CONCAT function and specify $Product.Name.

...

On validation, you can view the Product names along with the Order IDs in the output preview.

...

Count the occurrences of a given product name

The following example pipeline demonstrates how to use the Aggregate Snap to count the occurrences of a given product name.

...

Downloads

Info
  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Provide Pipeline parameters as applicable.

...