Row counts matched, all tests green — cloud migration still hid a 1.6% net revenue gap

Trishiaa_Pinyons17 · reddit · 2026-11-30

A data engineer recounts a close call: their VP promised the board enterprise AI agents over portfolio and revenue data by Q2, but the core warehouse is a 14-year-old on-prem SQL Server held together by giant stored procedures mixing business logic, ad-hoc data fixes, even HTML email sending — with virtually no documentation.

During a staging cutover, row counts matched perfectly and all dbt schema tests passed, yet finance manually found a 1.6% gap in historical net revenue. Root causes: null handling, decimal rounding, timezone differences, and an undocumented soft-delete flag buried in an old view — none raised errors, so automated tests missed them. The Cygnet team pushed them to slow down and audit deeper, uncovering 50 unused tables; they now compare actual data at partition level instead of trusting row counts and schema tests.

The lesson: the scariest data engineering failures aren't queries that crash at 3 AM — they're ones that execute successfully, return plausible numbers, and quietly feed wrong figures into financial reports.

Related event: Legacy Data Warehouse Migration Misses 1.6% of Revenue Ahead of Enterprise AI Push(2 posts)→

Original post →

More from coding & agent

coding & agent channel →