Simplifying Cross-Environment Deployments: A Streamlit Solution for Snowflake Code Migrations

Discover how Lumendata’s Streamlit-based tool streamlines Snowflake code migrations, enabling seamless deployments across environments.

Share this on:

LinkedIn
X

What You'll Learn

LumenData’s expertise in data platforms have enabled us to work with diverse clients, be it pharma, retail or fintech. Recently with one of our online retail clients ,we helped them with setting up Snowflake from scratch and migrating most of their workloads to the consolidated Snowflake warehouse. 

As the client had a lean team of technical experts, we were tasked with migration of Snowflake objects(tables, views, stored procedures, and functions) from lower env to higher env i.e., (dev->qa and qa->prod). 

We began with simple Snowflake based stored procedure, but it got evolved to Streamlit based application that helped both technical and non-technical stakeholders to migrate code from lower to higher environments.

The Migration Challenge

Data/code migrations between environments are a standard part of the data engineering lifecycle. However, this comes with several challenges:

LumenData’s Solution

As part of a standard practice, the data industry follows below practices:

We are in the process of building and standardizing these processes in upcoming phases. But for initial phases and kickstart the migration process we developed this solution:

Our Streamlit based approach sits in a sweet spot and particularly valuable because:

Finally, there is no universal “correct approach” – the optimal solution is dependent on specific client needs, technical maturity and expertise, team composition. Our solution specifically caters to organizations transitioning towards self-service data operations and maintaining appropriate controls with limited technical expertise.

The Snowflake-Streamlit Code Migration Tool

We have already discussed in detail reg client challenge and solution approach. Let’s deep dive into functionality and implementation.

Core Functionality

The application guides users through a simple workflow:

1. Source selection – Choose the source database, schema, object type, and specific object

2. Target Configuration – Select the target environment (QA/PROD) and customize database/schema names

In the highlighted section, we can see the application has skipped target environment creation as Target database and schema already exists. In case target database and schema doesn’t exist, it creates env automatically. (Need proper access and permissions for the same)

3. Preview changes – Review the original and modified DDL statements side-by-side

Once clicked on Initiate Migration Button, it validates source database schema, object and target database schema. If validation is successful, then it proceeds with previewing of Original and Modified Statements.

4. Confirmation and execution – Verify and execute the migration with proper safeguards

We can see from the above screenshot, once the user confirms the migration, the codes get migrated to respective environments.

Advantages of the UI-Based Approach

Democratized Data Operations

Process Standardization

Operational Efficiency

Future Enhancements

We are still working on improving and enhancing this tool that would improve efficiency for larger releases.

Enhanced Validation: Working on adding strong pre-validation checks that could verify relevant dependencies exists in the target environment before attempting migration.

Migration Templates: We are in the process of creating migration templates that would further help the process for frequently migrated objects.

Simplified and Enhanced UI: Streamlit offers rich UI experience, and we are leveraging further to optimize and enhance UI to make it more user friendly.

Also Read: Migration from Oracle Exadata to Snowflake

About LumenData:

LumenData is a leading provider of Enterprise Data Management, Cloud and Analytics solutions and helps businesses handle data silos, discover their potential, and prepare for end-to-end digital transformation. Founded in 2008, the company is headquartered in Santa Clara, California, with locations in India. 

With 150+ Technical and Functional Consultants, LumenData forms strong client partnerships to drive high-quality outcomes. Their work across multiple industries and with prestigious clients like Versant Health, Boston Consulting Group, FDA, Department of Labor, Kroger, Nissan, Autodesk, Bayer, Bausch & Lomb, Citibank, Credit Suisse, Cummins, Gilead, HP, Nintendo, PC Connection, Starbucks, University of Colorado, Weight Watchers, KAO, HealthEdge, Amylyx, Brinks, Clara Analytics, and Royal Caribbean Group, speaks to their capabilities. 

For media inquiries, please contact: marketing@lumendata.com.

Authors

Picture of Ritesh Chidrewar
Ritesh Chidrewar

Senior Consultant

resources

Read our Case Studies