From DML soup to dbt structure: Ecolab's migration story
Ecolab and Datafold used an AI migration agent to rebuild a decade of tangled Snowflake logic as clean, documented dbt models.
Overview
Ecolab's legacy pipelines had unclear lineage and complex code. Working with Datafold, they migrated thousands of DML statements using AI-powered tools to convert legacy logic into modern dbt while maintaining data integrity, idempotency, and validation against original systems.
What you'll take away
- 01
Ecolab's "base model" spanned 400-plus interdependent dimensions and facts fed by 3,000-plus source systems, complex enough that the company created a dedicated "firefighter" role just for production issues.
- 02
A migration agent mapped the full lineage and codebase, pulled in institutional knowledge from wikis and meeting recordings, and checked every translated model against production data through automated diffing.
- 03
For one flagship dimension, the rebuild cut the model count from 409 to 170 and removed roughly 70,000 lines of code; across the full migration, Ecolab is seeing roughly 6x less code and 4x fewer data connections.
Session speakers
Tomasz Kaczmarek
EcolabChiel Fernhout
Datafold