Bird
Raised Fist0
Snowflakecloud~5 mins

Snowflake architecture (storage, compute, services layers) - Commands & Configuration

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Introduction
Snowflake is a cloud data platform that separates storage, compute, and services to make data easy to store, process, and manage. This separation helps users scale resources independently and pay only for what they use.
When you want to store large amounts of data without worrying about managing hardware.
When you need to run multiple data queries at the same time without slowing down other users.
When you want to easily add or remove computing power based on workload needs.
When you want a simple way to manage data security and user access.
When you want to connect your data platform to many cloud services without complex setup.
Commands
This command lists all compute warehouses available in your Snowflake account. Warehouses are the compute layer that process queries.
Terminal
SHOW WAREHOUSES;
Expected OutputExpected
name | state | size | type | auto_suspend | auto_resume MY_WH | RUNNING | XSMALL | STANDARD | 300 | TRUE
This command creates a new compute warehouse named 'my_wh' with automatic suspend after 5 minutes and auto resume enabled. This helps save costs by stopping compute when not in use.
Terminal
CREATE WAREHOUSE my_wh WITH WAREHOUSE_SIZE = 'XSMALL' AUTO_SUSPEND = 300 AUTO_RESUME = TRUE;
Expected OutputExpected
Warehouse MY_WH successfully created.
WAREHOUSE_SIZE - Sets the size of the compute warehouse.
AUTO_SUSPEND - Automatically suspends the warehouse after inactivity.
AUTO_RESUME - Automatically resumes the warehouse when a query runs.
This command sets the current compute warehouse to 'my_wh' so that queries run using its compute resources.
Terminal
USE WAREHOUSE my_wh;
Expected OutputExpected
Using warehouse MY_WH.
This command shows your Snowflake account name and cloud region, which are part of the services layer managing your environment.
Terminal
SELECT CURRENT_ACCOUNT(), CURRENT_REGION();
Expected OutputExpected
CURRENT_ACCOUNT() | CURRENT_REGION() MY_ACCOUNT | us-east-1
Key Concept

If you remember nothing else from this pattern, remember: Snowflake separates storage, compute, and services so you can scale and manage each independently.

Common Mistakes
Trying to run queries without selecting a warehouse first.
Queries need compute resources from a warehouse to run; without selecting one, queries will fail.
Always run 'USE WAREHOUSE your_warehouse_name;' before running queries.
Not enabling AUTO_SUSPEND on warehouses.
This causes warehouses to keep running and incur costs even when idle.
Set AUTO_SUSPEND to a reasonable time like 300 seconds to save costs.
Summary
Snowflake architecture splits storage, compute, and services layers for flexibility.
Compute warehouses process queries and can be created, sized, and managed independently.
Services layer manages account, security, and metadata without user intervention.

Practice

(1/5)
1. Which layer in Snowflake architecture is responsible for storing data securely in the cloud?
easy
A. Network layer
B. Storage layer
C. Services layer
D. Compute layer

Solution

  1. Step 1: Understand Snowflake layers

    Snowflake architecture has three main layers: storage, compute, and services.
  2. Step 2: Identify the storage role

    The storage layer holds all the data safely in the cloud, separate from compute and services.
  3. Final Answer:

    Storage layer -> Option B
  4. Quick Check:

    Storage = Data storage [OK]
Hint: Storage layer always holds your data safely [OK]
Common Mistakes:
  • Confusing compute with storage
  • Thinking services store data
  • Selecting network layer which doesn't exist in Snowflake
2. Which Snowflake layer runs queries and can scale independently?
easy
A. Compute layer
B. Services layer
C. Storage layer
D. Security layer

Solution

  1. Step 1: Recall Snowflake layers

    Snowflake separates compute, storage, and services layers.
  2. Step 2: Identify compute layer role

    The compute layer runs queries and can scale up or down independently from storage.
  3. Final Answer:

    Compute layer -> Option A
  4. Quick Check:

    Compute = Runs queries [OK]
Hint: Compute layer runs queries and scales [OK]
Common Mistakes:
  • Choosing storage for query execution
  • Confusing services with compute
  • Selecting security layer which is not a main layer
3. Given Snowflake's architecture, what happens if you pause a compute warehouse?
medium
A. Data in storage is deleted
B. Services layer shuts down
C. Compute and storage both pause
D. Queries stop running but data remains intact

Solution

  1. Step 1: Understand compute warehouse pause

    Pausing compute stops query processing but does not affect stored data.
  2. Step 2: Analyze impact on storage and services

    Storage remains active and data is safe; services continue managing metadata and security.
  3. Final Answer:

    Queries stop running but data remains intact -> Option D
  4. Quick Check:

    Pause compute = stop queries, keep data [OK]
Hint: Pausing compute stops queries, storage stays safe [OK]
Common Mistakes:
  • Thinking data is deleted on pause
  • Assuming services layer stops
  • Believing storage also pauses
4. A user reports slow query performance. Which Snowflake layer should you check first for scaling issues?
medium
A. Compute layer
B. Storage layer
C. Services layer
D. Network layer

Solution

  1. Step 1: Identify cause of slow queries

    Slow queries usually relate to compute resources being insufficient.
  2. Step 2: Check compute layer scaling

    Compute layer runs queries and can be scaled up or out to improve performance.
  3. Final Answer:

    Compute layer -> Option A
  4. Quick Check:

    Slow queries? Check compute scaling [OK]
Hint: Slow queries? Scale compute layer first [OK]
Common Mistakes:
  • Checking storage for query speed
  • Blaming services layer for performance
  • Selecting network layer which is not part of Snowflake
5. How does Snowflake's services layer contribute to security and metadata management?
hard
A. It stores all user data and query results
B. It runs queries and manages compute resources
C. It manages authentication, metadata, and transaction coordination
D. It handles physical storage of data files

Solution

  1. Step 1: Understand services layer role

    The services layer manages security, metadata, and coordinates transactions.
  2. Step 2: Differentiate from storage and compute

    Storage holds data; compute runs queries; services handle control tasks like authentication and metadata.
  3. Final Answer:

    It manages authentication, metadata, and transaction coordination -> Option C
  4. Quick Check:

    Services = Security + metadata + coordination [OK]
Hint: Services layer controls security and metadata [OK]
Common Mistakes:
  • Thinking services store data
  • Confusing compute with services
  • Assuming services run queries