This topic describes the following limitations on Streamlit in Snowflake:
Account limitations
Unsupported Streamlit features
Limitations when loading external resources in Streamlit in Snowflake
Additional Streamlit in Snowflake limitations
Account limitations¶
Streamlit in Snowflake has the following account limitations:
Your Snowflake account must be located in an Amazon Web Services (AWS), Microsoft Azure, or Google Cloud Platform (GCP) region.
Using AWS PrivateLink or Azure Private Link is not supported.
Unsupported Streamlit features¶
The following Streamlit features are not supported in Streamlit in Snowflake:
The
page_title
andpage_icon
properties of thest.set_page_configcommand are not supported.The following experimental features:
Anchor links
Limitations when loading external resources in Streamlit in Snowflake¶
All Streamlit in Snowflake apps run within the Content Security Policy (CSP) that restricts which resources can beloaded. Snowflake blocks loading code from any external domain, including scripts, styles, fonts, and iframe embedding. However, loadinga subset of resources from Mapbox is supported.
When you use the st.map orst.pydeck_chartStreamlit commands, Mapbox provides the map tiles when rendering map content.Mapbox is a third-party application and is subject to Snowflake’sExternal Offerings Terms.
Loading images or media from external domains is supported in Streamlit in Snowflake, but not in the Snowflake Native App Framework.
For example, the following code runs without a Python error, but the script does not load or execute in the browser:
# This will not workimport streamlit.components.v1 as componentscomponents.html("""<script src="http://www.example.com/example.js"></script>""", height=0)
Copy
The CSP also blocks front-end calls that are generally considered unsafe, such as eval()
.
Note
App developers are responsible for security checks and software supply chain of Streamlit in Snowflake app code per theSnowflake’s Shared Responsibility Model.
Additional Streamlit in Snowflake limitations¶
Streamlit in Snowflake has the following additional limitations:
Using external stages is not supported.
Replication is not supported.
Streamlit apps have a limit for retrieving data.
The Streamlit in Snowflake editor does not support stages with server-side encryption.
st.cache_data and st.cache_resource are not fully supported.
Multi-page Streamlit apps are supported with some considerations.
Streamlit apps have a limit for retrieving data¶
Streamlit apps running in Streamlit in Snowflake and in a Snowflake Native App have a 32MB limit on the amount of data that can be retrievedfrom a single query. Queries that exceed 32MB throw the following error:
MessageSizeError: Data Size exceeds message limit
To avoid this limit, design your Streamlit apps to retrieve data in increments smaller than 32MB.
The Streamlit in Snowflake editor does not support stages with server-side encryption¶
The Streamlit in Snowflake editor does not support creating a STREAMLIT object fromfiles on a named stage that uses server-side encryption. In this situation, Snowsight returns an error.
Streamlit in Snowflake only supports internal stages that use client-side encryption.
st.cache_data
and st.cache_resource
are not fully supported¶
st.cache_data andst.cache_resource are notfully supported in Streamlit in Snowflake. Caching only works within a single session. Cached values can’t be carried over to othersessions and shared between different users of a Streamlit app.
Multi-page Streamlit apps are supported with some considerations¶
Multi-page Streamlit apps are supported with the following considerations:
Multi-page Streamlit apps can only be created by using SQL commands. See Create and deploy Streamlit apps using SQL.
Individual page URLs are not supported.
Files uploaded to the
/pages
directory are visible within the ROOT_LOCATION of the named stage.