A readout to a client's leadership team
Case study

Mailgun closed the data-loss gap in its revenue pipeline

Invoice locking and revenue exceptions ran by hand, and the revenue pipeline could lose data.

Mailgun

Mailgun · Finance and reporting

60%less manual work on invoice locking and exceptions

The workflow before

Mailgun's data engineers locked invoices and handled revenue exceptions by hand each cycle. The revenue pipeline overwrote records in place, so a bad load could lose data. Matillion jobs had no version control, loading and querying shared the same Snowflake compute, and machine learning models were trained and versioned without proper orchestration.

What we built

We audited Mailgun's Matillion and Snowflake setup end to end and designed a revenue pipeline built on append-only tables, so every invoice state is kept and nothing is overwritten.

We laid out the path to Matillion Enterprise for Git version control and high availability, separate Snowflake warehouses for loading and querying, and zero-copy clones for safe testing. For machine learning, we set out a move to a cloud ML environment with automated training and model versioning.

Before and after

MeasureBeforeAfter
Revenue records overwritten on reloadPossible on every load0, append-only tables
Invoice locking and exceptionsManual each cycleAbout 60% less manual work
ETL version controlNoneGit-backed via Matillion Enterprise

What's next

A reliable revenue history is the foundation for L2 work: an assistant that answers finance questions over billing data, and anomaly checks that flag revenue exceptions before close.

ShareLinkedInEmail

The revenue pipeline moves to append-only tables: each invoice change is a new row with its timestamp, and current state is derived, which removes the overwrite path that caused data-loss risk and gives finance an audit trail.

In Snowflake, loading and querying run on separate virtual warehouses to control cost and contention, and zero-copy cloning gives engineers full test copies without duplicating storage. Matillion Enterprise adds Git integration and high-availability clustering.

The MLOps plan moves model training into a cloud-native environment with automated training runs and versioned models.

Next step

Let's build the case study we tell next.