diff --git a/samples/cortex-analyst/Advanced SiS Demo/README.md b/samples/cortex-analyst/Advanced SiS Demo/README.md index fc807467..b7537eba 100644 --- a/samples/cortex-analyst/Advanced SiS Demo/README.md +++ b/samples/cortex-analyst/Advanced SiS Demo/README.md @@ -131,6 +131,7 @@ Upload all files from this repository to the `cortex_analyst_demo.ca_sis_demo_ap * [Snowsight UI](https://docs.snowflake.com/en/user-guide/data-load-local-file-system-stage-ui) * [SnowSQL](https://docs.snowflake.com/en/user-guide/data-load-local-file-system-stage) * [Snowflake git integratrion](https://docs.snowflake.com/en/developer-guide/git/git-overview) +* [Snowflake CLI](https://docs.snowflake.com/developer-guide/snowflake-cli/index) **Note:** Make sure to maintain the same directory structure as in this repository. @@ -179,6 +180,20 @@ Just remember to replace `` with the actual name of the warehous If you have already deployed your SiS app and made changes to the code, it can happen that you'll need to recreate the app in roder to reflect those changes to the deployed app. Just `CREATE OR REPLACE STREAMLIT` command after pushing updated code to app's stage. +### Example of deploying using Snowflake CLI + +1. [Install Snowflake CLI](https://docs.snowflake.com/developer-guide/snowflake-cli/installation/installation) +2. [Configure the connection to your account](https://docs.snowflake.com/en/developer-guide/snowflake-cli/connecting/connect) +3. Run the Streamlit deployment command in this app's directory: + + ```shell + snow streamlit deploy --replace --role=CORTEX_USER_ROLE + ``` + + The `snowflake.yml` file provided in this repository will configure `snow` to deploy the code into the schema created above. + + `--role` switch will ensure that the application gets the proper owner's role. + --- Now you can navigate to Streamlit projects on Snowsight and preview the app! diff --git a/samples/cortex-analyst/Advanced SiS Demo/snowflake.yml b/samples/cortex-analyst/Advanced SiS Demo/snowflake.yml new file mode 100644 index 00000000..f7540779 --- /dev/null +++ b/samples/cortex-analyst/Advanced SiS Demo/snowflake.yml @@ -0,0 +1,27 @@ +definition_version: '2' +entities: + Cortex_Agent_SiS_demo: + type: streamlit + title: "Cortex Agent Advanced SiS demo" + identifier: + name: CORTEX_AGENT_SIS_DEMO + schema: CA_SIS_DEMO_APP_SCHEMA + database: CORTEX_ANALYST_DEMO + main_file: Talk_to_your_data.py + pages_dir: pages + query_warehouse: CORTEX_ANALYST_WH + stage: CORTEX_ANALYST_DEMO.CA_SIS_DEMO_APP_SCHEMA.APP_CODE + artifacts: + - Talk_to_your_data.py + - environment.yml + - pages + - utils/analyst.py + - utils/db.py + - utils/llm.py + - utils/misc.py + - utils/notifications.py + - utils/plots.py + - utils/session_state.py + - utils/storage + - constants.py + - components