Converts Snowflake SQL to Spark SQL automatically, so thousands of scripts are not rewritten by hand.
The situation
Thousands of production scripts had to move platforms. Rewriting them by hand would take months and introduce errors.
Legacy code holds decades of business rules that nobody can fully list. Manual rewrites are slow, and every hand-translated line is a chance to change behaviour by accident.
The idea behind the solution
A compiler front end parses source code into an abstract syntax tree, and a back end emits another language from that tree. Because the transformation is deterministic, it can be tested: the same inputs must give the same outputs before and after. Migration then proceeds in slices, with old and new running side by side until the comparison is clean.
Draws onAho, Lam, Sethi & Ullman, Compilers: Principles, Techniques, and Tools · Fowler, Refactoring, and the strangler-fig pattern
What we built
A transpiler that combines a rules engine, LLM translation and library-based validation. It was later reused on other programs.
01Snowflake SQL02Rules engine03LLM translation04Library validation05Spark SQL
- Deterministic rules for known patterns
- LLM translation for complex cases
- Validation against libraries before release
- Reusable across programs
What the business gained
Conversion that would take years by hand is done in months, with equivalence demonstrated by tests rather than asserted. The organisation leaves a scarce-skill platform without betting on a single cut-over.
- No manual rewrite of the script estate
- Reused on a later program
+Related
More from Databricks & Snowflake.
Petabyte lakehouse migration
A 3 PB move from Snowflake to Databricks with near-perfect data integrity.
3 PBmigrated
Read the story→SHASAN · MultinationalUnity Catalog governance
Governance for 500+ tables moved from Hive Metastore to Unity Catalog, with fine-grained security.
500+tables governed
Read the story→PURVA · RetailDemand analytics on Databricks
ML demand analytics that improved inventory accuracy while cutting platform cost.
35%better inventory accuracy
Read the story→Put an agent to work.
Tell us the workflow you want to change. An architect replies, and if there is a fit we scope a four-week proof of concept on your own data.

