跳到主要内容
知仓学习社ZHICANG

snowflake-development

>

不碰外部(只输出文字)无严重或高危命中borghei/Claude-Skills

它会碰到什么

扫了多少3 个文本文件,26 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Snowflake Development

> Category: Engineering

> Domain: Data Warehouse

Overview

The Snowflake Development skill provides tools for analyzing and optimizing Snowflake SQL queries, recommending warehouse sizing, and enforcing Snowflake-specific best practices. Helps data engineers reduce costs and improve query performance.

Clarify First

Before analyzing or sizing, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • [ ] Action — analyze / optimize / warehouse-sizing (--action; selects the workflow)
  • [ ] SQL file or query — the specific query(ies) to optimize (--file; the subject of the analysis)
  • [ ] Workload type & data volume — ETL / BI / ad-hoc and the GB scale (--workload/--data-volume; drives the warehouse recommendation)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions at the top of the artifact.

Quick Start

# Analyze a Snowflake SQL file for optimization opportunities
python scripts/snowflake_query_helper.py --file queries.sql --action analyze

# Get warehouse sizing recommendations
python scripts/snowflake_query_helper.py --action warehouse-sizing --workload "etl" --data-volume "500GB"

# Optimize a specific query
python scripts/snowflake_query_helper.py --file slow_query.sql --action optimize

Tools Overview

| Tool | Purpose | Key Flags |

|------|---------|-----------|

| snowflake_query_helper.py | Analyze, optimize Snowflake SQL and recommend warehouse sizes | --file, --action, --workload, --data-volume |

Workflows

Query Performance Optimization

  1. Collect slow queries from query history
  2. Run analyzer to identify optimization opportunities
  3. Apply recommended changes
  4. Compare before/after execution plans

Warehouse Right-Sizing

  1. Identify workload type (ETL, BI, ad-hoc, etc.)
  2. Run warehouse-sizing with data volume
  3. Review recommendations
  4. Implement multi-cluster settings if applicable

Reference Documentation

  • [Snowflake Best Practices](references/snowflake-best-practices.md) - Query patterns, warehouse management, cost optimization

Common Patterns

Cost Reduction

  • Right-size warehouses (don't use XL for small queries)
  • Set auto-suspend to 60 seconds for ad-hoc warehouses
  • Use materialized views for frequently accessed aggregations
  • Partition large tables with clustering keys
  • Avoid SELECT * in production queries

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。