Create a Moving Average on an Event Stream Using an Aggregation Window
2020-02-12
Beginner
20 min.
Add an aggregate window to create a moving average on the event data, smoothing out the raw data.
You will learn
- How to add an aggregate window to hold multiple data entry and observe patterns
- How to use a time-based sliding event window to compute metrics and monitor trends
Prerequisites
- Tutorials: Join an Event Stream to a HANA Table
Unlike streams, which are stateless, windows are like tables that hold information from one event to the next. Here you will add an aggregate window that is keyed by MACHINEID
, which will hold a set of aggregate values for each machine.
If you don’t want to use the visual editor, then you can skip to step 8 to view the CCL and copy it into your project.
Step 1: Add an Aggregate Window to the Project
Step 2: Connect the Aggregate Window to the Event Stream
Step 3: Add columns to the window
Step 4: Set a retention policy on the input
Step 5: Edit the GROUP BY clause
Step 6: Add a GROUP FILTER
Step 7: Edit the Column Expressions
Step 8: Check your work
Navigate tutorial steps
-
Step 1: Add an Aggregate Window to the Project
-
Step 2: Connect the Aggregate Window to the Event Stream
-
Step 3: Add columns to the window
-
Step 4: Set a retention policy on the input
-
Step 5: Edit the GROUP BY clause
-
Step 6: Add a GROUP FILTER
-
Step 7: Edit the Column Expressions
-
Step 8: Check your work
- Back to Top