Learn Snowflake from scratch
Free tutorials for Snowflake beginners, SQL developers and data engineers. Learn with simple explanations, interactive diagrams and hands-on SQL labs.
New to Snowflake? Start here
Browse by topic
Start with architecture and SQL, then work through ingestion, data pipelines, recovery and query performance.
Introduction, Setup & Connectivity
- Module overview →
- What Is Snowflake? A Beginner’s Guide
- Warehouses, lakes, lakehouses and traditional databases
- Compare Snowflake, BigQuery, Redshift and Databricks
- Choose an edition, cloud provider and region
- Understand accounts, organizations and identifiers
- Set up a trial and find your way around Snowsight
- Find query evidence and explore databases
- Use the loading and administration interfaces
- SnowSQL, Snowflake CLI and connection choices
- Connect Java and desktop tools with JDBC and ODBC
- Read a result with the Python connector
- Understand the SQL API request and response
Architecture, Warehouses & Billing Basics
- Module overview →
- Snowflake Architecture Explained: Storage, Compute, and Cloud Services
- Micro-partitions, columnar storage and compression
- Metadata and the query optimizer
- Virtual warehouses, sizes and states
- Auto-suspend and auto-resume through a small lab
- Scaling up, scaling out and multi-cluster warehouses
- Concurrency and query queueing
- Serverless features and their compute responsibilities
- Credits, compute billing, storage and cloud services
Database Objects & SQL Foundations
- Module overview →
- Databases, schemas and tables
- Choose numeric, text, Boolean and binary types
- Read, filter and order rows
- CASE and missing values
- Clean, calculate and convert values
- Summarize groups with GROUP BY and HAVING
- Dates, times and timestamp choices
- Choose how long a table should live
- Views and secure views
- Sequences generate identifiers
- Create, change, empty and remove a table
- Insert, update, delete and merge rows
- Lab: build a small sales dataset
Advanced SQL & Transactions
- Module overview →
- Inner, left, right and full outer joins
- Cross joins and self joins
- Subqueries, correlated queries and semi/anti patterns
- CTEs and bounded recursion
- Combine result sets with set operators
- Window Functions in Snowflake: Syntax and Examples
- ROW_NUMBER, RANK and DENSE_RANK
- QUALIFY, latest records and deduplication
- Window frames: ROWS versus RANGE
- Running totals and moving averages
- LAG, LEAD and changes over time
- PIVOT and UNPIVOT: reshape reports
- GENERATE rows and evaluate lateral queries
- ACID, autocommit and transaction boundaries
- Isolation, concurrent DML and lock waits
- Lab: deduplicate, analyse and commit a batch
Stages, File Formats & Cloud Storage Integration
- Module overview →
- From a file to a table: understand the journey
- Internal and external stages: choose the location
- Read CSV correctly: delimiters, headers and quotes
- Missing amounts, zero and data types
- Create a named stage, upload a file and find it
- Preview the file and explain every output column
- Download and remove staged files
- Choose a file format and compression contract
- Storage integrations and the two permission systems
- Snowflake S3 Storage Integration: AWS Role and Trust
- Google Cloud Storage: grant the generated identity
- Azure Blob: tenant consent and storage access
- Grant access, change configuration and retire an integration
- Cross-cloud access, S3-compatible endpoints and exports
- Lab: prove allowed access and reject an excluded path
Bulk Loading, Unloading & Schema Evolution
- Module overview →
- Bulk loading: files become table rows
- Preview, transform and keep file lineage
- Choose files and diagnose bad rows
- Load history, retries and safe file cleanup
- Unload rows into files and verify the export
- File size, compression and parallel loading
- Infer a schema and create a table from it
- Match names and evolve the table deliberately
- Nested inference and changing file contracts
- Lab: validate, export and evolve an order feed
Semi-Structured & Structured Data
- Module overview →
- VARIANT, OBJECT and ARRAY: read the shape first
- JSON paths: reach a value and give it a type
- Missing keys, JSON null and invalid input
- FLATTEN: one array becomes several rows
- Nested arrays: flatten one relationship at a time
- Load JSON and Parquet, then query the values
- XML: elements, attributes and content
- Typed OBJECT, ARRAY and MAP
- Lab: nested events to parent and child tables
Continuous Ingestion: Snowpipe & Snowpipe Streaming
- Module overview →
- How data gets into Snowflake: COPY INTO, Snowpipe and Streaming
- A pipe connects a file location to a table
- AWS: S3 events through SQS, SNS or EventBridge
- GCS: Pub/Sub notifications
- Azure: Event Grid and Storage Queue
- File REST ingestion and outbound error alerts
- Monitor queues, recover missed files and control retries
- Streaming architecture, SDKs and REST
- Channels and offsets: recover without guessing
- Kafka, Iceberg and operational monitoring
- Cost and capacity: measure bytes and freshness
- Lab: auto-ingest a file and design streaming recovery
Openflow & Source Connectors
- Module overview →
- What Openflow does—and what still needs a design
- Read a NiFi flow: processors, queues and back pressure
- Deployment, runtime and permission boundaries
- SharePoint: choose a site, an identity and an ACL policy
- Google Drive: scope the shared drive and preserve identity
- Initial sync, incremental changes and replay
- Monitor freshness, failures and safe recovery
- Choose Openflow, custom ingestion or Kafka
- Final lab: design and reconcile a document pipeline
Stored Procedures, UDFs & Snowflake Scripting
- Module overview →
- Choose a function or a procedure
- Build a reusable SQL transformation
- Return rows with a SQL UDTF
- Understand SQL, Python, Java and JavaScript handlers
- Variables, IF/ELSE and CASE
- Loops, cursors and result sets
- Caller rights, owner rights and execution access
- Lab: transform a batch and roll back on failure
Streams + Tasks: CDC & Orchestration
- Module overview →
- What Is Change Data Capture (CDC) in Snowflake?
- Snowflake Stream Metadata: INSERT, UPDATE and DELETE
- What Is a Snowflake Stream Offset?
- Snowflake Stream Types: Standard, Append-Only and Insert-Only
- Snowflake Stream Staleness and Multiple Consumers
- How SYSTEM$STREAM_HAS_DATA Works in Snowflake
- What Is a Snowflake Task?
- Snowflake Scheduled Tasks vs Triggered Tasks
- How to Track Order Changes with Event Versions
- How to MERGE Snowflake Stream Changes into a Table
- Snowflake Stream Rollback and Replay
- How to Run a Snowflake Task When a Stream Has Data
- What Is a Snowflake Task Graph?
- How to Monitor and Retry Snowflake Tasks
- Snowflake Stream Recovery Lab: Rebuild Order State
Dynamic Tables & Declarative Pipelines
- Module overview →
- What a dynamic table remembers
- Create the first stored transformation
- Target lag and the dependency graph
- Incremental, full and AUTO: choose deliberately
- Follow inserts, updates and deletes through the pipeline
- Read refresh history before changing the warehouse
- Bridge an incremental dynamic table into CDC
- Suspend, resume and change a pipeline safely
- Final lab: choose declarative or procedural processing
Data Modeling & Reliable Pipeline Design
- Module overview →
- ETL, ELT and delivery frequency
- Raw, curated and serving layers
- Facts, dimensions and the grain of a row
- Star schema, snowflake schema and Data Vault
- SCD Types 0, 1, 2 and 3
- Watermarks, CDC and idempotent delivery
- Create the customer-history lab
- Apply an incremental Type 2 batch atomically
- Late-arriving data and safe backfill
- Prove rollback, retry and data-quality invariants
- Final lab: join sales to the correct historical city
Time Travel, Fail-safe & Zero-Copy Cloning
- Module overview →
- Recovery starts with evidence, not a restore command
- Configure retention before you need recovery
- Choose the right historical boundary: AT and BEFORE
- Repair accidental deletes without losing new orders
- Recover incorrect updates and truncated data
- UNDROP tables, schemas and databases safely
- Time Travel and Fail-safe are different recovery promises
- Zero-copy cloning: a new object sharing existing data
- Copy-on-write: what changes after a clone is edited?
- Historical Dev/QA clones: isolate data and audit dependencies
- Measure retained storage and write a recovery runbook
- Final lab: recover orders and preserve a historical QA baseline
Query Performance & Optimization
- Module overview →
- How Snowflake executes a query
- Micro-partition pruning and selective filters
- Natural clustering, overlap and depth
- Choose clustering keys and evaluate maintenance
- Read Query Profile from the expensive operator outward
- Join explosion: fix the result before the runtime
- Reduce unnecessary work: filters, columns, windows and CTEs
- Memory pressure, spilling and redistribution
- Result reuse, warehouse cache and metadata
- Search Optimization for selective lookups
- Materialized Views and choosing a maintained result
- Query Acceleration and Snowflake Optima
- Sizing, concurrency and workload investigation
- Final lab: investigate a slow regional revenue report