Limitations and unsupported features

Attention

This feature is available to accounts in AWS, Microsoft Azure, and GCP regions. AWS PrivateLink and Azure Private Link are not supported.

This topic describes the limitations on Streamlit in Snowflake. It also lists Streamlit features that are unsupported.

Account limitations when using Streamlit in Snowflake

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.

  • Accounts in the US government regions that support FedRAMP are not currently supported.

  • Using AWS PrivateLink or Azure Private Link is not supported.

Additional limitations when using Streamlit in Snowflake

The following sections describe additional limitations when you are using Streamlit in Snowflake.

Data limits on Streamlit apps

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 retrieved from 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.

Streamlit in Snowflake does not support external stages

Using external stages is not supported for Streamlit in Snowflake.

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 from files 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.

Limitations when using st.cache_data and st.cache_resource in Streamlit in Snowflake

st.cache_data and st.cache_resource are not fully supported in Streamlit in Snowflake. Caching only works within a single session. Cached values can’t be carried over to other sessions and shared between different users of a Streamlit app.

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 be loaded. Snowflake blocks loading code from any external domain, including scripts, styles, fonts, and iframe embedding. However, loading a subset of resources from Mapbox is supported.

When you use the st.map or st.pydeck_chart Streamlit commands, Mapbox provides the map tiles when rendering map content. Mapbox is a third-party application and is subject to Snowflake’s External 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 work
import streamlit.components.v1 as components
components.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 the Snowflake’s Shared Responsibility Model.

Multi-page Streamlit apps

Multi-page Streamlit apps are supported with the following considerations:

  • Multi-page Streamlit apps can only be created by using SQL commands. See Creating a Streamlit app by using SQL.

  • Individual page URLs are not supported.

  • Files uploaded to the /pages directory are visible within the ROOT_LOCATION of the named stage.

Some Snowflake context functions return empty fields or NONE

Snowflake context functions that begin with CURRENT_ (CURRENT_*) return either empty fields or NONE when used in Streamlit in Snowflake.

If you need to use CURRENT_USER in your app for personalization, logging, or data filtering, use st.experimental_user instead.

Integrated version control or CI/CD systems are not supported

Streamlit apps are not integrated with version control systems. App history or code changes are permanent and cannot be rolled back.

There is no integration with GitHub, GitLab, or other version control vendors.

App edits are viewable by app viewers

When a developer runs a Streamlit app while editing, the changes become live and are immediately available to app viewers.

Replication is not supported

Replication is not supported for Streamlit in Snowflake apps.

Unsupported Streamlit features

The following Streamlit features are not supported in Streamlit in Snowflake:

Troubleshooting Streamlit in Snowflake

The following scenarios can help you troubleshoot issues that can occur when working with Streamlit in Snowflake.

You cannot load the Streamlit app

Each Streamlit app running in Streamlit in Snowflake uses a unique subdomain.

Ensure that *.snowflake.app is on the allowlist in your network and can connect to Snowflake. When this domain is on the allowlist, your apps can communicate with Snowflake servers without any restrictions.

Streamlit in Snowflake uses WebSockets. You must ensure that WebSockets are not blocked in your network configuration.

Error

Could not reload streamlit files.
Error: 092806 (P0002): The specified Streamlit was not found.

Cause

The Snowflake WebSocket connection cannot reach the endpoint associated with the application.

Solution

Add *.snowflake.app to the allowlist on the organization’s firewall configuration.

You cannot access an external API

To access an external API, you must create a UDF specifying an external access integration, and call that UDF in a Streamlit app. For more information, see Using the external access integration in a function or procedure.

You cannot see your data or change your database

You might not be able to see your data or change database, warehouse, or role, because Streamlit apps run with owner’s rights, which means that they run with the privileges of the owner, not the privileges of the caller. Streamlit apps use the database and schema that the Streamlit in Snowflake app was created in, not the database and schema that the caller is currently using.

For more information, see Understanding owner’s rights and Streamlit in Snowflake apps.

Streamlit library feature does not work

Ensure you use Streamlit library version and a feature that are supported by Streamlit in Snowflake. For more information, see Supported versions of the Streamlit library and Unsupported Streamlit features.

For support on writing code for Streamlit apps, see Streamlit Community Forum.

-