UNDROP STREAMLIT

Restores the most recent version of a dropped Streamlit object.

See also:

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

Syntax

UNDROP STREAMLIT <name>
Copy

Parameters

name

Specifies the identifier for the Streamlit object to restore.

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.

Access control requirements

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

Privilege

Object

Notes

OWNERSHIP

Streamlit object that you restore

CREATE STREAMLIT

Schema where you restore the Streamlit object

CREATE STAGE

Schema where you restore the Streamlit object

This privilege is only required to undrop Streamlit objects that were created with the legacy ROOT_LOCATION parameter.

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema. Note that a role granted any privilege on a schema allows that role to resolve the schema. For example, a role granted CREATE privilege on a schema can create objects on that schema without also having USAGE granted on that 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.

Usage notes

  • Streamlit object can only be restored to the database and schema that contained the Streamlit object at the time of deletion.

  • If a Streamlit with the same name already exists, an error is returned.

  • 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.

Example

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

UNDROP STREAMLIT hello_streamlit;
Copy