Skip to content
Lucas Lessa
Voltar para as notícias
SnowflakeGAImpacto: Alto

Embedding Streamlit in external pages in Snowflake

Snowflake now allows embedding Streamlit apps in external web pages using an iframe tag, supporting viewers with or without a Snowflake account.

O que mudou

Embedding Streamlit apps in external pages is now generally available. You can render an app directly inside a customer portal or internal dashboard using a simple iframe tag.

Use cases

Imagine you built a Streamlit dashboard and need to make it available inside your company portal without requiring users to open Snowsight.

  • Display apps to public viewers or users without a Snowflake account using a dedicated service user.
  • Display apps to Snowflake-provisioned users while enforcing individual data privileges.
  • Control which external domains are allowed to load the application inside an iframe.

How to use

Your application backend makes an HTTPS request to generate a temporary embed URL via the REST API:

POST /api/v2/databases/{database}/schemas/{schema}/streamlits/{name}:generate-embed-url

An account administrator must also grant the required privilege on the application:

GRANT USAGE ON STREAMLIT mydb.public.my_app TO ROLE embed_minter;
GRANT EMBED ON STREAMLIT mydb.public.my_app TO ROLE embed_minter;

What happens in this code:

  1. The command grants usage privilege on the Streamlit app to the specified role.
  2. The command grants the new EMBED privilege required to generate embedding URLs.

Limitations and requirements

  • The feature is generally available (GA).
  • Government and China regions are not supported.
  • Minting an embed URL requires the new EMBED privilege in addition to USAGE.
  • The external page origin domain must be pre-registered by an account administrator.
Ver nota oficial do Snowflake

Embedding Streamlit in Snowflake apps in external pages (General availability)

Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.

Relacionadas