跳到正文
Skillpedia
机器学习77k · #2453

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ComposioHQ/awesome-claude-skills/blob/master/composio-skills/snowflake-automation/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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

  1. Add the Composio MCP server to your client: https://rube.app/mcp
  2. Connect your Snowflake account when prompted (account credentials or key-pair authentication)
  3. 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.

repo: ComposioHQ/awesome-claude-skills

热度

GitHub 星标
77k
排名
#2453
许可证
—
更新时间
2026/9/18

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能