Sharing Streamlit in Snowflake apps

This topic covers URLs for sharing Streamlit in Snowflake apps with or without the Snowsight interface.

应用程序 URLs

Each Streamlit in Snowflake app has two URLs: app-builder URLs that show the Snowsight elements and app-viewer URLs that hide them. This allows you to share view-only links with business users.

By default, sharing an app using the app-viewer URL lets end users change the URL to access other parts of Snowflake. To enforce restricted access to only app-viewer URLs, an administrator must configure the ALLOWED_INTERFACES user property. For more information, see Limit a user’s access to only Streamlit in Snowflake.

An administrator can also configure app-viewer URLs to redirect to your organization’s identity provider (IdP). For more information, see Essential security setup.

应用程序构建器 URLs

When you view an app from its app-builder URL, an object toolbar appears at the top of the app. The left side of the toolbar displays the app’s name. The right side of the toolbar displays the app’s status. Additionally, if you have the necessary privileges to edit the app, the toolbar contains an Edit button. If you have the necessary permission to share the app with other roles, the toolbar contains a Share button.

If you select any app from the Streamlit Apps page in Snowsight, a new tab opens to its app-builder URL. This URL has the following format:

https://app.snowflake.cn/<organization_name>/<account_name>/#/streamlit-apps/<app_database>.<app_schema>.<app_name>

应用程序查看器 URLs

When you view an app from its app-viewer URL, the app is displayed without any part of the Snowsight interface. To enforce restricted access to only app-viewer URLs, an administrator must configure the ALLOWED_INTERFACES user property. For more information, see Limit a user’s access to only Streamlit in Snowflake.

应用程序查看器 URL 具有以下格式:

https://app.snowflake.cn/streamlit/<organization_name>/<account_name>/#/apps/<url_id>

Your app’s url_id is returned by DESCRIBE STREAMLIT.

共享 Streamlit 应用程序

There are two sharing permission levels for Streamlit in Snowflake apps:

  • View and share: If a user visits the app-builder URL, they can view the app and share it with other roles.
  • View only: If a user visits the app-builder URL, they can only view the app. They can’t share it with other roles.

所有对该应用具有必要 USAGE 权限的角色均可访问应用程序查看器 URL,与分享选项无关。

要共享 Streamlit 应用程序,请执行以下步骤:

  1. Sign in to Snowsight.

  2. In the navigation menu, select Projects » Streamlit.

  3. 选择要共享的 Streamlit 应用程序。

  4. Select Share.

    The Share Streamlit app window opens.

  5. 要将角色添加到应用程序的共享列表,请开始键入角色的名称。

  6. 选择该角色的名称。

新角色将显示在角色列表中。

  1. 在角色右侧的下拉列表中,选择共享权限级别。

  2. To copy your app’s URL, select Copy link.

    • To copy the app-builder URL, select For app builders from the dropdown list.
    • To copy the app-viewer URL, select For app viewers from the dropdown list.

然后,可以通过电子邮件或短信发送此 URL。

  1. Select Done.