Suppose that you have a list of daily temperatures in a given country over a year. You may want to know the overall average temperature, the average temperature by region, or the coldest day in the year. In this section, you will learn how to solve these calculations with PDI, specifically with the Group by step.
The Group by step allows you to create groups of rows and calculate new fields over these groups. To understand how to do the aggregations, let's explain it by example. We will continue using the sales Transformation from the first section of the chapter. Now the objective will be as follows—for each pair product line/product code, perform the following:
- Calculate the total sales amount for each product
- Calculate ...