connecting-streamlit-to-snowflake

Connect Streamlit apps to Snowflake using st.connection and secrets management.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/Mahaboob26/NEXUS-TRUSAI --skill connecting-streamlit-to-snowflake-mahaboob26
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connecting-streamlit-to-snowflake
Source: https://github.com/Mahaboob26/NEXUS-TRUSAI/tree/main/.agents/skills/developing-with-streamlit/skills/connecting-streamlit-to-snowflake
Command: npx skills add https://github.com/Mahaboob26/NEXUS-TRUSAI --skill connecting-streamlit-to-snowflake-mahaboob26

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlit apps often struggle to securely connect to Snowflake, manage credentials, and perform queries without leaking secrets or exposing access controls. This Skill shows how to use Streamlit's st.connection, st.secrets, and multiple connection patterns to create robust, auditable Snowflake integrations.

Core Features & Use Cases

  • Secure Connections: Establish Snowflake connections via st.connection with secrets management.
  • Controlled Access: Support caller's rights and separate connections for different environments.
  • Parameterized Queries & Writes: Execute safe, parameterized queries and write data to Snowflake.
  • Use Case: Build a Streamlit dashboard that reads user data from Snowflake, caches results, and writes audit logs.

Quick Start

  • Connect a Streamlit app to Snowflake using st.connection and a secrets file, then run a parameterized query like SELECT * FROM USERS LIMIT 5.

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 connect a Streamlit app to Snowflake using st.connection?

To connect Streamlit to Snowflake, use the st.connection API with credentials stored in .streamlit/secrets.toml. This approach securely manages secrets and supports both single and multiple Snowflake connections within your app.

How does st.secrets work for managing Snowflake credentials in Streamlit?

st.secrets securely stores Snowflake credentials in a local secrets.toml file. The st.connection API reads these credentials to establish secure, auditable database connections without hardcoding sensitive information in your application code.

Do I need a specific Streamlit version to use st.connection with Snowflake?

Yes, you need Streamlit 1.53 or later to connect Streamlit to Snowflake using st.connection. This version is required to support caller's rights, which allows controlled access and separate connections for different environments.

Can I run parameterized queries and write data to Snowflake from Streamlit?

Yes, you can execute safe parameterized queries and write data to Snowflake directly from Streamlit. Using st.connection ensures these operations are secure, preventing SQL injection and maintaining credential safety.

What is the best way to manage multiple Snowflake connections in a Streamlit app?

The best way to manage multiple Snowflake connections in Streamlit is using the st.connection API. It supports separate connections for different environments, enabling controlled access and robust, auditable integrations across your dashboards.

Why use caller's rights when connecting Streamlit to Snowflake?

Caller's rights in Streamlit Snowflake connections ensure controlled access by executing queries with the caller's permissions. This creates auditable integrations, prevents unauthorized data access, and supports separate environments securely.