Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions samples/cortex-analyst/Advanced SiS Demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -179,6 +180,20 @@ Just remember to replace `<warehouse name>` 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!
27 changes: 27 additions & 0 deletions samples/cortex-analyst/Advanced SiS Demo/snowflake.yml
Original file line number Diff line number Diff line change
@@ -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