The user wants a "self-service data quality incident workflow."
Key components requested:
Detection Triggers: How the incidents start.
Auto-triaged Severity: Determining how bad the issue is automatically.
Remediation SLAs: Timeframes for fixing things.
Target Audience/Context: This is for a Data Engineering or Data Platform team in a medium-to-large organization where data consumers (analysts, data scientists, business users) rely on data pipelines.
High-Level Architecture:
Monitoring/Observability Layer: Tools like Great Expectations, Monte Carlo, dbt tests, or custom SQL checks.
Orchestration/Triage Layer: The brain. Takes signals, calculates severity, assigns owners.
Ticketing/Workflow Layer: Jira, ServiceNow, PagerDuty, or a dedicated data catalog (e.g., Atlan, DataHub) interface.
SEV-3 (Medium): Tier 3 table + Quality test failure (minor).
SEV-4 (Low): Warning/Skippable.
Phase 3: Self-Service & Remediation (The "Fix")
"Self-service" implies the user (consumer) has visibility and perhaps agency.
Workflow:
Alert triggered.
Automated ticket created with context (SQL snippet, log link, impact graph).
SLA definition:
SEV-1: 1 hour response, 4 hour fix.
SEV-2: 4 hour response, 24 hour fix.
SEV-3: 1 business day.
Self-Service features:
"Mute" button (if expected).
"View Lineage" button.
"Assign to me" button.
Phase 4: The Workflow Steps (The "Flow")
Detect: Pipeline run finishes -> Tests run.
Enrich: Metadata lookup (Tier, Downstream count).
Score: Apply severity logic.
Route:
If Critical -> PagerDuty/Slack on-call.
If Non-Critical -> Ticket Queue/Slack Channel.
Remediate: Engineer fixes, merges PR, or re-runs.
Resolve: Ticket closed, test passes on next run.
Drafting the Content - Structure:
Architecture Overview: Visualizing the stack.
Component 1: Detection (The Sensors): Specific test types.
Component 2: Auto-Triage Engine (The Brain): The algorithm for severity.
Component 3: The Workflow & SLAs (The Contract): Timelines and actions.
Component 4: User Experience (The Interface): What the user sees in Slack/Email.
Implementation Example (Code/Config): A pseudo-code example using dbt/Jinja/Python.
Refining the "Self-Service" aspect:
This is the differentiator. It's not just "monitoring." It means business users can acknowledge an incident or request a re-run without emailing the data team every time. Or, the data team can quickly acknowledge via a Slack button. Let's focus on the "Slack Bot" interaction model as it's the most common modern implementation.
Could be "backfill data," "notify upstream vendor," "pause dashboard."
Review against User Prompt:
Self-service? Yes, transparency + actions for stakeholders.
Detection triggers? Yes, defined types.
Auto-triaged? Yes, scoring logic included.
Remediation SLAs? Yes, defined by SEV level.
Output Format:
Use a structured design document format. Use Markdown tables for SLAs. Use code blocks for logic.
Self-Correction during drafting: I initially thought about making this specific to a tool like Monte Carlo. I should keep it agnostic but use "dbt + Airflow + Slack" as the reference architecture because that's the most relatable standard stack. I will include a specific "Severity Algorithm" section.
Let's write it out.
Outline:
System Architecture Diagram (Mental Model)
Step 1: Detection Strategy (The Triggers)
Step 2: Auto-Triage Logic (The Brain)
Step 3: Incident Lifecycle & SLAs
Step 4: The Self-Service Interface (Slack Bot)
Implementation Pseudo-Code
Refining the "Self-Service" part again: A stakeholder should be able to see why a report is broken without asking. The alert in the #analytics channel should say "This affects Report X and Dashboard Y."
Okay, ready to generate.
This design outlines a comprehensive Data Quality Incident Management System (DQ-IMS). It moves beyond simple alerting to a fully automated workflow that assesses impact, assigns severity, and enforces resolution timelines.
This solution utilizes a Metadata-Driven Architecture (e.g., dbt, Airflow, DataHub) integrated with an Incident Management Platform (e.g., PagerDuty, Jira, Slack).
1. System Architecture Overview
The workflow operates on a "Detect → Enrich → Route → Resolve" loop.
Detection is categorized by the nature of the failure, which dictates the initial response strategy.
Trigger Category
Detection Method
Example Scenario
Integrity
Schema Validation
A source system changed a column name from user_id to id.
Freshness
Time-Since-Update
The ETL pipeline finished, but the updated_at timestamp is > 24 hours old.
Volume
Row Count Anomaly
Row count dropped by 50% compared to the 7-day rolling average (partial load).
Validity
SQL Assertion
count(*) where order_value < 0 returns > 0.
3. Phase 2: Auto-Triage Logic (The Brain)
This is the core "Self-Service" logic. Instead of a human manually reading logs to decide if it's an emergency, the system calculates a Severity Score based on metadata.
The Scoring Algorithm
We calculate Severity_Score (0–100) using three vectors:
Data Criticality (Weight: 40%):
Defined in the Data Catalog (e.g., Gold tier = 40 pts, Silver = 20 pts, Sandbox = 0 pts).
Downstream Blast Radius (Weight: 40%):
How many Tier 1 dashboards or models depend on this data?
Calculation:Count(Dependencies) * 10 (Capped at 40).
Deviation Magnitude (Weight: 20%):
How bad is the error? (e.g., 100% nulls vs. 0.1% nulls).
Auto-Triage Table
Based on the score, the system assigns a Severity Level:
Score
Severity Level
Auto-Action
80–100
SEV-1 (Critical)
Page On-Call Engineer + Halt downstream pipelines.