connecting-streamlit-to-snowflake

Connect Streamlit applications to Snowflake databases using st.connection.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a secure and efficient way to connect Streamlit applications to Snowflake databases, enabling data querying and manipulation directly within your web applications.

Core Features & Use Cases

  • st.connection: Utilizes Streamlit's built-in connection management for robust database interactions.
  • Caller's Rights: Supports running queries with the viewer's permissions for enhanced security and data segregation.
  • Caching: Implements query caching for improved performance.
  • Secrets Management: Integrates with st.secrets for secure credential storage.
  • Parameterized Queries: Protects against SQL injection vulnerabilities.
  • Data Writing: Enables writing dataframes and executing SQL statements.
  • Multiple Connections: Allows configuration of multiple Snowflake connections.
  • Snowflake Cortex Integration: Facilitates building chat interfaces with Snowflake Cortex LLMs.

Quick Start

Use st.connection("snowflake") to establish a connection to your Snowflake database.

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 Streamlit to Snowflake?

You can connect Streamlit to Snowflake by using the built-in `st.connection("snowflake")` method, which establishes a secure database connection for querying and manipulating data directly within your web application.

Does Streamlit support running Snowflake queries with viewer permissions?

Yes, Streamlit supports caller's rights when connecting to Snowflake, allowing queries to run with the viewer's permissions for enhanced security and data segregation within your application.

Can I use parameterized queries with Snowflake in Streamlit?

Yes, you can use parameterized queries when connecting Streamlit to Snowflake to protect against SQL injection vulnerabilities while fetching or manipulating data.

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

The best way to manage Snowflake credentials in Streamlit is by integrating with `st.secrets` for secure credential storage, ensuring your database connection details are kept safe.

How do I integrate Snowflake Cortex LLMs into a Streamlit chat interface?

You can integrate Snowflake Cortex LLMs by establishing a Snowflake connection in Streamlit, which facilitates building chat interfaces that interact directly with the large language models.