# PromptRails + Snowflake Integration

Source: https://0.0.0.0:8080/integrations/snowflake

---

[All Integrations](/integrations)

![Snowflake](/images/logos/snowflake.svg)

# Snowflake

Databases

Connect to Snowflake data warehouse for AI-powered analytics. Agents can query your Snowflake tables, run aggregations, and extract business intelligence from your data cloud.

## How to Connect

1.  1Go to Settings and then Credentials.
2.  2Add a Snowflake connection with your account, warehouse, database, and credentials.
3.  3Create a Data Source and select the Snowflake credential.
4.  4Add the Data Source to your agent.

## Connection Methods

### MCP Template (Recommended)

Recommended

Install from the template marketplace. Select an existing credential and your agents can run dynamic SQL queries, list tables, and describe schemas.

1.  1Create a database credential in Settings → Credentials
2.  2Go to MCP Templates marketplace
3.  3Find the Snowflake Query template
4.  4Select your credential from the dropdown
5.  5Install — your agent can now query the database

### Data Source

Create a versioned data source with a fixed query template. Best for controlled, repeatable queries where the SQL is predefined.

1.  1Create a database credential in Settings → Credentials
2.  2Go to Data Sources and create a new data source
3.  3Write your SQL query template with {{ parameter }} placeholders
4.  4Add the data source as a tool to your agent

## Security & SQL Injection Protection

-   All database credentials are encrypted at rest with AES-256-GCM
-   Agent-generated SQL is executed with read-only permissions when possible
-   Query results are truncated at 50,000 rows / 100MB to prevent resource exhaustion
-   Connection details never leave the server — credentials are resolved server-side
-   Use parameterized queries with the params argument to prevent SQL injection
-   LLM Guard content scanning can be enabled to detect prompt injection attempts
-   SSRF protection prevents connections to private/internal network addresses

[Documentation](/docs/data-sources)[Snowflake API Reference](https://docs.snowflake.com/)

[Get Started](https://app.promptrails.ai)
