How to use the Rollup mapper (with Sort)

The Rollup mapper step allows you to rollup fields within your data set. The rollup operations available are:

1. Sum
2. Average
3. First
4. Last
5. Min
6. Max
7. Count

If you are familiar with transact SQL (T-SQL), then the Rollup mapper works very similarly to applying an aggregate function on a field and grouping on an identify field.

To demonstrate how to set this up, I will use a working example. In my data set I have a detailed list of cases in my helpdesk system, but I want to return a result of the number of cases per assignee.

The first thing I will need to do add a Sort mapper step to my flow. NB! This is a critical step and needs to be used in conjunction with the Rollup mapper if our data is not sorted by the field we want to “group” by.

In my example, I am grouping by Assignee, so I will sort my data by assignee as per below. (You can add multiple fields to sort by).

Following on from this, I will add a Rollup mapper step. I will list Assignee as my ID Field (the field I want to group by). Under the RollUp Fields section I will list the Operation I want to use (i.e. Count) and the field I want to apply it to (i.e. CaseID). Under the To Field, I will list the field name I would like to set to the counted records (I.e. Count).