You will learn
- Using a Derived Window to analyze events and filter data.
- Using reference data from a HANA table for detecting alert conditions.
Part 6 of 9. Create and use Derived Window to analyze events, filter data, and generate alerts.
Click Derived Window in the Palette and drop it onto the canvas.
Add a connector from
AVG_TEMP to the new window.
Change the new window name to
ALARM_TEMP and press Enter when done.
Click Add Column Expression f(x) icon shown below.
Click the Copy Columns from Input menu item to execute it. You can also press c.
Select all except for
TEMP_UNIT, then click OK.
Click Add Column Expression f(x) icon then Column Expression menu item to add a column to this window. Then repeat (i.e. add 2 new columns total). You can also press c.
Rename the first new column to
ALARM_TYPE and press Enter key when done.
Rename the 2nd new column to
simpleResultExpression6 to edit the expression.
'TEMPERATURE' in the expression edit box for the
ALARM_TYPE column. This will set the “type” of all alarms emitted by this window to the string “TEMPERATURE”. Press Enter key to confirm entry.
'Machine not maintaining temperature' in the expression box for the
ALARM_DESC column. Press Enter key to confirm entry.
Now click Add Query Clause to add a query clause. We want to add a filter such that this window only contains rows for machines that have a current average temperature above the max specified for the machine.
Click the Filter menu item to execute it. You can also press f.
Double-click on 1 under the Other tab to edit the filter expression.
Change the filter expression to:
AVG_TEMP.AVG_TEMP > AVG_TEMP.MAX_TEMP. Use Ctrl+Space for completion assist.
Click Compile Project icon to check for errors.