Conditional Monitors
Overview
A Conditional Monitors Template can be found in the category "Custom". It's an SQL no-code form enabling creation of rules with multiple conditional statements.
How to
How to join assets
With the "Conditional monitors" template, you can join assets and then create conditions between fields of different datasets.
Datasets selection
Join type selection
Left join: keeps every rows from the left dataset, completed by the fields of the right dataset.
Right join: keeps every rows from the right dataset, completed by the fields of the left dataset.
Inner join: keeps only rows matching in both datasets.
Outer join: keeps every rows matching in both datasets but also rows that do not match.
Join Key selection
How to define Conditions
A Conditional Monitor can be configured by defining a no-code SQL query. The Monitor will throw an alert if a defined query returns results. If it comes back empty, the run is successful. Fields can be compared both to other fields and to constant values.
Column Conditions
After selecting a field, select "COLUMN", then the comparison operator. Finally, select the other field you want to use for the comparison than can be either from the same dataset or from the other one used for the join.
The comparison operators for column conditions, available depending on the field type are:
- Equals
- Not Equals
- Greater
- Greater or Equals
- Less
- Less or Equals
- Contains
- Not Contains
Constant Conditions
Conditions can also be defined with a constant statement. For this purpose, select "VALUE", then the operator. Finally, depending on the field type and the selected operator, write if needed the constant value for the comparison condition.
Available operators:
- Equals
- Not Equals
- Greater
- Greater or Equals
- Less
- Less or Equals
- Contains
- Not Contains
- Is Null
- Is Not Null
Multiple Conditions and Condition Groups
You can add as many conditions as needed, connecting them with OR or AND statements. Conditions can also be grouped.
The connector used in a group will be applied for all conditions within the group. In the same way, the connector between groups will be applied between all groups.
How to define Time
There are two ways of defining conditions on time in the context of a Conditional Monitor.
- Time VALUE parameter - uses fixed dates & time
- TIME PERIOD parameter - uses a rolling reference of a time period defined in minutes/hours/days
Time VALUE Parameter
By defining rules on a time field value, it's possible to use fixed dates (including time) in a condition.
TIME PERIOD Parameter
By defining rules on a time field through a TIME PERIOD operator, it's possible to mimic a behaviour of a Time Window and/or Time Offset.
- TIME PERIOD Less Then [X] Minutes/Hours/Days
- this condition selects all records created LESS THAN [X] days ago
- allows you to mimic a Time Window parameter
- TIME PERIOD Greater Then [X] Minutes/Hours/Days
- this condition selects all records created MORE THAN [X] days ago
- allows you to mimic a Time Offset parameter
Example use cases
- Monitor only data from the last 14 days.
- [timeField] TIME PERIOD Less then 14 Days
- Monitor all data except for the last 3 days (3 days offset).
- [timeField] TIME PERIOD Greater then 3 Days
- Monitor only data from the last 7 days with a 2 days offset.
- [timeField] TIME PERIOD Less then 9 Days AND [timeField] TIME PERIOD Greater then 2 Days
Updated 2 months ago