Data Quality Data¶
Data Quality Data Messages¶
Data Streams can have automated Data Quality Checks enabled to monitor the quality of the data being received from the Asset.
You can read all about Data Quality concept here and the app.yaml settings here.

app.yaml setup¶
Note
You will need to first enable the Data Quality monitoring.
It is recommended this is done from the Kelvin UI, though you can also use the Kelvin API or Kelvin API Client (Python)
If you monitor Data Quality outputs from Data Streams that have not been enabled, you will not receive any outputs.
For Data Quality information the app.yaml only needs to have the Data Streams declared in the data quality section.
Once you have connected to the wanted Data Stream Checks you can monitor the output of the Data Quality Checks in real time.
Stream Decorators (Preferred)¶
The preferred and simplest method for consuming incoming control change messages is to create a Stream Decorator function and add a filter for Data Quality.
Note
You can filter by assets or datastreams to react only to specific incoming messages.
| Stream Decorator Example | |
|---|---|
Asynchronous Consumption¶
The Application can use asynchronous programming (asyncio) to connect to the Kelvin message bus and continuously listen for new data as it is emitted from assets or data streams.
By using async for loops with asynchronous generators (AsyncGenerator), the app reacts to each incoming message instantly without blocking other operations. This allows real-time processing of Data Quality messages as soon as they are published by the Data Quality Application.
By using the stream_filter method we filter to only process Data Quality messages is_data_quality_message).
When deployed and running, if you look at the logs of the workload, you will see this output;
Here you can see that the Data Stream speed has an availability of 20% and gas_flow_rate availability of 66%.
Get Specific Values¶
You can retrieve Data Quality values or aggregated information in Python with the API endpoint /asset-insights/get using the Kelvin API Client (Python).
Get Latest Value¶
Note
Click here to see a full list of all the data_quality_name options.
This does not include any custom Data Quality Applications on your Kelvin Platform. Check with your developer for details.
The output will look like this
| Get Latest Data Quality Value Output | |
|---|---|
The response variable will hold all the data like this;
| Get Latest Data Quality Value Output | |
|---|---|
Get Aggregation Over Time¶
You can also get Data Quality information in an aggregated format.
Note
This helps save bandwidth if you do not need to download all values over a time range.
Note
Click here to see a full list of aggregate options available.
The output will look like this
| Get Data Quality Aggregation over Time | |
|---|---|
The response variable will hold all the data like this;
| Get Data Quality Aggregation over Time | |
|---|---|
Interpreting Built-in Checks¶
Each Check publishes a different payload, so the same number means different things depending on which Check produced it. Always read the Check name from msg.resource.data_quality before acting on a payload.
Note
Some Data Quality Applications will output regular reports, like Edge Data Availability, and others will only output reports when a problem is detected, like Outlier Detection.
Note
These are the five Checks that come built in with the Kelvin Platform, each performed by a Data Quality Application built by Kelvin.
Developers can also build their own custom Data Quality Applications, which run on the same infrastructure and publish their own Checks. Check with your developer for details of any custom Checks running on your Kelvin Platform.
kelvin_timestamp_anomaly¶
Detects anomalies or irregularities in the timestamp sequence.
The payload is a count of the timestamp anomalies detected.
kelvin_stale_detection¶
Detects when a Data Stream value has not changed over a configurable time window.
The payload is 1 when a stale value is detected and 0 when normal.
kelvin_out_of_range_detection¶
Validates whether values fall within an expected range.
The payload is a count of the out-of-range values detected.
kelvin_outlier_detection¶
Uses statistical methods to detect outliers over a moving window.
The payload is a count of the statistical outliers detected.
kelvin_data_availability¶
Ensures the expected number of messages are received in a given time window.
The payload is the number of messages actually received divided by the number of messages expected in that window, expressed as a percentage.
| Value | Meaning |
|---|---|
| Below 100% | Fewer messages arrived than expected. Data is missing, delayed, or the Connector is offline. |
| 100% | Exactly the expected number of messages arrived. |
| Above 100% | More messages arrived than expected. The Connector is producing data faster than the configured rate. |
Warning
A value above 100% is not a bonus, it is a mismatch between the configured expectation and what the Connector is actually sending.
For example, if the configuration expects 1 data point per minute and the Connector sends 4 data points per minute, the metric reports 400%, which is 300% more data than expected.
This matters because models and Applications are often built around a specific frequency or sampling rate, so receiving data far more often than expected can distort their calculations.
Treat a value above 100% the same way you treat a low one. Do not act on the data, and raise it with your Platform Administrator so the Connector rate and the configured expectation can be brought back into line.
Note
If your Application gates its logic on availability, do not only test for a low value. Test that the value sits inside an acceptable band around 100%, so that an over-reporting Connector is caught as well as a silent one.