
Picture this: your company's sales data lives in a MySQL database, your marketing metrics are scattered across CSV exports from HubSpot, and your finance team swears by a collection of Excel files that only Debra in accounting fully understands. Every time leadership asks for a combined report, someone spends three days manually stitching it all together in a spreadsheet. You know there's a better way — and there is. It's called a cloud data warehouse, and it's the foundation of nearly every modern data operation.
A cloud data warehouse is a centralized repository where you can store, organize, and query massive amounts of structured data from multiple sources. Unlike a traditional database built for recording individual transactions (like processing an order or logging a user login), a data warehouse is designed for analysis — asking questions like "What were our top-performing product categories last quarter across all regions?" without grinding your production database to a halt. The "cloud" part means you don't manage any servers yourself. You pay for what you use, scale when you need to, and let the provider handle the infrastructure.
By the end of this lesson, you'll have a fully functional cloud data warehouse account — either Snowflake or BigQuery — with real data loaded and your first analytical queries running. You won't just click through a setup wizard; you'll understand what each piece does and why it matters.
What you'll learn:
Before creating an account, let's build a mental model of what you're working with. Skipping this step is why most beginners feel lost five minutes into their first session.
Think of a cloud data warehouse as a large, well-organized library. The library building itself is the database. Inside the library, books are grouped into sections (Fiction, History, Science) — those are schemas, logical groupings of related tables. The books themselves are the tables, where the actual data lives. And the librarians who retrieve books for you? In data warehouse terms, that's the compute layer — the processing power that actually runs your queries.
This separation of storage and compute is the key innovation of modern cloud data warehouses. In older systems, storage and compute were bundled together on the same servers. If you needed to run a complex query, you needed more servers — and those servers sat idle when nothing was running. Snowflake and BigQuery both separate these concerns. Your data sits in cloud storage (cheap), and compute spins up only when you're actively querying (you pay for what you use).
Snowflake's terminology:
BigQuery's terminology:
Neither is inherently better for a beginner. If you have a Google account already and want the fastest setup, go BigQuery. If you want to learn the tooling used most frequently in enterprise data engineering roles, go Snowflake. We'll walk through both.
Snowflake offers a 30-day free trial with $400 in credits — more than enough to complete every exercise in this lesson and experiment freely. Navigate to snowflake.com and click "Start for Free" in the top navigation.
You'll be asked to fill in your name, email, company name (you can enter anything), and choose a cloud provider and region. For learning purposes, choose AWS and US East (Northern Virginia) — it has the most documentation and community examples written against it. Select the Enterprise edition when prompted; the trial gives you Enterprise features at no cost, and you want to see what a real production environment looks like.
After confirming your email, Snowflake will provision your account and send you a login link. Your account URL will look something like https://abc12345.snowflakecomputing.com. Save this — it's your unique account identifier.
When you log in, you'll land in Snowsight, Snowflake's web-based interface. The left sidebar has icons for Worksheets (where you write SQL), Databases, Data Marketplace, Activity, and Admin. Spend two minutes just clicking around to get oriented.
Click "Worksheets" in the left nav, then click the blue "+" button in the top right to create a new worksheet. This is your SQL scratchpad. Think of it like a code editor that runs directly against your warehouse.
Before you can run any queries, you need compute. Click the "Admin" section in the left sidebar, then click "Warehouses." You'll see a default warehouse called COMPUTE_WH already created for you.
A virtual warehouse in Snowflake is a named cluster of compute resources. Key things to know:
COMPUTE_WH at X-Small size is perfect.Click COMPUTE_WH and verify that "Auto Suspend" is set to 5 minutes and "Auto Resume" is enabled. If not, edit those settings and save. Your trial credits will last much longer with auto-suspend on.
Back in your worksheet, let's create the structure to hold your data. Run these statements one by one (you can highlight a single statement and hit the Run button, or use Cmd/Ctrl+Enter):
-- Create a database to hold our analytics work
CREATE DATABASE analytics_dev;
-- Switch context to use that database
USE DATABASE analytics_dev;
-- Create a schema for raw, unmodified source data
CREATE SCHEMA raw_data;
-- Create a schema for cleaned, analysis-ready data
CREATE SCHEMA marts;
Notice we created two schemas. This is a real-world pattern: raw_data holds data exactly as it arrived from the source, and marts holds transformed, business-friendly tables. Even on your first day, practicing this separation will build good habits.
BigQuery's free tier is genuinely free with no expiration: you get 10 GB of storage and 1 TB of query processing per month at no charge. That's enough for serious learning and small production workloads.
Go to console.cloud.google.com and sign in with your Google account. If this is your first time in Google Cloud, you'll be prompted to agree to the terms of service. You may also be offered a free trial with $300 in credits — accept it, but know that we won't need it for this lesson.
Once in the console, you need to create a Project. A Project is Google Cloud's top-level organizational unit — think of it as a workspace where all your BigQuery datasets, permissions, and billing live. Click the project dropdown at the top of the page (it may say "Select a project" or show a default project name), then click "New Project." Name it wicked-smart-analytics (or any name you'll remember), leave the organization field as-is, and click "Create."
From the Google Cloud Console home page, click the hamburger menu (three horizontal lines) in the top left, scroll down to "Big Data," and click "BigQuery." Alternatively, use the search bar at the top and type "BigQuery" — it'll appear immediately.
You'll land in the BigQuery Studio interface. On the left, you'll see your project name with an arrow to expand it. In the center is a query editor. The layout is similar to Snowflake's worksheet view.
In BigQuery, a dataset is the container for tables — roughly equivalent to Snowflake's combination of database and schema. Click the three-dot menu (⋮) next to your project name in the left sidebar and select "Create Dataset."
Fill in the following:
raw_dataus-central1 (or US multi-region if available — it's more resilient)Click "Create Dataset." Repeat the process to create a second dataset called marts.
Why two datasets in BigQuery? Just like with Snowflake, this mirrors the real-world pattern of keeping raw source data separate from transformed, business-ready tables. It's a habit worth building from day one.
Now that your warehouse is set up, let's put something meaningful in it. We'll use a simplified e-commerce orders dataset — the kind of data you'd actually encounter working with an online retailer.
Create a file on your computer called orders.csv with the following content:
order_id,customer_id,order_date,product_category,product_name,quantity,unit_price,region,status
1001,C4892,2024-01-03,Electronics,Wireless Headphones,1,89.99,Northeast,completed
1002,C2341,2024-01-03,Apparel,Running Shoes,2,64.50,Southeast,completed
1003,C7821,2024-01-04,Electronics,USB-C Hub,1,34.99,West,completed
1004,C4892,2024-01-05,Home & Kitchen,Air Fryer,1,129.99,Northeast,completed
1005,C9123,2024-01-06,Apparel,Yoga Pants,3,38.00,Midwest,returned
1006,C3345,2024-01-07,Electronics,Bluetooth Speaker,1,59.99,West,completed
1007,C2341,2024-01-08,Home & Kitchen,Coffee Maker,1,79.99,Southeast,completed
1008,C6672,2024-01-09,Electronics,Wireless Headphones,2,89.99,Northeast,completed
1009,C9123,2024-01-10,Apparel,Running Shoes,1,64.50,Midwest,completed
1010,C7821,2024-01-11,Home & Kitchen,Air Fryer,1,129.99,West,cancelled
This dataset represents ten orders across four product categories, five regions, and three order statuses. Small enough to reason about completely, but realistic enough to practice real analytical questions.
In Snowsight, navigate to your analytics_dev database by clicking "Databases" in the left nav, then clicking ANALYTICS_DEV → RAW_DATA. Click the "Create" button and choose "Table" → "From File." In the dialog that appears, drag and drop your orders.csv file. Snowflake will automatically detect the column names and data types from the header row and first few rows of data.
Review the detected schema — make sure order_id, customer_id, quantity are detected as numbers, and order_date is detected as a date or string (either is fine for now). Name the table orders and click "Load." Snowflake will create the table and load the data in one step.
In the BigQuery Studio, click the three-dot menu next to your raw_data dataset and select "Create Table." In the Source section, change "Create table from" to "Upload" and select your orders.csv file. Set the file format to CSV.
In the Destination section, make sure your project and the raw_data dataset are selected, and name the table orders. Under Schema, click "Auto detect" — BigQuery will infer column types from the file. Click "Create Table."
BigQuery will run a load job (visible in the "Job History" at the bottom of the screen). It completes in seconds for small files like this.
With data loaded, let's ask real questions. The SQL syntax is nearly identical between Snowflake and BigQuery, so the following queries work in both (with one small note where they differ).
SELECT
product_category,
COUNT(order_id) AS total_orders,
SUM(quantity * unit_price) AS gross_revenue,
ROUND(AVG(quantity * unit_price), 2) AS avg_order_value
FROM raw_data.orders
WHERE status = 'completed'
GROUP BY product_category
ORDER BY gross_revenue DESC;
Run this and study the output. You're filtering to only completed orders (excluding returns and cancellations), then grouping by category to see which drives the most revenue. The ORDER BY gross_revenue DESC sorts from highest to lowest so the top performers appear first.
Tip: The pattern
SUM(quantity * unit_price)is a computed metric — you're multiplying two columns together before aggregating. This is extremely common in e-commerce analytics. Get comfortable with it.
SELECT
customer_id,
COUNT(order_id) AS order_count,
SUM(quantity * unit_price) AS lifetime_value,
MIN(order_date) AS first_order_date,
MAX(order_date) AS most_recent_order_date
FROM raw_data.orders
WHERE status = 'completed'
GROUP BY customer_id
ORDER BY lifetime_value DESC;
This is the foundation of a customer 360 view — aggregating all of a customer's transaction history into a single summary row. Notice customer C4892 appears twice in the raw data (orders 1001 and 1004), but this query collapses them into one row showing their total relationship with the business.
SELECT
region,
status,
COUNT(order_id) AS order_count
FROM raw_data.orders
GROUP BY region, status
ORDER BY region, status;
This query asks: "Are returns and cancellations concentrated in particular regions?" With only 10 rows it's illustrative, but in a real dataset with millions of orders, a query like this might reveal that your West Coast returns rate is 3x higher than everywhere else — a signal worth investigating.
Now it's your turn to work independently. Using the orders table you've loaded, answer the following questions by writing SQL queries:
Exercise 1: What is the total revenue (quantity × unit_price) for orders placed in January 2024 that have a completed status, broken down by week? (Hint: use DATE_TRUNC('week', order_date) in Snowflake or DATE_TRUNC(order_date, WEEK) in BigQuery.)
Exercise 2: Write a query that shows, for each product category, the percentage of orders that ended in a return or cancellation. (Hint: use COUNT(CASE WHEN status IN ('returned', 'cancelled') THEN 1 END) divided by COUNT(*), multiplied by 100.)
Exercise 3: Create a new table in your marts schema/dataset called customer_summary that contains the output of Query 2 from the previous section. In Snowflake: CREATE TABLE marts.customer_summary AS SELECT .... In BigQuery: use the "Save Results → BigQuery Table" option in the query editor, pointing to your marts dataset.
The third exercise is particularly important — it's the core workflow of data transformation: query from raw, write to a mart.
"My Snowflake query just sits there and doesn't run."
You almost certainly don't have a virtual warehouse selected. In the top right corner of the worksheet, there's a dropdown showing your active warehouse. If it's blank or says "No warehouse selected," click it and choose COMPUTE_WH. This is the most common first-day stumble in Snowflake.
"I'm getting a 'Table not found' error even though I can see the table in the sidebar."
Your SQL context (database and schema) doesn't match where the table lives. In Snowflake, either fully qualify the table name (analytics_dev.raw_data.orders) or run USE DATABASE analytics_dev; USE SCHEMA raw_data; at the top of your worksheet. In BigQuery, always qualify tables with the dataset name: raw_data.orders.
"BigQuery is warning me about query costs before I run." This is BigQuery's cost estimation feature, not an error. BigQuery scans entire columns even if you're only looking at a few rows — this is how its columnar storage works. For our small dataset, the cost will be effectively zero. Click through the warning. Once you're working with gigabyte-scale tables, you'll appreciate this warning.
"I accidentally loaded the CSV twice and now have duplicate rows."
This happens to everyone. Run SELECT COUNT(*) FROM raw_data.orders; to check your row count. If you have 20 rows instead of 10, use TRUNCATE TABLE raw_data.orders; in Snowflake to clear the table, then reload. In BigQuery, go to the table, click "Schema" tab, then use the query DELETE FROM raw_data.orders WHERE TRUE; (BigQuery requires a WHERE clause on DELETE statements).
"My date column loaded as a string (VARCHAR/STRING) instead of a date."
This is common when auto-detection is conservative. It doesn't break most queries, but if you need to do date math (like truncating to week), you'll need to cast it: CAST(order_date AS DATE). For a more permanent fix, you can create the table with explicit column types before loading.
You've covered a lot of real ground here. You understand the architectural difference between a transactional database and an analytical data warehouse, you've provisioned cloud infrastructure (either Snowflake or BigQuery) without touching a server, you've loaded real data, and you've written queries that answer genuine business questions. That's not nothing — that's the foundation that every modern data stack is built on.
Here's the honest summary of what each platform offers:
Snowflake gives you more explicit control over compute (virtual warehouses), a very clean SQL dialect, and is the dominant choice in enterprise data engineering. If you're aiming for a career in data, learn this deeply.
BigQuery gets you up and running fastest, integrates naturally with the rest of Google Cloud (like Looker Studio for visualization and Cloud Storage for staging files), and its serverless model means fewer knobs to turn. Excellent for teams that already live in Google Workspace.
Where to go from here:
The data warehouse you set up today is the same kind of infrastructure powering billion-dollar analytics teams. The concepts don't change as you scale — only the data volumes do.
Learning Path: Modern Data Stack