ALTER STREAMLIT

Modifies the properties of an existing Streamlit object.

See also:

CREATE STREAMLIT, SHOW STREAMLITS, DESCRIBE STREAMLIT, DROP STREAMLIT

Syntax

ALTER STREAMLIT [ IF EXISTS ] <name> SET
                                         [ ROOT_LOCATION = '<stage_path_and_root_directory>' ]
                                         [ MAIN_FILE = '<path_to_main_file>']
                                         [ QUERY_WAREHOUSE = <warehouse_name> ]
                                         [ COMMENT = '<string_literal>']
                                         [ TITLE = '<app_title>' ]
                                         [ IMPORTS = ( '<stage_path_and_file_name_to_read>' [ , ... ] ) ]
                                         [ EXTERNAL_ACCESS_INTEGRATIONS = ( <integration_name> [ , ... ] ) ]

ALTER STREAMLIT [ IF EXISTS ] <name> RENAME TO <new_name>
Copy

Parameters

name

Identifier for the Streamlit object. 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.

SET ...

Specifies the property to set for the Streamlit object:

ROOT_LOCATION = 'stage_path_and_root_directory'

Specifies the root stage name and prefix containing the Streamlit Python files, media files and environment.yml file.

Note

This parameter must point to a single directory inside a named internal stage.

MAIN_FILE = 'path_to_main_file_in_root_directory'

Specifies the filename of the Streamlit Python application. This filename is relative to the value of ROOT_LOCATION.

QUERY_WAREHOUSE = warehouse_name

Specifies the warehouse where SQL queries issued by the Streamlit application are run.

COMMENT = 'string_literal'

Adds a comment or overwrites an existing comment for the Streamlit object.

TITLE = 'app_title'

Adds a title for the Streamlit app to display in Snowsight.

IMPORTS = ( 'stage_path_and_file_name_to_read' [ , ... ] )

The location (stage), path, and name of the file(s) to import.

EXTERNAL_ACCESS_INTEGRATIONS = ( integration_name [ , ... ] )

The names of external access integrations needed in order for the Streamlit app code to access external networks.

RENAME TO new_name

Specifies the new identifier for the Streamlit object; must be unique for the schema.

For more details about identifiers, see Identifier requirements.

Usage notes

  • If you run the ALTER STREAMLIT command while the Streamlit app is running, the app does not reflect the changes that you made.

    If you want your changes reflected in the app, you must reload or reboot the app.

  • Regarding metadata:

    Attention

    Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.