Modeling Guide for SAP Data Hub

Configure the Aggregation Node

An Aggregation node represents a relational group-by and aggregation operation.

Prerequisites

You have defined the operator with an Aggregation node and connected the previous node to this node.

Procedure

  1. Double-click the Aggregation node.
  2. Define output columns.
    If you have connected the previous node to the Aggregation node, you can map any columns from the input as output columns of the Aggregation node. You can add, delete, and rename the columns, as needed.
    1. In the Mapping pane, select a Source column and hold and drag the cursor to the Drop row here zone in the Target section.
    2. (Optional) If you want to automap the columns based on column names, in the Source section, choose (Auto Map by Name).
    3. If you want to edit a column name, select a Target column and choose (Edit).
    4. If you want to remap an output column with a different source column, right-click the mapping and choose Remap.
      Select a new source column and choose OK.
  3. Define the aggregation type.
    You can specify the columns that you want to have the aggregate or group-by actions taken upon.
    1. If you want to define an aggregation type, select a Target column and choose (Edit).
    2. In the Aggregation Type dropdown list, select a value.

      Aggregation Type

      Description

      <empty>

      This type is the default aggregation type. You this aggregation type to specify a list of columns for which you want to combine output. For example, group sales orders by date to find the total sales ordered on a particular date.

      Avg

      Calculates the average of a given set of column values.

      Count

      Returns the number of values in a table column.

      Max

      Returns the maximum value from a list.

      Min

      Returns the minimum value from a list.

      Sum

      Calculates the sum of a given set of values.

  4. (Optional) Reorder output columns.
    In the Columns tab toolbar, switch to the Form pane to reorder the output columns.
    1. To reorder the columns, select the column that you want to move and in the toolbar click the up or down arrows.
  5. (Optional) Define filters.
    For example, if you want to view the number of sales that are greater than 10000, your expression might look like this: "Aggregation1_input"."SALES" > 10000.
    1. Select the Filters tab to compare the column name against a constant value.
    2. In the expression editor, enter the required expression.
  6. (Optional) Define SQL HAVING clause.
    If you want to retrieve records from the output of a source only when the aggregate values satisfy a defined condition, then:
    1. Select the Having tab.
    2. In the expression editor, define the required HAVING condition.
  7. Connect nodes.
    If you want to configure the Data Transform operator with another node,
    1. In the menu bar, use the breadcrumb navigation to navigate back to the operator configuration editor.
    2. Add new nodes.
    3. To connect the nodes, select the output port of a node and drag the cursor to an input port of another node.