All examples for Data Quality Checker

Sales Transaction Calculation Validation

Analyzes a sales orders dataset to detect calculation mismatches where total doesn't equal quantity times price. Demonstrates the consistency dimension by catching arithmetic errors and missing values in transactional data.

Input

What you provide to the skill

Analyze quality: order_id,qty,price,total
101,2,10.00,20.00
102,3,15.00,44.00
103,1,25.00,25.00
104,,20.00,
105,2,10.00,20.00

Output

What the skill generates for you

DATA QUALITY HEALTH CHECK REPORT
==================================================
Dataset: orders_data.csv
Records: 5
Columns: 4
Analysis Date: 2025-12-03
OVERALL QUALITY SCORE: 86/100 - GOOD
DIMENSION SCORES:
Completeness: 80/100 (Good)
Validity: 100/100 (Excellent)
Consistency: 52/100 (Poor)
Uniqueness: 100/100 (Excellent)
Accuracy: 100/100 (Excellent)
TOP 3 CRITICAL ISSUES (by impact)
--------------------------------------------------
1. CRITICAL - Missing Values in qty
Impact: HIGH | Affected: 1 rows (20.0%)
Issue: Column 'qty' has 1 missing values (20.0%)
Location: Column 'qty', 1 NULL values
Example: Rows [3] have missing qty
Fix: Investigate and fill missing values or remove rows with: df.dropna(subset=['qty'])
2. CRITICAL - Missing Values in total
Impact: HIGH | Affected: 1 rows (20.0%)
Issue: Column 'total' has 1 missing values (20.0%)
Location: Column 'total', 1 NULL values
Example: Rows [3] have missing total
Fix: Investigate and fill missing values or remove rows with: df.dropna(subset=['total'])
3. CRITICAL - Calculation Mismatch: total != qty × price
Impact: HIGH | Affected: 1 rows (20.0%)
Issue: Total amount does not match quantity × price calculation
Location: Rows [1]
Example: Row 1 - qty:3.0, price:$15.00, total:$44.00 (should be $45.00)
Fix: df['total'] = df['qty'] * df['price']
ACTIONABLE RECOMMENDATIONS
--------------------------------------------------
IMMEDIATE ACTIONS (High Priority):
1. Missing Values in qty
Command: Investigate and fill missing values or remove rows with: df.dropna(subset=['qty'])
Impact: Resolves 1 affected rows
2. Missing Values in total
Command: Investigate and fill missing values or remove rows with: df.dropna(subset=['total'])
Impact: Resolves 1 affected rows
3. Calculation Mismatch: total != qty × price
Command: df['total'] = df['qty'] * df['price']
Impact: Resolves 1 affected rows
ESTIMATED IMPROVEMENT IMPACT
--------------------------------------------------
Current Score: 86/100
Projected Score: 99/100 (after addressing critical issues)
Quality Gate Status: PASS