Aggregating attribute values

The Aggregate transformation aggregates attributes values to derive one or more new attributes and group the result by an attribute.

To aggregate attribute values:

  1. In the Catalog, select a project.
  2. Select Transform.
  3. From the transform menu, select Shaping > Aggregate.
  4. Specify the attribute to group by, as follows:
    1. From the Available attributes list, locate and select an attribute that you want to group by.
      You can filter attributes by name or by data type to locate them.
      This example shows a selected the sales_productcategoryname attribute:
      Shows a single attribute in the Available attributes pane.

    2. Optionally, examine the Available attributes preview pane to check whether the attribute you selected to group by has the attribute value distribution that you expect. (This pane shows the value list view. )
      This example shows the attribute value distribution of the sales_productcategoryname attribute:
      Show the value distribution of the grouping attribute.

    3. If the attribute you examined is what you want to group by, drag and drop the attribute onto the Grouping attributes pane.
  5. Specify the new aggregated attributes, as follows:
    1. From the Available attributes list, locate and select an attribute that you want to aggregate.
      You can filter attributes by name or by data type to locate them.
    2. Drag and drop the attribute onto the Aggregated attributes pane and select an operator for the aggregation. (The default operator is average, but you can select any operator from the drop-down list.)
      Studio creates a new attribute name with a new suffix of the form _operatorName.
    3. Optionally, click the name to make it editable and edit the new attribute name.
    This example shows two new aggregated attributes. One creates a minimum value for a product's standard cost and the second creates a maximum value for a product's standard cost.
    Shows two new aggregated attribute names and corresponding operators.

  6. Click Preview and examine the Aggregated preview pane to see the result of aggregating the values and grouping by the attribute you chose previously.
    To continue the above example, Studio creates the new aggregated attributes sales_productstandardcost_min and sales_productstandardcost_max and then grouped them by sales_productcategoryname. As a result of the aggregation, you can see the high and low cost grouped by the category:
    Show the result of creating two new aggregated attributes.

  7. Click Add to Script to save the transformation step to the script.

If you are done making changes to the project data set, you can commit the changes. See Running the transformation script against a project data set.