connecting-streamlit-to-snowflake

Establishes Snowflake database connections from Streamlit apps using st.connection and session writes.

1|1|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/Shamrock2245/shamrock-trading-bot --skill connecting-streamlit-to-snowflake-shamrock2245
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connecting-streamlit-to-snowflake
Source: https://github.com/Shamrock2245/shamrock-trading-bot/tree/main/.agent/skills/developing-with-streamlit/skills/connecting-streamlit-to-snowflake
Command: npx skills add https://github.com/Shamrock2245/shamrock-trading-bot --skill connecting-streamlit-to-snowflake-shamrock2245

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Connect Streamlit applications to Snowflake in a secure, reliable, and efficient way so apps can query, cache, and write database data without manual connection management or insecure credential handling.

Core Features & Use Cases

  • Managed connections: Use st.connection to gain automatic pooling, caching, reconnection, and integration with Streamlit secrets.
  • Safe querying and writes: Use parameterized queries to prevent SQL injection and session() for controlled write operations and bulk dataframe writes.
  • Access control and integrations: Support caller's rights for row-level security, multiple named connections for env separation, and Cortex LLM chat integration for in-app AI assistants.

Quick Start

Connect your Streamlit app to Snowflake with st.connection, add the connection credentials to .streamlit/secrets.toml using the exact account and host from your Snowflake CLI config, and run a SELECT query to display results in a dataframe.

Frequently Asked Questions about connecting-streamlit-to-snowflake

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely connect Streamlit to Snowflake?

Use st.connection to securely connect Streamlit to Snowflake, leveraging automatic pooling and integration with Streamlit secrets by configuring credentials in .streamlit/secrets.toml.

What's the best way to run parameterized queries in Streamlit with Snowflake?

Use parameterized queries in Streamlit to prevent SQL injection when querying Snowflake, and use session() for controlled write operations and bulk dataframe writes.

How do I configure multiple Snowflake connection profiles in Streamlit?

Configure multiple named connections in .streamlit/secrets.toml to support environment separation in Streamlit, using the exact account and host values from your Snowflake CLI config.

Does the Streamlit Snowflake connection support Cortex LLM chat integration?

Yes, the Streamlit Snowflake connection supports Cortex LLM chat integration, enabling you to build in-app AI assistants directly within your data-driven applications.

Why do I need snowflake-connector-python for Streamlit on Python 3.12+?

You must declare snowflake-connector-python in your Python 3.12+ environments to ensure the Streamlit Snowflake connection functions correctly without dependency errors.