Connect Streamlit to Snowflake
Introduction
This guide explains how to securely access a Snowflake database from Streamlit Cloud. It uses the snowflake-connector-python library and Streamlit's secrets management.
Create a Snowflake database
If you already have a database that you want to use, feel free to skip to the next step.
First, sign up for Snowflake and log into the Snowflake web interface (note down your username, password, and account identifier!):
Enter the following queries into the SQL editor in the Worksheets page to create a database and a table with some example values:
```sql
CREATE DATABASE PETS;
CREATE TABLE MYTABLE (
    NAME            varchar(80),
    PET             varchar(80)
);
INSERT INTO MYTABLE VALUES ('Mary', 'dog'), ('John', 'cat'), ('Robert', 'bird');
SELECT * FROM MYTABLE;
