Enterprises often have hundreds or even thousands of legacy SQL queries or stored procedures written in platforms like SQL Server, Teradata, or Snowflake.
Migrating these to Databricks manually can be slow, tedious, and error-prone — each procedure needs to be re-written, validated, and tested, often involving repetitive work across teams.
In customer engagements, this migration effort repeatedly showed up as a bottleneck in modernization projects. That inspired the creation of BrickMod — a field-developed Databricks-native AI tool that makes this process faster, smarter, and more reliable.
BrickMod is an interactive web app that leverages Databricks AI models to automatically translate SQL procedures and business logic into Databricks-ready SQL or PySpark code.
It’s designed for both individual developers who want quick conversions and teams who need to automate migrations at scale.
The app is divided into three main tabs — each representing a key stage in the migration journey:
This mode is perfect for testing and fine-tuning individual procedures.
This mode is optimized for enterprise-scale migrations where hundreds of files must be processed efficiently.
This ensures quality and accuracy at the tabular level.
🧠 AI-Powered Conversion – Uses LLMs to interpret and re-generate SQL logic
⚡ Databricks-Native – Built using Databricks Apps, DBSQL, Spark parallelism, and Delta tables
🧩 Configurable Prompts – LLM prompts are stored in YAML files, allowing prompt iteration without changing code
🌓 Dark/Light Mode – Simple toggle to personalize your workspace
🔁 Version-Controlled in GitHub – The entire app is maintained in a GitHub repository with full version control for collaboration and tracking
In customer migrations, BrickMod has delivered significant efficiency gains. Teams have seen up to 10× faster conversion of legacy SQL scripts, while automated validation has eliminated manual review cycles. Data engineers experience instant productivity boosts, and organizations benefit from lower migration costs and shorter project timelines.
One of the biggest strengths of BrickMod ➜ Databricks AI is how easy it is to get started.
The GitHub repository comes with a ready-to-run Databricks notebook that handles the entire setup process automatically.
Simply open the notebook in your own Databricks workspace and run it — the notebook will install all required dependencies, deploy the BrickMod web app directly into your workspace, and launch it instantly so you can start converting SQL right away. No manual configuration, no environment setup — just run the notebook and the app is ready to use.
This makes BrickMod not only powerful, but also incredibly simple to deploy across teams or customer environments.
For model selection and performance tuning, follow the official Databricks documentation on foundation model selection.
For very large batch conversions, BrickMod performs best when you use the AI Functions optimized models. These models are specifically tuned for higher throughput and lower latency, making them ideal for large-scale migrations.
When converting very large stored procedures, the LLM may occasionally truncate the output if the procedure is too long to fit within model response limits.
To handle this efficiently, BrickMod allows the same logic to be converted into individual SQL cells within a Databricks notebook instead of a single stored procedure.
This approach ensures complete conversion and better readability, especially for long or complex scripts.
With BrickMod ➜ Databricks AI: Migrate & Modernize, teams can accelerate their modernization journey — converting complex SQL logic into Databricks-ready code in seconds.
The solution is fully version-controlled in GitHub, includes a self-installing Databricks notebook, and is designed to be both developer-friendly and enterprise-ready.
It reduces migration effort, improves reliability, and lets engineers focus on innovation rather than repetitive syntax work.
👉 Watch the demo video above to see how easily BrickMod can be deployed and used within your own Databricks workspace!
GitHub Repository - https://github.com/mohanab89/databricks-migrator-with-llm
Credits
This project was developed by Mohana Basak with contributions from Mehran Golestaneh, who played a key role in building and testing the solution.
Disclaimer
This project and the accompanying app are not official Databricks products. They are community-built resources provided as-is, with no dedicated ongoing support. Please review and test in your environment, as they are intended for use at your own risk.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.