I'm new to Esper and have the following question. Is it possible to decorate an event property based on the value of another property. For example when in the below example the status property has the value cleared I want a different string value for notification then when the status property is empty. Is this possible?
I have the following statement:
create schema IT(host string, status string, severity string, notification string);
@Name('Out') insert into OutputAlerts select host, severity, status, 'Test value' as notification from IT where host regexp '(?i)SERVER1' AND severity regexp '(?i)critical'
And the following events: IT={host='SERVER1', severity='Critical', status='cleared'} IT={host='SERVER1', severity='Critical', status=''}
The "case" can do this in SQL 92.
select (case when status is null or status.length() = 0 then "empty" else "nonempty") as notification from ...