Time Series
What this is
Validate datapoint behavior over time windows using CDF datapoints functions and optional INDSL functions.
When to use it
Use time-series validation when quality depends on temporal signal behavior:
- missing datapoints / stale signals
- gaps and sparse data
- outliers and implausible value ranges
This is critical for sensor-driven industrial monitoring.
Industrial examples
- A pressure sensor must report at least 50 datapoints in the last 60 minutes.
- Temperature series values must stay within expected operational bounds.
- A flow series should not flatline for extended periods during active production.
- A required sensor series must exist and receive recent datapoints for each critical asset.
Example (SHACL + SPARQL datapoint rule)
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix cdf_sdk: <https://cognite.com/cdf/sdk/> .
@prefix ex: <https://example.com/dm/> .
ex:MinimumDatapointsShape
a sh:NodeShape ;
sh:targetClass ex:TimeSeries ;
sh:sparql [
sh:message "Time series has too few datapoints in the last 60 minutes." ;
sh:select """
SELECT $this ?count WHERE {
BIND(cdf_sdk:datapoints_count($this, "60m-ago", "now") AS ?count)
FILTER(?count < 50)
}
""" ;
] .