Creates a new Streamlit application object in Snowflake or replaces an existing Streamlit application object in the same schema.
CREATE [ OR REPLACE ] STREAMLIT [ IF NOT EXISTS ] <name> ROOT_LOCATION = '<stage_path_and_root_directory>' MAIN_FILE = '<path_to_main_file_in_root_directory>' [ QUERY_WAREHOUSE = <warehouse_name> ] [ COMMENT = '<string_literal']
Specifies the identifier (i.e. name) for the Streamlit object. This identifier must be unique for the schema in which the table is created.
In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (e.g.
"My object"). Identifiers enclosed in double quotes are also case-sensitive.
For more details, see Identifier requirements.
ROOT_LOCATION = 'stage_path_and_root_directory'
Specifies the full path to the named stage containing the Streamlit Python files, media files, and the
environment.ymlfile, for example:
ROOT_LOCATION = '@streamlit_db.steamlit_schema.streamlit_stage'
In this example, the Streamlit files are located on a named stage named
streamlit_stagewithin a database named
streamlit_dband schema named
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
QUERY_WAREHOUSE = warehouse_name
Specifies the warehouse where SQL queries issued by the Streamlit application are run.
COMMENT = 'string_literal'
Specifies a comment for the Streamlit object.
DEFAULT: No value
All files in the directory specified by
ROOT_LOCATIONare available to the Streamlit runtime. This includes the Python source file,
environment.ymland media files.
When you clone a schema or database containing a Streamlit object, the Streamlit object is not cloned.
To specify the packages used by the Streamlit application, use an
environment.ymlin the root location.
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.
CREATE OR REPLACE <object> statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single transaction.