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
Snowflake Architecture: Storage, Compute, and Services Layers
📖 Scenario: You are working as a cloud architect for a company that wants to understand how Snowflake organizes its cloud data platform. Snowflake separates its architecture into three main layers: storage, compute, and services. This separation helps the company scale efficiently and manage data securely.
🎯 Goal: Build a simple Snowflake setup that demonstrates the separation of storage, compute, and services layers by creating a database, a warehouse, and a role with specific privileges. This will help you see how Snowflake manages data storage, query processing, and access control separately.
📋 What You'll Learn
Create a database named company_data to represent the storage layer
Create a warehouse named compute_wh to represent the compute layer
Create a role named data_analyst to represent the services layer
Grant the data_analyst role usage on the warehouse and select privileges on the database
💡 Why This Matters
🌍 Real World
Snowflake's architecture allows companies to store large amounts of data securely, process queries efficiently, and manage user access separately. This separation helps in scaling and optimizing costs.
💼 Career
Understanding Snowflake's architecture is essential for cloud architects, data engineers, and database administrators who design and manage cloud data platforms.
Progress0 / 4 steps
1
Create the storage layer database
Create a database called company_data to represent the storage layer in Snowflake.
Snowflake
Hint
Use the CREATE DATABASE command followed by the database name.
2
Create the compute layer warehouse
Create a warehouse called compute_wh to represent the compute layer in Snowflake.
Snowflake
Hint
Use CREATE WAREHOUSE with a small size and enable auto suspend and resume for cost efficiency.
3
Create the services layer role
Create a role called data_analyst to represent the services layer in Snowflake.
Snowflake
Hint
Use CREATE ROLE followed by the role name.
4
Grant privileges to the role
Grant the data_analyst role usage on the compute_wh warehouse and select privileges on the company_data database.
Snowflake
Hint
Use GRANT USAGE ON WAREHOUSE and GRANT SELECT ON DATABASE commands for the role.
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
Step 1: Understand Snowflake layers
Snowflake architecture has three main layers: storage, compute, and services.
Step 2: Identify the storage role
The storage layer holds all the data safely in the cloud, separate from compute and services.
Final Answer:
Storage layer -> Option B
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
Step 1: Recall Snowflake layers
Snowflake separates compute, storage, and services layers.
Step 2: Identify compute layer role
The compute layer runs queries and can scale up or down independently from storage.
Final Answer:
Compute layer -> Option A
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
Step 1: Understand compute warehouse pause
Pausing compute stops query processing but does not affect stored data.
Step 2: Analyze impact on storage and services
Storage remains active and data is safe; services continue managing metadata and security.
Final Answer:
Queries stop running but data remains intact -> Option D