Count equals
Data quality rule that verifies that a data quality check reading equals a given value. A margin of error may be configured.
Parameters
This check has two parameters that should be configured for each alert:
low
:
rule threshold for a low severity (1) alertexpectedValue
: float
expected value for the actual_value returned by the sensor. The sensor value should equalexpected_value +/- the error_margin
.errorMargin
: float
error margin for comparison.
medium
:
rule threshold for a medium severity (2) alertexpectedValue
: float
expected value for the actual_value returned by the sensor. The sensor value should equalexpected_value +/- the error_margin
.errorMargin
: float
error margin for comparison.
high
:
rule threshold for a high severity (3) alertexpectedValue
: float
expected value for the actual_value returned by the sensor. The sensor value should equalexpected_value +/- the error_margin
.errorMargin
: float
error margin for comparison.
Example
The following example shows how to implement count_equal
rule for a check.
The assigned severity depends on sensor result (see YAML configuration below):
result >= 90.0
, the check is passed: valid result90.0 > result >= 80.0
the severity is low (1)80.0 > result >= 70.0
the severity is medium (2)70.0 > result
, the severity is high (3)