By Deiby Gómez
Photo by Mark Basarab on Unsplash
As Data Engineers, we focus on building robust data pipelines, optimizing queries, and ensuring data reliability at scale. With Streamlit now available in Snowflake, you can build and deploy interactive data apps directly inside your Snowflake environment. There’s no need to leave the platform or set up external infrastructure. This allows Data Engineers to create lightweight dashboards, data tools, and prototypes using Python and SQL where the data already lives.
This guide walks through how to create your first Streamlit app inside Snowflake, step by step. Whether you’re new to Streamlit or exploring its integration with Snowflake, this gives you a practical starting point. You’ll run a SQL query, execute it in Snowflake, and visualize the results with interactive charts—all from a Streamlit app hosted in your Snowflake account.
Creating the app:
In the left menu of Snowflake, look for “Projects” and click on “Streamlit”:
Click on the “+ Streamlit App” button:
Enter the app name, the database and schema where the app will be created, and the warehouse that will process the data. Click the “Create” button.
Next, write the Streamlit app code. The code has 6 sections:
- Import packages
- App Title
- App text
- Query Text
- Query Execution
- Query visualization (Line chart)
# Import python packages
import streamlit as st
import pandas as pd
from snowflake.snowpark.context import get_active_session
# App Title
st.title(f"My first Streamlit App")
# App Text
st.write(
"""Hello Snowflake community! this is an example of how to develop an Streamlit app in Snowflake"""
)
# Get the current credentials
session = get_active_session()
# SQL Text
sql = """
SELECT TS, FORECAST FROM SOURCE_DB.FORECAST.FORECAST_DATA
WHERE SKU=3247
AND STORE_ID=1001
ORDER BY 2
"""
# Execute the SQL
result=pd.DataFrame(session.sql(sql).collect())
# Query visualization (Line chart)
st.line_chart(result,x="TS",y="FORECAST")
Result:
Your Streamlit should look like this
Conclusion
You’ve taken your first steps into building interactive applications directly within Snowflake using Streamlit. You can now go beyond batch pipelines and data transformations, and create real-time dashboards and user-facing tools with minimal overhead.
The simplicity of combining SQL, Python, and Streamlit inside Snowflake makes it easy to prototype and deploy apps without additional servers or complex setup. And this is just the beginning—try adding filters, parameters, or more advanced visualizations to your app.
More Snowflake Blogs:
- Asking Business information using Natural Language in Snowflake with Cortex Analyst
- How to Forecast your sales in Snowflake
- How to update your lambdas to authenticate with SSH Keys in Snowflake
- The Definitive Guide to Analyzing Queries in Snowflake
- Snowflake-related blogs
- Snowflake Developer Resources
Deiby Gómez was the first Oracle ACE Director of Guatemala (2015-2023), he has 35 Technology certifications among them the highest certifications for Oracle Database (Oracle Certified Master, OCM) and three Advanced Snowflake Certifications (Architect, Administrator and Data Engineer). He is an engineer with two master’s degrees and a future lawyer. Deiby has been a speaker in Technology Events in more than 12 countries including Oracle Open World in San Francisco. Most recently, Deiby was selected as Snowflake Squad Member by Snowflake in 2025.
Build Your Future-Ready Digital Roadmap
Is your organization evolving to stay competitive?
We help you design a digital strategy that leverages current tech investments and prepares for what’s next.
We work across all major public cloud platforms to deliver scalable, practical solutions.
🔗 Visit Red Pill Analytics
📱 Connect with us on Twitter, Facebook, and LinkedIn
📚 For tips and insights, check out our blog or follow RPA on Medium