GroupBy transformer

Transforms the pipeline to group by given field and add aggregations in a new field.

Usage:

<group-by by="abstract_sku">
    <aggregate by="external_url_large" type="count" />
    <aggregate by="external_url_small" type="first" />
    ...
</group-by>

Attributes:

  • by - field to be grouped by

Children:

  • aggregate - aggregations to be applied

Child-Attributes:

  • by - field to apply the type of aggregation on

  • type - type of aggregation to be applied

Aggregation types:

  • avg - average (by-field must contain integer or float values)

  • count - count the numbers of occurrences of the by-field

  • max - maximum value of the by-field

  • min - minimum value of the by-field

  • sum - summarize the values of the by-field (by-field must contain integer or float values)

  • first - first occurrence of the by-field

  • last - last occurrence of the by-field