UNDROP STREAMLIT

恢复已删除的 Streamlit 对象的最新版本。

See also:

CREATE STREAMLIT , ALTER STREAMLIT , DROP STREAMLIT , SHOW STREAMLITS , DESCRIBE STREAMLIT

语法

UNDROP STREAMLIT <name>

参数

name

指定要恢复的 Streamlit 对象的标识符。

If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

访问控制要求

If your role does not own the objects in the following table, then your role must have the listed privileges on those objects:

权限对象备注
OWNERSHIP您恢复的 Streamlit 对象
CREATE STREAMLIT恢复 Streamlit 对象的架构
USAGEWarehouse used by the Streamlit app
USAGECompute pool used by the Streamlit appThis privilege is only required if your app has a COMPUTE_POOL.
USAGEExternal access integrations used by the Streamlit appThis privilege is only required if your app has EXTERNAL_ACCESS_INTEGRATIONS.
USAGESecrets used by the Streamlit appThis privilege is only required if your app has SECRETS.
CREATE STAGE恢复 Streamlit 对象的架构仅当恢复使用旧版 ROOT_LOCATION 参数创建的 Streamlit 对象时,才需要此权限。

Operating on an object in a schema requires at least one privilege on the parent database and at least one privilege on the parent schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

使用说明

  • Streamlit 对象只能恢复到将其删除时包含该 Streamlit 对象的数据库和架构中。
  • 如果已存在同名 Streamlit,则返回错误。
  • UNDROP relies on the Snowflake Time Travel feature. An object can be restored only if the object was deleted within the Data retention period. The default value is 24 hours.

示例

The following example restores the most recent version of a dropped Streamlit named hello_streamlit:

UNDROP STREAMLIT hello_streamlit;