Aggregation Features (Optional)

Aggregations are used to transform the data before loading into a downstream application. It can be useful to reduce the amount of data transfer and apply simple calculations on the fly.

Practical Examples

To better understand the functionality and practicality of this tool, let’s delve into some real-world operational scenarios:

Energy Management:

  • Use cumulative aggregation grouped by days to track energy consumption over time.

  • Pre-stage with an average aggregation by hours to identify average energy usage for the period cumulated.

Occupancy Data:

  • Use count aggregation grouped by weeks to find out the number of visitors per week.

  • Pre-stage with maximum aggregation by hours to determine the maximum number of occupants over the week.

Meteorology Data:

  • Use range aggregation grouped by months to identify monthly temperature fluctuations.

  • Pre-stage with average aggregation by days to understand daily temperature trends within those months.

These applications are just a glimpse of what’s achievable with the Multi-Stage Data Aggregation API. Depending on your needs, this tool can be tailored to deliver precise and actionable insights and only limited by your creativity.

Aggregation parameters

Aggregation Methods:

You can select from one of the following aggregation outputs:

  • Count

  • Sum

  • Average

  • Maximum

  • Minimum

  • Range

  • Difference

  • Cumulative

Aggregation Groupings:

The above aggregations can be grouped by the following:

  • Minutes

  • Hours

  • Days

  • Weeks

  • Months

  • Years

Single Stage Aggregation Parameters

All aggregations must use a final groupby and aggreagteby stage.

ParameterValid ValuesSequence

groupby

minute , hour, day, week, month, year

groupby -> aggregateby

aggregateby

sum, avg, max, min, range, diff

Multi Stage Aggregation Parameters

ParameterValid ValuesSequence When Apply

pregroup

minute , hour, day, week, month

pregroup1 & preaggregate1 → groupby & aggregateby

preaggregate1

sum, avg, max, min, range

pregroup2

hour, day, week, month

pregroup1&preaggregate1 →

pregroup2 & preaggregate2 →

groupby & aggregateby

preaggregate2

sum, avg, max, min, range

pregropregroup3

day, week, month

pregroup1 & preaggregate1→

pregroup2 & preaggregate2→

pregroup3 & preaggregate3→

groupby & aggregateby

preaggregate3

sum, avg, max, min, range

When Multi-stage Aggregation parameters Applied, Aggregation is the Last stage;

When Multi-stage Aggregation parameters Not Applied, Aggregation is the Only stage;

For group parameter, the time range of Previous Stage must be Shorter. For example, If groupby is ‘hour’, pregroup1 must be ‘minute’ and pregroup2 & 3 and preaggregate2 & 3 cannot be applied. Other wise the data won’t be accurate.

Last updated