Snowflake
Snowflake
Definition: A cloud-native data warehouse platform, delivered entirely as a managed service, that separates storage and compute into independently scalable layers. Founded in 2012 by Benoit Dageville, Thierry Cruanes, and Marcin Zukowski — three database engineers previously at Oracle — Snowflake was architected from its first line of code to run on public cloud infrastructure, rather than adapted from an existing on-premises database engine the way several competitors were. That from-scratch design is what let it treat elastic compute, near-unlimited object storage, and pay-per-second billing as first-class primitives instead of bolted-on afterthoughts. It has since become one of the most widely adopted analytics warehouses, commonly named alongside Google BigQuery and Amazon Redshift as one of the “big three” cloud data warehouses.
Architecture
- Three-layer architecture — Snowflake’s foundational design splits the system into a Cloud Services layer, a Compute layer, and a Storage layer, each independently scalable and separately billed
- Storage layer — every table is stored once, compressed and organized into micro-partitions on cloud object storage (S3, Azure Blob, or GCS depending on the hosting cloud), shared by every warehouse that needs it
- Compute layer (Virtual Warehouses) — an independent cluster of compute resources that executes queries against the shared storage; an account can run any number of warehouses side by side, sized from X-Small up to 6X-Large
- Cloud Services layer — coordinates query parsing, optimization, transaction management, metadata, authentication, and access control across the account, without itself scanning data
- Elastic, automatic scaling — a warehouse can be resized up or down in seconds with no downtime, and configured to auto-suspend after a period of inactivity and auto-resume the instant a new query arrives
- Zero-copy cloning —
CREATE TABLE ... CLONEproduces a full logical copy of a table, schema, or database that shares underlying micro-partitions with the original until either side changes, so cloning a multi-terabyte table costs close to nothing in storage - Time travel — historical versions of table data are retained for a configurable window (up to 90 days on higher editions), letting you query, clone, or restore data as it existed at a past point in time
- Cost isolation by design — because each team’s workload runs on its own warehouse, one team’s heavy query or peak load never slows down or inflates the bill for another team querying the same underlying tables
The three layers, and how they relate:
Why It Matters
- Eliminated the capacity-planning tradeoff that defined on-premises and early cloud warehouses — no more provisioning for peak load and eating idle cost the rest of the time, or under-provisioning and bottlenecking at peak
- Decoupling storage from compute means one governed copy of data can serve BI dashboards, ad hoc analyst queries, ELT transformation jobs, and data science workloads at once, each on right-sized, independently billed compute — see OLTP vs OLAP
- Consumption-based pricing aligned the platform’s incentives with actual usage instead of fixed capacity, reshaping how the broader cloud data warehouse market prices itself
- Native support for semi-structured data (JSON, Avro, Parquet, XML) alongside structured SQL tables removed a common reason teams historically stood up a separate data lake just to hold raw or nested data — see Data Lake vs Data Warehouse
- Secure Data Sharing lets one account expose live, governed data to another account without copying, transferring, or ETL-ing anything — provider and consumer query the same underlying bytes
Under the Hood: Micro-Partitions and Automatic Optimization
When data lands in Snowflake, it never sits as one large flat file the way a raw data lake might store it. Snowflake automatically reorganizes every table into micro-partitions — small, immutable, columnar-compressed chunks, commonly 50-500MB of uncompressed data each — with no manual partitioning, indexing, or vacuuming decisions required from the user.
- Ingest — incoming rows, whether from a bulk
COPY INTO, Snowpipe streaming, or a plainINSERT, are grouped and written as new micro-partitions; existing partitions are never edited in place, only replaced - Columnar storage — within each micro-partition, data is stored column by column and compressed, so a query touching three columns of a 200-column table never reads the other 197
- Metadata capture — for every micro-partition, the Cloud Services layer automatically records the min/max value, row count, and null count for each column
- Pruning at query time — when a query carries a filter, the optimizer checks that metadata first and skips any micro-partition whose min/max range can’t possibly match, often eliminating well over 90% of a table’s partitions before one is scanned
- Clustering — on very large tables, an explicit or automatically-maintained clustering key keeps related rows physically co-located across micro-partitions, and Snowflake can re-cluster in the background as new data arrives and ordering skew grows
- Result caching — an identical query against unchanged data can be served straight from a metadata-backed result cache, without spinning up warehouse compute at all
- Query profiling — every executed query gets a detailed execution profile afterward (partitions scanned vs. pruned, bytes spilled to local or remote disk, time per operator) available for tuning
This is what replaces the manual index design, partitioning schemes, and vacuum jobs that older warehouses needed a dedicated DBA to maintain — pruning happens automatically, on every query, from metadata Snowflake was already collecting at write time.
Because storage is shared, this also means multiple independent warehouses can exploit the exact same pruning metadata concurrently, with no coordination overhead between them:
Comparison: Snowflake vs BigQuery vs Redshift
| Snowflake | BigQuery | Redshift | |
|---|---|---|---|
| Compute model | Independent Virtual Warehouses, user-managed sizing | Serverless, Google-managed slot allocation | Provisioned clusters (RA3 nodes) or Redshift Serverless |
| Pricing model | Per-second compute credits, plus separate storage cost | On-demand per-byte-scanned, or flat-rate slot reservations | Per-node-hour (provisioned) or per-RPU-second (serverless) |
| Key differentiator | Storage/compute separation across many independent warehouses on one copy of data | No infrastructure to manage at all — Google handles capacity behind the scenes | Deepest integration with the AWS ecosystem (S3, Glue, IAM) |
| Typical fit | Multi-team orgs needing workload isolation and cross-account data sharing | Teams wanting zero cluster management and tight GCP integration | AWS-centric shops already invested in the AWS data stack |
| Multi-cloud availability | Runs natively on AWS, Azure, and GCP | GCP only (Google-operated) | AWS only |
| Native semi-structured data | JSON, Avro, Parquet, XML via the VARIANT type | JSON native, with nested and repeated fields | JSON support via the SUPER type |
Common Pitfalls
- Leaving virtual warehouses running when nobody is actively querying them — auto-suspend exists specifically to prevent this, and disabling or loosening it is a common source of surprise bills
- Oversizing a warehouse “just in case” — a Large warehouse costs roughly 4x an X-Small per second regardless of whether the query actually needs that much compute, and most dashboard-style queries don’t
- Skipping zero-copy cloning for dev and test environments and instead running a full export/reload or
COPY, which duplicates storage and takes far longer for no real benefit - Treating time travel retention as a full backup or disaster-recovery strategy — it’s bounded (commonly 1-90 days depending on edition) and lives in the same account, not a substitute for genuine cross-region backup planning
- Writing queries that scan far more data than needed — missing filters or a
SELECT *on a wide table directly inflates cost, since compute is billed by time, not just latency - Ignoring clustering on very large, frequently filtered tables, letting automatic pruning degrade as a table grows into the billions of rows without a clustering key aligned to common filters
- Under-using resource monitors, leaving no automatic guardrail to suspend warehouses or alert anyone before a runaway job or misconfigured pipeline burns through an unplanned credit spend
Worked Example
Tracing a single SELECT statement from submission to result shows how the three layers cooperate:
| Step | Layer involved | What happens |
|---|---|---|
| 1 | Cloud Services | Query is parsed, checked against access-control policies, and handed to the optimizer |
| 2 | Cloud Services | Optimizer builds an execution plan and checks the result cache for an identical, still-valid prior result |
| 3 | Cloud Services | Metadata store is consulted to identify which micro-partitions could possibly match the query’s filters |
| 4 | Compute | The target Virtual Warehouse, auto-resuming first if suspended, is assigned the pruned list of micro-partitions |
| 5 | Compute | Warehouse nodes read only the needed columns from the needed micro-partitions, in parallel |
| 6 | Storage | Requested columnar data blocks are streamed up to the compute nodes for that warehouse |
| 7 | Compute | Aggregation, joins, and filtering finish on the warehouse; partial results are combined across nodes |
| 8 | Cloud Services | Final result set is returned to the client, and the result is cached for any identical future query |
| 9 | Cloud Services | Query text, duration, and bytes scanned are logged to query history for monitoring, auditing, and billing |
Real-World Use
- Centralized analytics and BI — a single governed warehouse serves as the source of truth queried by dashboarding tools across an organization
- Cross-organization data sharing — retailers sharing point-of-sale data with suppliers, or vendors monetizing curated datasets, use Secure Data Sharing instead of building and maintaining data export pipelines
- ELT transformation target — raw data loads first and is transformed in place with SQL, commonly orchestrated with dbt and scheduled by Apache Airflow, leaning on Snowflake’s own compute rather than a separate cluster — see ETL vs ELT
- Streaming and near-real-time ingestion — Snowpipe and Snowpipe Streaming continuously load data arriving from sources like Apache Kafka within seconds to minutes, rather than waiting on a batch window — see Batch vs Stream Processing
- Powering customer-facing analytics — SaaS products embed Snowflake-backed dashboards directly into their own applications, relying on warehouse isolation so one heavy customer’s usage doesn’t degrade another’s experience
Best Practices
- Set aggressive auto-suspend timeouts (often 60-300 seconds) on interactive warehouses, since resuming costs a second or two while idle compute is pure waste
- Right-size warehouses per workload instead of running one large, shared warehouse for everything — a dashboard query and a heavy transformation job have very different compute needs
- Use resource monitors to cap credit spend at the warehouse or account level, with alerts or automatic suspension before a budget is exceeded
- Lean on zero-copy cloning to spin up dev, test, and staging environments from production data instantly, without paying for duplicated storage
- Define clustering keys only on large tables that actually need them, and monitor clustering depth rather than applying them speculatively everywhere
- Separate warehouses by workload type — ingestion, transformation, BI, data science — so usage and cost stay attributable to the team or process that generated them
FAQ
Is Snowflake built on top of AWS, Azure, or Google Cloud? All three — a given account runs on exactly one of them, chosen at account creation, and Snowflake behaves the same way on top of each.
Does Snowflake require you to manage servers or clusters? No — provisioning, patching, and infrastructure management are entirely handled by Snowflake; the only capacity decision left to the user is which warehouse size to run and when.
Can two virtual warehouses corrupt or conflict over the same data? No — the Cloud Services layer manages transactional consistency centrally, so multiple warehouses reading and writing the same tables see a consistent, isolated view without manual locking.
Is time travel the same thing as a backup? Not really — it’s a bounded retention window for querying or restoring recent historical states, useful for undoing accidental changes, but not a substitute for a genuine cross-region backup and disaster-recovery plan.
How is Snowflake billed? Primarily two components — per-second compute usage, billed in credits that vary by warehouse size, and storage, billed separately by the compressed volume of data actually stored.
Does Snowflake support unstructured or semi-structured data? Yes — JSON, Avro, ORC, Parquet, and XML are supported natively through the VARIANT data type, alongside unstructured file support for images, PDFs, and similar formats.
History
- Founded in 2012 by Benoit Dageville, Thierry Cruanes, and Marcin Zukowski, three data-warehousing engineers who had previously worked together at Oracle
- Built cloud-native from its earliest design decisions, rather than porting an existing on-premises database engine onto cloud infrastructure the way some competitors did
- Operated in stealth mode for roughly two years before publicly launching in 2014, with broader general availability following in 2015
- Expanded beyond AWS, its original cloud, to Azure in 2018 and Google Cloud in 2019, becoming the first major data warehouse to run natively across all three
- Went public on the NYSE in September 2020, at the time the largest software IPO in history and one of the largest tech IPOs of any kind
- Has since expanded well beyond its warehousing roots into data marketplaces, Snowpark for Python/Java/Scala workloads, and native support for AI and machine learning workloads
Common Interview Questions
- “What problem does separating storage from compute actually solve?” — expect an answer centered on eliminating contention between workloads and letting each scale and bill independently, not just “it’s faster”
- “How does Snowflake avoid needing manually defined indexes?” — expect an explanation of micro-partitions and the automatically collected metadata that enables pruning at query time
- “What is zero-copy cloning, and why is it cheap?” — expect an answer describing a metadata-only copy that shares underlying micro-partitions until data diverges, rather than a physical data copy
- “How would you control runaway Snowflake costs on a team’s account?” — expect mention of auto-suspend, right-sized warehouses, and resource monitors, not just “reduce usage”
- “When would you choose Snowflake over BigQuery or Redshift?” — expect a reasoned tradeoff involving multi-cloud needs, data sharing requirements, or existing cloud-provider commitments, not a one-size-fits-all answer
Related Terms
- Data Lake vs Data Warehouse
- OLTP vs OLAP
- ETL vs ELT
- Data Pipeline
- Auto-Scaling
- Cloud Storage Systems
- Data Quality and Validation
Example
An analytics team runs ELT with dbt, loading raw JSON event data into Snowflake via Snowpipe and transforming it into clean tables with SQL that runs on a dedicated “transform” virtual warehouse, while a separate, smaller “BI” warehouse serves dashboard queries against those same transformed tables — both warehouses read identical underlying data, scale independently, and show up as separate line items on the monthly bill.
Referenced by