Area: Observability
Sub-Area: Incident Response
Applies to: OSS + Cloud
Issue
Data incidents (quality issues, downtime, pipeline failures) are not being tracked or communicated in DataHub, or the incident workflow is not clear. You need a way to raise, resolve, review and automate incidents.
You Might Be Asking
- How do I create and track data incidents?
- Can DataHub integrate with our incident management system?
- How do I notify stakeholders about data issues?
Cause
Incidents are available in both DataHub OSS and DataHub Cloud. An incident has one of two sources: MANUAL (a person raises it in the UI or through the API) or ASSERTION_FAILURE (a failed assertion raises it).
Most setups need you to raise incidents yourself or turn on automation. In DataHub Cloud, a new assertion starts with no actions, so you turn on the incident actions yourself. The SQLMesh source is an exception. Once you give it an audit results file with audit_results_path, it raises an ACTIVE incident for each failed audit that matches an assertion, because emit_incidents_on_failure defaults to true. The Monte Carlo source has the same option, but it is off by default.
Several commonly copied snippets do not work against DataHub. These include an incident type of DATA_QUALITY, a raise_incident Actions plugin, and an updateIncident call that carries the urn inside the input.
Solution
1. Raise an incident in the UI
- Open the asset's profile page.
- Click the 3-dot menu on the right side of the header.
- Click Raise Incident.
You need the Edit Incidents privilege to create or remove incidents on an asset.
The asset's Incidents tab is where you view incidents and resolve them with the Resolve button. To find every asset with an active incident, apply the Has Active Incidents filter on the search results page.
2. Raise an incident with GraphQL
raiseIncident returns a String, so do not add a selection set. type takes one of FRESHNESS, VOLUME, FIELD, SQL, DATA_SCHEMA, OPERATIONAL or CUSTOM. priority takes an enum name: CRITICAL (P0), HIGH (P1), MEDIUM (P2) or LOW (P3). There is no P4. status is an object, and you can omit it.
mutation raiseIncident {
raiseIncident(
input: {
type: OPERATIONAL
title: "Sales table contains negative amounts"
description: "Discovered negative values in amount column"
priority: CRITICAL
resourceUrn: "urn:li:dataset:(urn:li:dataPlatform:snowflake,db.schema.sales,PROD)"
status: { state: ACTIVE }
}
)
}
If you use type: CUSTOM, also set customType.
3. Resolve or re-open an incident with GraphQL
The urn is a separate argument, and the status fields go inside input.
mutation resolveIncident {
updateIncidentStatus(
urn: "urn:li:incident:12345"
input: {
state: RESOLVED
stage: FIXED
message: "Fixed by correcting upstream ETL job"
}
)
}
stage is optional. Its values are TRIAGE, INVESTIGATION, WORK_IN_PROGRESS, FIXED and NO_ACTION_REQUIRED. To edit other fields, use updateIncident(urn, input), which only changes the fields you pass.
4. Query incident history
query {
dataset(urn: "YOUR_URN") {
incidents(start: 0, count: 20) {
total
incidents {
urn
incidentType
title
priority
incidentStatus {
state
stage
message
}
}
}
}
}
5. Automate incident creation
- DataHub Cloud: In the assertion builder's actions step, turn on Auto-raise incident and Auto-resolve active incident. Auto-resolve only resolves incidents that the same assertion's failures raised. Other incidents are not affected. See Freshness assertions.
-
SQLMesh source: Set
audit_results_pathto your audit results JSON file. Failed audits that match an assertion then raise incidents by default. See the SQLMesh source.
6. Notify people and connect external tools (DataHub Cloud)
- Notifications: Subscribe to an asset and choose Incident status changes. Notifications go to Slack, Microsoft Teams or email. Email is on by default. Slack and Teams need their apps installed first.
-
Events for external tools: The Entity Events API emits an Incident Change Event when an incident is created or its status changes. It has category INCIDENT and operations ACTIVE and RESOLVED. To consume these events, use a DataHub Actions pipeline with source type
datahub-cloud. The token's user or service account needs the Get Platform Events privilege. To forward events to your incident tool, write your own Action. SubclassAction, implementcreateandact, and reference it astype: "module.path:ClassName".
acryl-datahub-actions 1.7.0.20 registers no plugin named raise_incident.
Related Documentation
- Incidents Guide
- Slack notifications for incidents (Cloud)
- Subscriptions and notifications (Cloud)
- Freshness assertions (Cloud)
- SQLMesh source
- Entity Events API (Cloud)
- DataHub Cloud event source for Actions
- Observability
Tags: incidents, data-downtime, incident-management, data-quality, observability, sla, data-reliability, alerting