Snowflake
Go deep on Snowflake: virtual warehouses, micro-partitions, stages and COPY, time travel, zero-copy cloning, roles and cost controls.
Intermediate · about 8 hours · difficulty 3/5
Learn first: How Cloud Data Warehouses Work
Snowflake is a popular cloud warehouse with many Indian GCCs, consultancies and product companies. Pick it if your target companies list it, or if you like a clean SQL-first experience. A 30-day free trial is available.
Core concepts
- Virtual warehouses: independent compute clusters sized XS to 6XL. They auto-suspend and auto-resume; you pay credits only while running.
- Micro-partitions: Snowflake automatically splits tables into small immutable chunks with metadata. Add clustering keys only for very large tables with clear filter patterns.
- Databases and schemas organise objects; roles (RBAC) control access.
Loading
- Stages (internal or external on S3, GCS, Azure) hold files.
COPY INTO table FROM @stagebulk loads Parquet, CSV or JSON.- Snowpipe loads continuously as files arrive.
VARIANTcolumns store semi-structured JSON queryable with path syntax.
Features worth knowing
- Time Travel: query or restore data as it was hours or days ago.
- Zero-copy cloning: clone a database instantly for testing without duplicating storage.
- Streams and tasks: track changes and schedule SQL inside Snowflake.
- Secure data sharing across accounts.
Cost control
Set auto-suspend to 60 seconds, use resource monitors to cap credits, size warehouses to the workload and separate warehouses for loading, transformation and BI.
Pitfalls
- Using a large warehouse for small queries; bigger is not always faster for tiny data.
- Granting broad roles like ACCOUNTADMIN to everyone.
You are ready to move on when you can load Parquet from a stage, model a star schema, use Time Travel to undo a bad delete, and set a resource monitor on your trial account.
Key concepts
- Virtual warehouses and credits
- Micro-partitions and clustering keys
- Stages and COPY INTO
- Snowpipe
- VARIANT and semi-structured data
- Time Travel and cloning
- Roles and RBAC
- Resource monitors
Other options for this step
- Google BigQuery: Go deep on BigQuery: serverless execution, slots and bytes-scanned pricing, partitioning and clustering, nested and repeated fields, and cost controls.
- Amazon Redshift: Go deep on Redshift: provisioned and serverless options, distribution and sort keys, COPY from S3, Spectrum and workload management.
Mini project
On a Snowflake trial, create an external stage over sample Parquet files, load them with COPY INTO, build a small star schema, clone the database for a test, and demonstrate Time Travel recovery. Record credits used.
Check yourself
Why might a query run in roughly the same time on a Small and a Large warehouse, and what does that tell you?
Free resources
- Snowflake documentation (Snowflake)
- Data Engineering Zoomcamp (DataTalksClub)