How to Build your First Streamlit App in Snowflake

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”:

A screenshot of a computer  AI-generated content may be incorrect.

Click on the “+ Streamlit App” button:

A screenshot of a computer  AI-generated content may be incorrect.

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. 

A screenshot of a streamlit app  AI-generated content may be incorrect.

Next, write the Streamlit app code. The code has 6 sections:

  1. Import packages
  2. App Title
  3. App text
  4. Query Text
  5. Query Execution
  6. 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

A graph on a computer screen  AI-generated content may be incorrect.

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:

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

Scroll to Top