Almost every migration plan we review has a line item that looks small on paper and never is. It usually reads "convert stored procedures."

Moving tables and data into Snowflake is well understood. The business logic buried in the source database is another matter: years of functions, cursor loops, error handlers and dynamic SQL, often written by people who left long ago. That code has to work on day one, and rewriting it by hand is slow and surprisingly inconsistent. Give five good engineers the same procedure and you get five different versions back.

We at the Snowflake CoE at TechStar built something to fix it.

What we built

The TechStar Code Conversion Agent is an AI-assisted accelerator that lives entirely inside a customer's Snowflake account. An engineer pastes a PostgreSQL function or procedure into Snowflake Intelligence and has a conversation with the agent. Back comes Snowflake-native code, with a plain explanation of what changed and why. Anything that can't be converted cleanly is flagged for human review rather than guessed.

How it works

The design has three layers, and every one of them is native to Snowflake:

  • Conversation. Snowflake Intelligence is the front door. Engineers work in a familiar chat that remembers context, so they can ask follow-ups or refine a conversion.
  • Intelligence. A Cortex Agent orchestrates the work. It plans each step, writes the conversion and checks its own output.
  • Knowledge and tools. Cortex Search retrieves from a knowledge base our team curated from real migration work: type mappings, function equivalents and the procedural patterns that trip people up. The agent also consults Snowflake's own documentation and calls stored procedures that compile, test and save the result.

Every request follows the same path. The agent confirms the code is in scope, pulls the relevant rules, verifies the target syntax, then converts and reviews its work against a quality checklist. It compiles the result in Snowflake, retrying if needed, runs it in a sandbox and saves it to a central repository with its status. Project leads can see at a glance what's validated, what's converted and what still needs a person.

What it means for the business

  • Shorter timelines. Line-by-line rewriting becomes review and approval, and senior engineers spend their time on the genuinely tricky logic.
  • Consistent output. Every response follows the same structure, so code reviews go faster and maintenance gets easier.
  • Lower risk. Compile and execution checks happen before code reaches a sprint, so testing brings fewer surprises.
  • Nothing leaves the account. No outside servers, API keys or third-party endpoints. That matters to our clients in financial services, mortgage and other regulated industries.
  • Progress one can measure. Every result is logged with a status, so leaders track conversion quality across the program instead of estimating it in status meetings.

Why Snowflake made this possible

Not long ago, a tool like this needed its own stack: a model host, a vector database, an orchestration layer and plenty of glue code. With Cortex Agents, Cortex Search and Snowflake Intelligence, all of it is native. The warehouse behind it is extra-small and suspends after a minute idle, and access runs through the role-based security customers already manage.

We see this as one of Snowflake's real competitive advantages: the AI comes to the data and code, not the other way around. Once business logic runs next to the data, it benefits from the same governance, AI services and analytics.

Built to go beyond PostgreSQL

We started with PostgreSQL because that's where our clients asked for help first. The design was never tied to one database, though. The agent's expertise lives in its knowledge base rather than in hard-coded logic, so teaching it a new dialect is mostly a matter of adding knowledge.

Oracle PL/SQL is the next knowledge base on our roadmap, and the same approach carries over to SQL Server, Teradata and other legacy platforms. The next phase also adds client- and department-specific knowledge, such as naming standards and in-house patterns, and extends coverage beyond procedures to tables, views and data manipulation scripts.

Where to start

If you have a migration on the table, or one that has stalled on procedural code, we'd like to help. We're offering a complimentary migration assessment: we take a sample of your stored procedures, run them through the agent and walk your team through the results.

Book your free migration assessment with the TechStar Snowflake CoE →

TechStar Group is a Dallas-based Snowflake Select Services Partner helping enterprises modernize their data platforms, migrate to Snowflake and put Snowflake Cortex AI to work.