Snowflake Automation
它能做什么
这个工具可以帮你操作 Snowflake 数据库。你可以查看有哪些数据库、模式和表,运行 SQL 命令,还能管理数据工作流。
适用场景
- ✓当你想查看所有可用的数据库时。
- ✓当你需要在某个模式中查找特定的表时。
- ✓当你想运行 SQL 命令来查询或修改数据时。
技能链接
https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/snowflake-automation/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“列出 'my_database' 数据库中 'public' 模式下的所有表。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要先通过 Composio 这个工具连接你的 Snowflake 账号。之后,你可以让它列出数据库、模式或表,也可以运行你自己编写的 SQL 命令。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Snowflake Automation
Automate your Snowflake data warehouse workflows -- discover databases, browse schemas and tables, execute arbitrary SQL (SELECT, DDL, DML), and integrate Snowflake data operations into cross-app pipelines.
Toolkit docs: composio.dev/toolkits/snowflake
Setup
- Add the Composio MCP server to your client:
https://rube.app/mcp - Connect your Snowflake account when prompted (account credentials or key-pair authentication)
- Start using the workflows below
Core Workflows
1. List Databases
Use SNOWFLAKE_SHOW_DATABASES to discover available databases with optional filtering and Time Travel support.
Tool: SNOWFLAKE_SHOW_DATABASES
Inputs:
- like_pattern: string (SQL wildcard, e.g., "%test%") -- case-insensitive
- starts_with: string (e.g., "PROD") -- case-sensitive
- limit: integer (max 10000)
- history: boolean (include dropped databases within Time Travel retention)
- terse: boolean (return subset of columns: created_on, name, kind, database_name, schema_name)
- role: string (role to use for execution)
- warehouse: string (optional, not required for SHOW DATABASES)
- timeout: integer (seconds)
2. Browse Schemas
Use SNOWFLAKE_SHOW_SCHEMAS to list schemas within a database or across the account.
Tool: SNOWFLAKE_SHOW_SCHEMAS
Inputs:
- database: string (database context)
- in_scope: "ACCOUNT" | "DATABASE" | "<specific_database_name>"
- like_pattern: string (SQL wildcard filter)
- starts_with: string (case-sensitive prefix)
- limit: integer (max 10000)
- history: boolean (include dropped schemas)
- terse: boolean (subset columns only)
- role, warehouse, timeout: string/integer (optional)
3. List Tables
Use SNOWFLAKE_SHOW_TABLES to discover tables with metadata including row counts, sizes, and clustering keys.
Tool: SNOWFLAKE_SHOW_TABLES
Inputs:
- database: string (database context)
- schema: string (schema context)
- in_scope: "ACCOUNT" | "DATABASE" | "SCHEMA" | "<specific_name>"
- like_pattern: string (e.g., "%customer%")
- starts_with: string (e.g., "FACT", "DIM", "TEMP")
- limit: integer (max 10000)
- history: boolean (include dropped tables)
- terse: boolean (subset columns only)
- role, warehouse, timeout: string/integer (optional)
4. Execute SQL Statements
Use SNOWFLAKE_EXECUTE_SQL for SELECT queries, DDL (CREATE/ALTER/DROP), and DML (INSERT/UPDATE/DELETE) with parameterized bindings.
Tool: SNOWFLAKE_EXECUTE_SQL
Inputs:
- statement: string (required) -- SQL statement(s), semicolon-separated for multi-statement
- database: string (case-sensitive, falls back to DEFAULT_NAMESPACE)
- schema_name: string (case-sensitive)
- warehouse: string (case-sensitive, required for compute-bound queries)
- role: string (case-sensitive, falls back to DEFAULT_ROLE)
- bindings: object (parameterized query values to prevent SQL injection)
- parameters: object (Snowflake session-level parameters)
- timeout: integer (seconds; 0 = max 604800s)
Examples:
"SELECT * FROM my_table LIMIT 100;""CREATE TABLE test (id INT, name STRING);""ALTER SESSION SET QUERY_TAG='mytag'; SELECT COUNT(*) FROM my_table;"
Known Pitfalls
| Pitfall | Detail |
|---|---|
| Case sensitivity | Database, schema, warehouse, and role names are case-sensitive in SNOWFLAKE_EXECUTE_SQL. |
| Warehouse required for compute | SELECT and DML queries require a running warehouse. SHOW commands do not. |
| Multi-statement execution | Multiple statements separated by semicolons execute in sequence automatically. |
| SQL injection prevention | Always use the bindings parameter for user-supplied values to prevent injection attacks. |
| Pagination with LIMIT | SHOW commands support limit (max 10000) and from_name for cursor-based pagination. |
| Time Travel | Set history: true to include dropped objects still within the retention period. |
Quick Reference
| Tool Slug | Description |
|---|---|
SNOWFLAKE_SHOW_DATABASES |
List databases with filtering and Time Travel support |
SNOWFLAKE_SHOW_SCHEMAS |
List schemas within a database or account-wide |
SNOWFLAKE_SHOW_TABLES |
List tables with metadata (row count, size, clustering) |
SNOWFLAKE_EXECUTE_SQL |
Execute SQL: SELECT, DDL, DML with parameterized bindings |
Powered by Composio
常见问题
什么是 Snowflake?
Snowflake 是一种基于云的数据存储与处理服务,可以把它想象成一个很大的数字仓库,用来存放各种信息。
数据库、模式和表是什么?
可以这样理解:数据库像一个大柜子,模式像柜子里的一个抽屉,表则像抽屉里的一份文件。它们的作用都是把数据分门别类地组织起来。
什么是 SQL?
SQL(结构化查询语言)是用来与数据库沟通的语言,比如查看数据、添加新数据或修改已有数据,都可以用它来完成。
详情
作者的原始描述
Automate Snowflake data warehouse operations -- list databases, schemas, and tables, execute SQL statements, and manage data workflows via the Composio MCP integration.
热度
- GitHub 星标
- 77k
- 排名
- #2453
- 许可证
- —
- 更新时间
- 2026/9/18
评论
- …
同一仓库的更多技能
artifacts-builder
77k帮助你的智能体构建复杂的用户界面。它借助现代技术,创建功能丰富的交互式网页。
brand-guidelines
77k帮助你的智能体把官方品牌色和字体应用到各类材料中。适合需要体现公司视觉形象的场景,保持视觉统一。
canvas-design
77k让你的智能体创作 .png 和 .pdf 格式的原创视觉作品。当用户需要海报、艺术作品或其他静态设计时使用。
changelog-generator
77k帮助你的智能体根据代码提交记录撰写面向用户的更新说明。它能把技术内容转换成通俗易懂的文字。