You can export the actual calculated output from each of the asset/data streams for each available Data Quality Check. Kelvin provides five built-in Checks plus the overall Data Quality Status, and developers can also create their own custom Data Quality Applications - all of which can be accessed using this method.
The key is using the KRN dqad instead of ad when collecting data from an asset/data stream's timeseries data.
Reference:
Field
Description
start_time
Start time for the Data Quality Score export. Time is based on UTC timezone, formatted in RFC 3339.
end_time
End time for the Data Quality Score export. Time is based on UTC timezone, formatted in RFC 3339.
resource
The Kelvin Resource Name (KRN) identifying the data quality metric. Format: krn:dqad:{name}:{asset}/{datastream} for datastream-level or krn:dqasset:{name}:{asset} for asset-level scores.
order
Sort order of the returned data. Valid values: ASC (ascending) or DESC (descending). Default is ASC.
agg
Optional aggregation function to apply to the data (e.g., avg, min, max, sum, count).
time_bucket
Optional time interval for data aggregation (e.g., 1h for 1 hour, 5m for 5 minutes).
group_by_selector
Boolean flag to group results by resource selector. Default is true.
Available Data Quality Checks:
Name
Description
score_data_quality
Overall Data Quality Status (0-100) calculated from all configured Checks. This is not a Check itself.
data_availability
Measures data availability percentage within expected time windows.
timestamp_anomaly
Detects anomalies in data timestamps (e.g., out-of-order, duplicate timestamps).
stale_detection
Identifies when data becomes stale based on configured time windows.
fromkelvin.api.clientimportClient# Loginclient=Client(url="https://<url.kelvin.ai>",username="<your_username>")client.login(password="<your_password>")# Export Data Quality Scores for a Data Streamresponse=client.timeseries.download_timeseries_range(data={"start_time":"2026-02-18T10:00:00.000Z","end_time":"2026-02-18T15:00:00.000Z","order":"ASC","selectors":[{"resource":"krn:dqad:score_data_quality:docs-demo-asset/docs-demo-data-stream"}],"group_by_selector":True})# Convert the response into a Pandas DataFramedf=response.to_df()# Print the resultprint(df)
fromkelvin.api.clientimportClient# Loginclient=Client(url="https://<url.kelvin.ai>",username="<your_username>")client.login(password="<your_password>")# Export Asset-level Data Quality Scoresresponse=client.timeseries.download_timeseries_range(data={"start_time":"2026-02-18T10:00:00.000Z","end_time":"2026-02-18T15:00:00.000Z","order":"ASC","selectors":[{"resource":"krn:dqasset:score_data_quality:docs-demo-asset"}],"group_by_selector":True})# Convert the response into a Pandas DataFramedf=response.to_df()# Print the resultprint(df)
In this example we will export multiple Data Quality metrics simultaneously, including overall scores, data availability, and anomaly detection results.
There is no Kelvin UI option to download data quality score data.
fromkelvin.api.clientimportClientimportpandasaspd# Loginclient=Client(url="https://<url.kelvin.ai>",username="<your_username>")client.login(password="<your_password>")# Export Multiple Data Quality Metricsresponse=client.timeseries.download_timeseries_range(data={"start_time":"2026-02-18T10:00:00.000Z","end_time":"2026-02-18T15:00:00.000Z","order":"ASC","selectors":[{"resource":"krn:dqad:score_data_quality:docs-demo-asset/docs-demo-data-stream"},{"resource":"krn:dqad:data_availability:docs-demo-asset/docs-demo-data-stream"},{"resource":"krn:dqad:timestamp_anomaly:docs-demo-asset/docs-demo-data-stream"},{"resource":"krn:dqad:out_of_range_detection:docs-demo-asset/docs-demo-data-stream"}],"group_by_selector":True})# Convert the response into a Pandas DataFramedf=response.to_df()# Print the resultprint(df)# Optional: Pivot the data for easier analysispivot_df=df.pivot(index='timestamp',columns='resource',values='payload')print("\nPivoted view:")print(pivot_df)