Add improvements to AggregateOverTime sample
@@ -9,14 +9,16 @@ How to setup:
2) Notice how aggregation is done based on time and group by value. In this example, timeBatch(10 sec) allows you to perform aggregations on 10 second event batches. These 10 second event batches would be grouped by 'country' attribute
3) Configure random event simulation
a) Click on 'Event Simulator' (double arrows on left tab)
- b) Click on Create
- c) Give a name and a description
+ b) Click 'Feed Simulation' -> 'Create'
+ c) Give a name, description and time interval
d) Select 'Random' as the 'Simulation Source'
e) Click on 'Add Simulation Source'
- f) For 'age', provide 80 as the 'Max' value (Keep 'Primitive Based' as the config type for both 'name' and 'age'. You may change it if you wish to see the behavior when different config types are used)
- g) For 'country' change config type to 'Regex based' and give the pattern as '(SL|USA|UK)'. Using few values for country (in the example only SL, USA and UK would be selected as country when generating random events with pattern '(SL|USA|UK)') would be helpful to verify the output, since we are grouping by country.
- h) Save the simulator configuration
- i) The newly created simulator would be listed under 'Active Feed Simulations' of 'Feed Simulation' tab
+ f) Select AggregateOverTime as 'Siddhi App Name'
+ g) Select inputStream as 'StreamName'
+ h) For 'age', provide 80 as the 'Max' value (Keep 'Primitive Based' as the config type for both 'name' and 'age'. You may change it if you wish to see the behavior when different config types are used)
+ i) For 'country' change config type to 'Regex based' and give the pattern as '(SL|USA|UK)'. Using few values for country (in the example only SL, USA and UK would be selected as country when generating random events with pattern '(SL|USA|UK)') would be helpful to verify the output, since we are grouping by country.
+ j) Save the simulator configuration
+ k) The newly created simulator would be listed under 'Active Feed Simulations' of 'Feed Simulation' tab
4) Start the siddhi app by clicking on 'Run' (Click 'Run' on menu bar -> 'Run'). If you edit this application while it's running, stop the app (Click 'Run' on menu bar -> 'Stop') -> Save app -> Start app
5) Click on the start button (Arrow symbol) next to the newly created simulator
6) View the input and respective output on the console. Notice how the output gets generated every 10 seconds, and how it reflects the aggregation for the batch of events sent during last 10 seconds.
