RepoSnowflake (Arctic)Snowflake (Arctic)published Sep 15, 2025seen Jun 26

Snowflake-Labs/chat-to-chart

Python

Open original ↗

Captured source

source ↗
published Sep 15, 2025seen Jun 26captured 2whttp 200method plain

Snowflake-Labs/chat-to-chart

Description: A quick and easy Streamlit application that demonstrates how to build Altair visualizations like heatmaps, scatter plots over data from Cortex Analyst

Language: Python

License: Apache-2.0

Stars: 1

Forks: 0

Open issues: 0

Created: 2025-09-15T17:21:38Z

Pushed: 2025-09-15T17:24:28Z

Default branch: main

Fork: no

Archived: no

README:

Setup

1. Run the [data_model.sql](src/sql/data_model.sql) script to setup the RBAC and base tables. 2. Load the CSV data into the base tables (available in [data/csv/](data/csv/)). 3. Create the Semantic View or Semantic Model (seed YAML available under [cortex_analyst](cortex_analyst/) folder). Ensure to create under the right database/schema. 4. Edit the [.env.sample](.env.sample) to replace with parameter values for your target Snowflake account. 5. Create a local Python virtual environment and install the dependencies in [requirements.txt](requirements.txt). 6. Run the Streamlit app locally:

streamlit run src/streamlit/chat_to_chart.py

Using the app

Once you start the app you can use the sample questions in the [question_bank.md](question_bank.md) to get started. You can also design your own questions looking at the sample data; you may have to fine-tune the Semantic View/Model based on the accuracy of SQL generated for your questions.

Checkout the demo recording here: [streamlit-chat_to_chart.webm](streamlit-chat_to_chart.webm)