Area: Observability
Sub-Area: Data Quality
Issue
Data quality assertions configured in DataHub are not executing as expected, showing as failed, or not providing results. This can be caused by incorrect assertion configuration, connectivity issues with the data source, or insufficient permissions for the assertion to run queries.
Common Error Messages:
Assertion execution failedUnable to connect to data source for assertion evaluationTimeout while executing assertion queryPermission denied when running assertion
You Might Be Asking:
- How do I debug failed assertions?
- Why aren't my assertions running on schedule?
- What permissions are needed for assertions to work?
Solution
Verify assertion configuration through the UI:
- Go to dataset → Quality tab
- Check assertion details and schedule
- Review assertion query syntax
Test assertion connectivity:
# Ensure DataHub can connect to your data source
# Check the assertion monitor logs
kubectl logs -f | grep assertion
- For custom SQL assertions, validate the query:
-- Test your assertion query directly in the source
SELECT COUNT(*) FROM your_table WHERE condition_fails;
-- Should return 0 if assertion passes
- Grant necessary permissions for assertion execution:
Example for Snowflake. This can be adapted for other data sources/connectors.
-- Example for Snowflake
GRANT SELECT ON TABLE your_table TO ROLE datahub_assertions_role;
GRANT USAGE ON WAREHOUSE your_warehouse TO ROLE datahub_assertions_role;
- Check assertion schedule and execution history:
query {
dataset(urn: "YOUR_DATASET_URN") {
assertions {
runEvents(status: FAILURE, limit: 10) {
result {
type
nativeResults
}
}
}
}
}
Additional Notes
Assertions require DataHub Actions to be running. For managed DataHub, assertions are handled automatically. For self-hosted, ensure the datahub-actions container is deployed and properly configured.
Related Documentation
Tags:
assertions, data-quality, observability, monitoring, validation, data-contracts, datahub-actions, execution-failure