snowflake-known-pitfalls

Featured

Identify and avoid Snowflake anti-patterns and common mistakes in SQL, warehouse management, data loading, and access control. Use when reviewing Snowflake configurations, onboarding new users, or auditing existing Snowflake deployments for best practices. Trigger with phrases like "snowflake mistakes", "snowflake anti-patterns", "snowflake pitfalls", "snowflake what not to do", "snowflake code review".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Snowflake Known Pitfalls ## Overview Common mistakes and anti-patterns when using Snowflake, with real SQL examples and fixes. ## Pitfall #1: Leaving Warehouses Running (Cost Killer) **Anti-Pattern:** ```sql -- Warehouse with auto_suspend = 0 (never suspends) CREATE WAREHOUSE ALWAYS_ON_WH WAREHOUSE_SIZE = 'XLARGE' AUTO_SUSPEND = 0; -- 16 credits/hour = ~$1,152/day at $3/credit ``` **Fix:** ```sql ALTER WAREHOUSE ALWAYS_ON_WH SET AUTO_SUSPEND = 120, -- Suspend after 2 min idle AUTO_RESUME = TRUE; -- Resume on next query -- Audit all warehouses for high auto_suspend SELECT name, size, auto_suspend, state FROM INFORMATION_SCHEMA.WAREHOUSES WHERE auto_suspend > 600 OR auto_suspend = 0; ``` --- ## Pitfall #2: Using ACCOUNTADMIN for Everything **Anti-Pattern:** ```sql -- Human users with ACCOUNTADMIN default role ALTER USER analyst SET DEFAULT_ROLE = 'ACCOUNTADMIN'; -- One bad query can drop production databases ``` **Fix:** ```sql -- Use least-privilege roles ALTER USER analyst SET DEFAULT_ROLE = 'DATA_ANALYST'; -- Audit ACCOUNTADMIN usage SELECT grantee_name, role FROM SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS WHERE role = 'ACCOUNTADMIN' AND deleted_on IS NULL; -- Should be < 3 users, all named admins ``` --- ## Pitfall #3: SELECT * on Wide Tables **Anti-Pattern:** ```sql -- Scans ALL columns (Snowflake stores columnar — unused cols waste I/O) SELECT * FROM events; -- 200 columns, only need 3 ``` **Fix:** ```sql -- Select only needed columns — dramat...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

snowflake-common-errors

Diagnose and fix common Snowflake errors and SQL compilation failures. Use when encountering Snowflake error codes, failed queries, authentication issues, or warehouse/connection problems. Trigger with phrases like "snowflake error", "fix snowflake", "snowflake not working", "snowflake SQL error", "snowflake 002003".

2,266 Updated today
jeremylongshore
AI & Automation Featured

snowflake-advanced-troubleshooting

Apply advanced Snowflake debugging with query profiling, spill analysis, lock contention, and performance deep-dives using ACCOUNT_USAGE views. Use when standard troubleshooting fails, investigating slow queries, or diagnosing warehouse performance issues. Trigger with phrases like "snowflake hard bug", "snowflake slow query debug", "snowflake query profile", "snowflake spilling", "snowflake deep debug".

2,266 Updated today
jeremylongshore
AI & Automation Featured

snowflake-development

Comprehensive Snowflake development assistant covering SQL best practices, data pipeline design (Dynamic Tables, Streams, Tasks, Snowpipe), Cortex AI functions, Cortex Agents, Snowpark Python, dbt integration, performance tuning, and security hardening.

39,227 Updated today
sickn33
AI & Automation Featured

snowflake-architecture-variants

Choose and implement Snowflake architecture blueprints: data lakehouse, data mesh, data sharing, and Snowpark-native patterns for different scales. Use when designing Snowflake data platforms, choosing between architectures, or implementing data sharing and Snowpark patterns. Trigger with phrases like "snowflake architecture", "snowflake lakehouse", "snowflake data mesh", "snowflake data sharing", "snowflake Snowpark".

2,266 Updated today
jeremylongshore
AI & Automation Solid

snowflake-development

Use when writing Snowflake SQL, building data pipelines with Dynamic Tables or Streams/Tasks, using Cortex AI functions, creating Cortex Agents, writing Snowpark Python, configuring dbt for Snowflake, or troubleshooting Snowflake errors.

16,642 Updated yesterday
alirezarezvani