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,926 stars 433 forks Updated yesterday 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
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category