← All work

Automated Data-Quality Framework

Hazel Mobile · HEXA VPN · 2026
SQLPostgreSQLPythonData Quality
PDF
Case study
Live
Interactive demo
PDF
DQ Checks Explained
PDF
DQ Impact Report
PDF
SQL Highlights
PNG
Architecture diagram
DQ Checks Explained — cover.png
DQ Checks Explained — cover.png
DQ Impact Report — cover.png
DQ Impact Report — cover.png
SQL Highlights — cover.png
SQL Highlights — cover.png

Case Study 1 — Automated Data-Quality Framework (HEXA VPN)

Role: Data Analyst · Company: Hazel Mobile · Product: HEXA VPN app

Stack: PostgreSQL (advanced SQL) · Python · data-quality engineering

Deliverables: automated DQ check suite · before/after impact report · methodology guide · architecture diagram

Figures in this case study and its documents are illustrative / synthetic for portfolio use — they show the method, not real production data.

The Problem

HEXA VPN's dashboards reported a healthy connection success rate — but that headline counted every session that merely reported success. In reality, many of those weren't genuine wins: connections that dropped within seconds ("flaps"), sessions instantly replaced by an app bug, automated/bot traffic, corrupt records, and users who connected once and never returned. Leadership was making decisions on a number that overstated true product health. The company needed a way to measure the real success rate — and to know exactly why it differed.

What I Built

I designed an automated, read-only data-quality framework in SQL that scores the telemetry and reclassifies "fake" successes to failures — without ever deleting an event. It runs as three tiers of checks:

TierQuestion it answersExamples
Row-level (#1–#15)Is each record clean, valid, and plausible?timestamp validity, plausible session length, valid server IP, self-replace-bug, plus the data-integrity checks below
Behavioural (B1–B10)Is each account behaving like a real user?inactivity churn, bot/burst detection, one-and-done, country-hopping
Journey (T1–T3)Did the user get (and keep) a good session?flap (<30s), activation, next-day return, churn-risk

The row-level tier runs fifteen checks (#1–#15) in one modular pass — from basic record hygiene (valid timestamps, plausible durations, well-formed server IPs, the self-replace-bug guard) through to data-integrity and degraded-experience signals:

On top of the checks sits a before/after impact model: it computes the success rate as reported vs. the true rate after reclassification, splits the affected users into one-and-done vs. retained, and attributes the drop to individual checks. Attribution runs in priority order, so each check is credited only with the unique records it catches and the pieces always sum to the total.

The Techniques

The framework is a showcase of production-grade SQL:

Everything is SELECT-only and version-scoped, so it is safe to run against a live database.

The Impact

The framework surfaced a large gap between the reported and the true success rate (illustrative: ~92% reported → ~68% true) — and, just as importantly, explained it:

What's in this case study

Skills demonstrated: advanced SQL (CTEs · window functions · FILTER aggregates · CASE · subqueries) · data-quality engineering · data validation / self-checks · behavioural & churn analysis · analytical storytelling · stakeholder reporting.