Numeric aggregation Metric block

  • Updated

Numeric aggregation – Create simple aggregations over existing columns in your data.

A Numeric aggregate block calculates a summary of a property or block. The calculation involves applying an aggregation function to the input property and potentially organizing its results into groups. The result of the numeric aggregate block is a numerical value that may include a grouping attribute if the configuration uses the Group by option.

Example usage

Use a numeric aggregation block to calculate the "Total Spend per User" by combining transaction amounts for each user.

Configuration

  • Aggregator – Used to aggregate input for a block. 
    • avg  – Computes the average of the values in the input provided.
    • count – Counts the total number of values in the input provided, including duplicates.
    • unique count – Counts the number of unique values in the input provided.
    • first – Computes the first value in the input provided. The first value is determined by ordering all inputs by event time.
    • last – Computes the last value in the input provided. The last value is determined by ordering all inputs by event time.
    • max – Computes the maximum value in the input provided.
    • min – Computes the minimum value in the input provided.
    • sum – Sums all the values in the input provided. 
  • Input – Aggregator block input. It can be a property, a block, value, or a parameter.
  • Group by – Use this optional configuration to group the output of the aggregator block by the specified set of attributes. Each attribute can be either a property or a block.

See Aggregation block in the Netspring documentation.