CONNECT APP
Build with Snowflake
A data warehouse built for the cloud
Databases
- API key
MCP
Give your agent Snowflake tools
Every Snowflake action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Snowflake account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "snowflake",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Execute SQL Query:
const result = await mcp.callTool({
name: "snowflake-execute-sql-query",
arguments: {
sql: "SQL Query",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "snowflake",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Execute SQL Query:
result = await session.call_tool("snowflake-execute-sql-query", {
"sql": "SQL Query",
})SDK
Run Snowflake actions from your backend
Connect a user's Snowflake account once, then run Execute SQL Query on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "snowflake-execute-sql-query",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
snowflake: { authProvisionId: "apn_xxxxxxx" },
sql: "SQL Query",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="snowflake-execute-sql-query",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"snowflake": {"authProvisionId": "apn_xxxxxxx"},
"sql": "SQL Query",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "snowflake-execute-sql-query",
"configured_props": {
"snowflake": { "authProvisionId": "apn_xxxxxxx" },
"sql": "SQL Query"
}
}'TOOLS
Snowflake actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Execute SQL Query
actionExecute a custom Snowflake query. See our docs to learn more about working with SQL in Pipedream.Writev0.2.4 -
Execute SQL Query In Session
actionExecute a Snowflake query inside a session started by the Start SQL Session action, so it shares that session's state — temporary tables,USEcontext, and session parameters — with the other queries in the same session. Pass the serialized session from Start SQL Session to the Session prop. Note: to preserve the session this query runs on a direct connection and therefore does NOT egress from the shared static IP (use_pd_sql_proxy); if your Snowflake network policy allowlists only the static IP, use Execute SQL Query instead. See our docs to learn more about working with SQL in Pipedream.Writev0.0.2 -
Insert Multiple Rows
actionInsert multiple rows into a tableWritev0.1.7 -
Insert Single Row
actionInsert a row into a tableWritev1.1.6 -
List Database Options
actionRetrieves available options for the Database field.Read-onlyv0.0.2 -
List User Name Options
actionRetrieves available options for the User Name field.Read-onlyv0.0.2 -
List Warehouse Name Options
actionRetrieves available options for the Warehouse Name field.Read-onlyv0.0.2 -
Query SQL Database
actionExecute a SQL Query. See our docs to learn more about working with SQL in Pipedream.Writev0.0.5 -
Start SQL Session
actionStart a Snowflake session and return it in serialized form, so subsequent Snowflake actions can run in the same session (preserving temporary tables,USEcontext, and session parameters) by passing it to their Session prop. The returned value contains session auth tokens — treat it as sensitive. Sessions expire server-side after ~4 hours or your account's idle timeout. See the documentationWritev0.0.2
EVENTS
Snowflake triggers
Event sources your backend can deploy for users and receive through a webhook.
-
New Row
triggerEmit new event when a row is added to a tablev0.2.5 -
New Query Results
triggerRun a SQL query on a schedule, triggering a workflow for each row of resultsv0.2.5 -
Failed Task in Schema
triggerEmit new events when a task fails in a database schemav0.1.5 -
New Database
triggerEmit new event when a database is createdv0.1.5 -
New Deleted Role
triggerEmit new event when a role is deletedv0.1.5 -
New Deleted User
triggerEmit new event when a user is deletedv0.1.5 -
New Role
triggerEmit new event when a role is createdv0.1.5 -
New Schema
triggerEmit new event when a schema is createdv0.1.5 -
New Table
triggerEmit new event when a table is createdv0.1.5 -
New Update Role
triggerEmit new event when a role is updatedv0.1.5 -
New Update User
triggerEmit new event when a user is updatedv0.1.5 -
New Usage Monitor
triggerEmit new event when a query is executed in the specified paramsv0.1.5 -
New User
triggerEmit new event when a user is createdv0.1.5 -
New, Updated, or Deleted Warehouse
triggerEmit new events when a warehouse is created, altered, or droppedv0.1.5
MULTI-APP
Use Snowflake with other popular apps
Most products don't stop at one integration. Pair Snowflake with the other apps your users rely on, and ship use cases that span both.
- App slug
- snowflake
- Authentication
- API key
- Categories
- Databases
- Actions
- 9
- Triggers
- 14
- API proxy
- Not available