snowpark-python

A guide to using Snowpark Python, Snowflake’s Python library for working with data in tables and building data-processing code.

In plain words
What is it for?
Use it when investigating or writing Snowpark DataFrame operations, database sessions, data pipelines, user-defined functions, or stored procedures.
Why use it?
It gives the coding agent known patterns for common Snowflake tasks instead of requiring it to infer how the library works.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/sfc-gh-cconner/support-rules-mcp/snowpark-python
Clone the repo
git clone --depth 1 https://github.com/sfc-gh-cconner/support-rules-mcp
Per session 1,805 This file is loaded in full into every session.
When invoked 1,805 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01805 $0.01805
Opus 5 $0.00903 $0.00903
Sonnet 5 $0.00361 $0.00361
Haiku 4.5 $0.00180 $0.00180

Measured yesterday against content hash 34afa5e35771, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

snowpark-python scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/connectors/snowpark-python.mdc · 306 lines

How it starts

The opening of the file, as written. The whole thing — 306 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Snowpark Python Investigation Guide

PURPOSE: Snowpark Python patterns for data pipelines, stored procedures, UDFs, and DataFrame operations.

Access Method: GitHub MCP API tools
Repository: snowflakedb/snowpark-python

🔍 Quick Investigation Patterns

DataFrame Operations

# Search for DataFrame implementation
mcp_github_search_code(
    query='class DataFrame repo:snowflakedb/snowpark-python'
)

# Get core DataFrame class
mcp_github_get_file_contents(
    owner="snowflakedb", repo="snowpark-python",
    path="src/snowflake/snowpark/dataframe.py"
)

# Search for specific operations
mcp_github_search_code(
    query='select OR filter OR join repo:snowflakedb/snowpark-python path:src/snowflake/snowpark'
)

Session Management

# Get Session implementation
mcp_github_get_file_contents(
    owner="snowflakedb", repo="snowpark-python",
    path="src/snowflake/snowpark/session.py"
)

# Search for session creation patterns
mcp_github_search_code(
    query='SessionBuilder OR create_session repo:snowflakedb/snowpark-python'
)

# Connection handling
mcp_github_search_code(
    query='_conn OR _connection repo:snowflakedb/snowpark-python'
)

UDF and Stored Procedures

# Search for UDF registration
mcp_github_search_code(
    query='register_udf OR udf decorator repo:snowflakedb/snowpark-python'
)

# Get UDF implementation
mcp_github_get_file_contents(
    owner="snowflakedb", repo="snowpark-python",
    path="src/snowflake/snowpark/udf.py"
)

# Stored procedure handling
mcp_github_search_code(
    query='register_sproc OR stored_procedure repo:snowflakedb/snowpark-python'
)

# UDTF implementation
mcp_github_search_code(
    query='UDTF OR udtf_registration repo:snowflakedb/snowpark-python'
)

Package Management

# Search for package handling
mcp_github_search_code(
    query='add_packages OR add_requirements repo:snowflakedb/snowpark-python'
)

# Conda/pip integration
mcp_github_search_code(
    query='conda_channel OR pip_install repo:snowflakedb/snowpark-python'
)

# Import handling
mcp_github_search_code(
    query='add_import OR import_as repo:snowflakedb/snowpark-python'
)

Read the full file on GitHub · 306 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 306 lines · 1,805 tokens per session scan A 34afa5e35771

Subscribe to this mod's changes

snowpark-python is a cursor rule published in the GitHub repository sfc-gh-cconner/support-rules-mcp (0 stars, last pushed 10mo ago), licensed Apache-2.0. It adds 1,805 tokens to every session, about $0.0090 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.