Visual Labs

Explore how the pieces fit.

Choose a concept and step through its explanation. These educational models do not connect to Snowflake or run SQL.

Module 01

Introduction, Setup & Connectivity

Interactive explainer1 / 3

What Snowflake does and when to use it

Orders
Payments
Refunds

Sources

Business systems produce related records.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Sources

    Business systems produce related records.

  2. Prepare

    The pipeline reconciles identifiers and definitions.

  3. Analyze

    Compute reads the prepared tables.

Read the full lesson: What Snowflake does and when to use it →

Interactive explainer1 / 3

Warehouses, lakes, lakehouses and traditional databases

CSV
Images
Application rows

Store

Preserve the source according to its purpose.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Store

    Preserve the source according to its purpose.

  2. Organize

    Choose table management and ownership.

  3. Serve

    Prepare the access pattern the consumer needs.

Read the full lesson: Warehouses, lakes, lakehouses and traditional databases →

Interactive explainer1 / 3

Compare Snowflake, BigQuery, Redshift and Databricks

5 GB daily
20 analysts
Morning deadline

Requirements

Specify the actual workload.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Requirements

    Specify the actual workload.

  2. Evaluate

    Use equivalent data and query outcomes.

  3. Decide

    Include the work needed to operate and migrate.

Read the full lesson: Compare Snowflake, BigQuery, Redshift and Databricks →

Interactive explainer1 / 3

Choose an edition, cloud provider and region

Features
Residency
Sources

Requirements

Identify the capability and location needs.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Requirements

    Identify the capability and location needs.

  2. Choose

    Record all three choices.

  3. Verify

    Check feature availability for the actual account.

Read the full lesson: Choose an edition, cloud provider and region →

Interactive explainer1 / 3

Understand accounts, organizations and identifiers

ACME
Learning account
Production account

Organization

A company groups its accounts.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Organization

    A company groups its accounts.

  2. Account

    Connect to the intended boundary.

  3. Context

    Resolve the correct objects within it.

Read the full lesson: Understand accounts, organizations and identifiers →

Interactive explainer1 / 3

Set up a trial and find your way around Snowsight

Approved choices
Verify email
Authentication

Register

Create or obtain the learning account.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Register

    Create or obtain the learning account.

  2. Orient

    Read account and execution context.

  3. Query

    Create a SQL file and inspect a small result.

Read the full lesson: Set up a trial and find your way around Snowsight →

Interactive explainer1 / 3

Find query evidence and explore databases

SQL text
Time
Query ID

Find

Locate the specific statement execution.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Find

    Locate the specific statement execution.

  2. Diagnose

    Read status and context together.

  3. Explore

    Resolve a table through its namespace.

Read the full lesson: Find query evidence and explore databases →

Interactive explainer1 / 3

Use the loading and administration interfaces

Header
Two orders
Expected total 140

Inspect

Read the small source file.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Inspect

    Read the small source file.

  2. Load

    Review target and detected format.

  3. Observe

    Inspect rows and administrative context.

Read the full lesson: Use the loading and administration interfaces →

Interactive explainer1 / 3

SnowSQL, Snowflake CLI and connection choices

Terminal
Java or BI
Python or HTTP

Select

Choose the interface supported by the application.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Select

    Choose the interface supported by the application.

  2. Configure

    Supply connection identity and approved authentication.

  3. Verify

    Inspect the actual session before accessing a table.

Read the full lesson: SnowSQL, Snowflake CLI and connection choices →

Interactive explainer1 / 3

Connect Java and desktop tools with JDBC and ODBC

Connection
Statement
ResultSet

JDBC

A Java application calls the database driver.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. JDBC

    A Java application calls the database driver.

  2. ODBC

    A tool finds a configured driver and data source.

  3. Close

    Inspect results and release client resources.

Read the full lesson: Connect Java and desktop tools with JDBC and ODBC →

Interactive explainer1 / 3

Read a result with the Python connector

Python environment
learning configuration
Session

Connect

Use the configured connection identity.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Connect

    Use the configured connection identity.

  2. Execute

    Bind a value and fetch the response.

  3. Finish

    Record query identity and release resources.

Read the full lesson: Read a result with the Python connector →

Interactive explainer1 / 3

Understand the SQL API request and response

POST
Statement
Context

Submit

Send SQL and context through an authenticated request.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Submit

    Send SQL and context through an authenticated request.

  2. Observe

    Follow the execution status.

  3. Retrieve

    Read the result and preserve evidence.

Read the full lesson: Understand the SQL API request and response →

Module 02

Architecture, Warehouses & Billing Basics

Interactive explainer1 / 3

Follow a query through storage, compute and cloud services

Sales records
Persistent storage
Reusable data

Keep

Stored sales records remain independently of reporting compute.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Keep

    Stored sales records remain independently of reporting compute.

  2. Coordinate

    The request is checked and planned before required work is dispatched.

  3. Process

    The reporting warehouse performs the calculation. Another warehouse can process authorized data independently.

Read the full lesson: Follow a query through storage, compute and cloud services →

Interactive explainer1 / 3

Micro-partitions, columnar storage and compression

Order ID
Region
Amount

Visible table

Users see columns and rows, not a disk assignment for each value.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Visible table

    Users see columns and rows, not a disk assignment for each value.

  2. Stored form

    The platform organizes standard table data and metadata.

  3. Read selectively

    For February, skip January-only data but inspect ranges that might include February.

Read the full lesson: Micro-partitions, columnar storage and compression →

Interactive explainer1 / 3

Metadata and the query optimizer

Columns
Privileges
Value ranges

Describe

Catalog and storage information describe the input.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Describe

    Catalog and storage information describe the input.

  2. Plan

    The optimizer selects operations for the requested result.

  3. Observe

    Compare the planned work with execution evidence.

Read the full lesson: Metadata and the query optimizer →

Interactive explainer1 / 3

Virtual warehouses, sizes and states

Loading
One warehouse
Reporting

Shared compute

Loading and reporting request work from one warehouse.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Shared compute

    Loading and reporting request work from one warehouse.

  2. Separate compute

    Each workload can receive its own execution resources.

  3. Check the result

    Ask whether reports are faster, current enough and worth the resource usage.

Read the full lesson: Virtual warehouses, sizes and states →

Interactive explainer1 / 3

Auto-suspend and auto-resume through a small lab

Request
Provision or resume
Run work

Start

Work needs compute, so the warehouse becomes available.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start

    Work needs compute, so the warehouse becomes available.

  2. Stop

    After appropriate inactivity, suspension stops compute while tables remain.

  3. Choose capacity

    One demanding task and many simultaneous tasks call for different investigations.

Read the full lesson: Auto-suspend and auto-resume through a small lab →

Interactive explainer1 / 3

Scaling up, scaling out and multi-cluster warehouses

Single slow query
Many arrivals
Profile and history

Observe

Separate execution work from waiting.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Observe

    Separate execution work from waiting.

  2. Scale up

    Change resources available within each cluster.

  3. Scale out

    Add clusters to serve concurrency.

Read the full lesson: Scaling up, scaling out and multi-cluster warehouses →

Interactive explainer1 / 3

Concurrency and query queueing

Dashboards
Transformations
Shared warehouse

Arrive

Requests overlap during a busy period.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Arrive

    Requests overlap during a busy period.

  2. Wait

    Inspect the reason for waiting.

  3. Respond

    Choose a remedy for the observed cause.

Read the full lesson: Concurrency and query queueing →

Interactive explainer1 / 3

Serverless features and their compute responsibilities

Daily batch
Arriving files
Maintenance

Choose work

Specify the freshness and operation.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose work

    Specify the freshness and operation.

  2. Identify compute

    Find who provisions the resources.

  3. Observe usage

    Read the service-specific evidence.

Read the full lesson: Serverless features and their compute responsibilities →

Interactive explainer1 / 4

Credits, compute billing, storage and cloud services

Credits/hour
Startup minimum
Active clusters

Measure compute

Multiply applicable rates by billed running intervals.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Measure compute

    Multiply applicable rates by billed running intervals.

  2. Measure storage

    Account for stored volume and retention.

  3. Adjust services

    Calculate the applicable daily cloud-services adjustment.

  4. Reconcile

    Keep the categories visible in the overall account picture.

Read the full lesson: Credits, compute billing, storage and cloud services →

Module 03

Database Objects & SQL Foundations

Interactive explainer1 / 3

Databases, schemas and tables

Northstar sales team
Business requirement

Start with the requirement

Northstar keeps its sales orders in L2_OBJECTS_LAB.SALES.ORDERS. Another schema can also have a table named ORDERS without being the same table.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar keeps its sales orders in L2_OBJECTS_LAB.SALES.ORDERS. Another schema can also have a table named ORDERS without being the same table.

  2. Choose the objects

    Compare the responsibilities: Database: A named container for schemas, such as L2_OBJECTS_LAB.; Schema: A namespace inside a database, such as SALES.; Table: Rows with named, typed columns, such as ORDERS.

  3. Explain the outcome

    Use the full name to identify the data; use a warehouse to process it.

Read the full lesson: Databases, schemas and tables →

Interactive explainer1 / 3

Choose numeric, text, Boolean and binary types

Sample rows
Question

Choose the input

A data type defines which values a column can hold and how Snowflake interprets them.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    A data type defines which values a column can hold and how Snowflake interprets them.

  2. Apply the SQL

    Use NUMBER(10,2) for an amount with two decimal places. Precision is the total number of digits and scale is the number after the decimal point. FLOAT is useful for approximate measurements, but money usually needs exact decimals.

  3. Explain the result

    The zeros are part of the identifier, not a quantity to calculate. Text preserves that meaning.

Read the full lesson: Choose numeric, text, Boolean and binary types →

Interactive explainer1 / 3

Read, filter and order rows

Sample rows
Question

Choose the input

SELECT chooses columns and expressions. WHERE filters rows; ORDER BY determines presentation; LIMIT caps the returned row count.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    SELECT chooses columns and expressions. WHERE filters rows; ORDER BY determines presentation; LIMIT caps the returned row count.

  2. Apply the SQL

    SQL tables do not promise a natural display order. ORDER BY matters when comparing outputs, especially with LIMIT. Add a stable tie-breaker so two equally priced orders do not swap unpredictably.

  3. Explain the result

    ID breaks ties so the LIMIT result has a predictable order.

Read the full lesson: Read, filter and order rows →

Interactive explainer1 / 3

CASE and missing values

Sample rows
Question

Choose the input

CASE chooses a result from conditions. NULL means missing or unknown, so it needs explicit handling.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    CASE chooses a result from conditions. NULL means missing or unknown, so it needs explicit handling.

  2. Apply the SQL

    NULL is not zero and not an empty string. Comparisons such as AMOUNT = NULL do not evaluate to true. Use IS NULL to identify missing values, and decide whether replacing them is honest for the business question.

  3. Explain the result

    No. It selects a presentation or calculation fallback; the underlying business value may still be unknown.

Read the full lesson: CASE and missing values →

Interactive explainer1 / 3

Clean, calculate and convert values

Sample rows
Question

Choose the input

Built-in functions transform text, numbers and dates. Conversion functions interpret values as a chosen type.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    Built-in functions transform text, numbers and dates. Conversion functions interpret values as a chosen type.

  2. Apply the SQL

    A conversion is an interpretation, not just a display change. The text 12.50 can become a decimal, while twelve cannot be parsed by ordinary numeric conversion. TRY functions help identify bad inputs, but silently dropping their NULL results can hide data quality problems.

  3. Explain the result

    Treat it as a conversion outcome to inspect; decide on a reject or correction rule instead of assuming the original number was zero.

Read the full lesson: Clean, calculate and convert values →

Interactive explainer1 / 3

Summarize groups with GROUP BY and HAVING

Sample rows
Question

Choose the input

GROUP BY combines rows into groups. Aggregate functions summarize each group; HAVING filters the summaries.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    GROUP BY combines rows into groups. Aggregate functions summarize each group; HAVING filters the summaries.

  2. Apply the SQL

    First decide the grain of the result: one row per region, per day or per customer. Every non-aggregated selected expression must be compatible with the grouping. Adding more grouping columns changes the question.

  3. Explain the result

    Use HAVING for the group total; WHERE operates before the groups exist.

Read the full lesson: Summarize groups with GROUP BY and HAVING →

Interactive explainer1 / 3

Dates, times and timestamp choices

Sample rows
Question

Choose the input

DATE stores a calendar date, TIME stores a clock time, and timestamps combine date and time with different time-zone semantics.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    DATE stores a calendar date, TIME stores a clock time, and timestamps combine date and time with different time-zone semantics.

  2. Apply the SQL

    Choose a timestamp type from the meaning of the source. A shop opening at 09:00 needs a local clock time plus its location rule. An event that occurred at one instant needs an explicit interpretation of its source zone.

  3. Explain the result

    No. It stores an offset with the instant; keep a separate named zone when future local-time rules matter.

Read the full lesson: Dates, times and timestamp choices →

Interactive explainer1 / 3

Choose how long a table should live

Northstar sales team
Business requirement

Start with the requirement

Keep the official order history in a permanent table. Use a temporary table for one analyst session and a transient table for rebuildable intermediate data.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Keep the official order history in a permanent table. Use a temporary table for one analyst session and a transient table for rebuildable intermediate data.

  2. Choose the objects

    Compare the responsibilities: Permanent: Persists until dropped; supports Time Travel and Fail-safe.; Temporary: Normally visible only within its creating session; removed when that session ends.; Transient: Persists across sessions until dropped, but has no Fail-safe.

  3. Explain the outcome

    Transient does not mean session-only, and temporary does not mean free.

Read the full lesson: Choose how long a table should live →

Interactive explainer1 / 3

Views and secure views

Northstar sales team
Business requirement

Start with the requirement

Northstar gives analysts a view of large orders. They work with a stable name while the query selects the relevant rows and columns.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar gives analysts a view of large orders. They work with a stable name while the query selects the relevant rows and columns.

  2. Choose the objects

    Compare the responsibilities: View: Stores a query definition rather than a separate copy of its result.; Secure view: Restricts definition visibility and some optimizations to protect sensitive data.; SELECT grant: Controls who can read the exposed result; SECURE does not grant access.

  3. Explain the outcome

    A view defines what to show. Permissions decide who may see it.

Read the full lesson: Views and secure views →

Interactive explainer1 / 3

Sequences generate identifiers

Northstar sales team
Business requirement

Start with the requirement

Northstar assigns an internal identifier to imported orders. It must not use the largest generated ID as its count of successful orders.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar assigns an internal identifier to imported orders. It must not use the largest generated ID as its count of successful orders.

  2. Choose the objects

    Compare the responsibilities: Sequence: A reusable generator of numeric values.; NEXTVAL: Requests the next generated value.; Gap: A missing number can occur without a missing business record.

  3. Explain the outcome

    Count records with COUNT; do not infer the count from a sequence.

Read the full lesson: Sequences generate identifiers →

Interactive explainer1 / 3

Create, change, empty and remove a table

Sample rows
Question

Choose the input

CREATE defines an object, ALTER changes its definition, TRUNCATE removes its rows, and DROP removes the object.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    CREATE defines an object, ALTER changes its definition, TRUNCATE removes its rows, and DROP removes the object.

  2. Apply the SQL

    Read the object name before running a changing command. These examples use a disposable table, not ORDERS. CREATE fails if the name already exists; choose a new name rather than adding OR REPLACE blindly.

  3. Explain the result

    TRUNCATE empties the table. DROP removes the object itself.

Read the full lesson: Create, change, empty and remove a table →

Interactive explainer1 / 3

Insert, update, delete and merge rows

Sample rows
Question

Choose the input

DML changes table rows. MERGE matches incoming rows to a target and chooses an update or insert action.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    DML changes table rows. MERGE matches incoming rows to a target and chooses an update or insert action.

  2. Apply the SQL

    Always inspect a WHERE condition before UPDATE or DELETE. Without a condition, the statement can affect every row. This example creates its own temporary target so earlier lesson data stays unchanged.

  3. Explain the result

    A match condition does not deduplicate the source. Make each intended source key unambiguous before applying changes.

Read the full lesson: Insert, update, delete and merge rows →

Interactive explainer1 / 3

Lab: build a small sales dataset

Sample rows
Question

Choose the input

Apply the object and SQL concepts to a small, disposable sales table and answer a business question.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the input

    Apply the object and SQL concepts to a small, disposable sales table and answer a business question.

  2. Apply the SQL

    Run the first database/schema lesson before this lab. You need CREATE TABLE on the lab schema and an authorized warehouse for the queries. Keep the same session because the table is temporary.

  3. Explain the result

    No known amount contributes to that group. Reporting zero would imply a known total and hide the missing-data issue.

Read the full lesson: Lab: build a small sales dataset →

Module 04

Advanced SQL & Transactions

Interactive explainer1 / 4

Inner, left, right and full outer joins

Asha: 1
101 → 1
102 → 1

Match Asha

Customer 1 matches orders 101 and 102, so there are two pairs.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Match Asha

    Customer 1 matches orders 101 and 102, so there are two pairs.

  2. Keep unmatched customers

    LEFT keeps Ben and Chen with NULL order columns.

  3. Keep an unmatched order

    RIGHT and FULL retain order 103 even though customer 4 is absent.

  4. Compare counts

    The chosen preserved side determines which unmatched rows remain.

Read the full lesson: Inner, left, right and full outer joins →

Interactive explainer1 / 3

Cross joins and self joins

Input rows
Business question

Begin with the question

A cross join creates every combination of two inputs. A self join uses two aliases for the same input to compare related rows.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    A cross join creates every combination of two inputs. A self join uses two aliases for the same input to compare related rows.

  2. Choose the operation

    A shop offers two sizes in three colors. CROSS JOIN is exactly the right operation to list six possible products. The same operation on a million rows and a million rows would describe a trillion pairs, so a missing join condition can be expensive.

  3. Check the meaning

    A cross join multiplies row counts: 4 × 5 = 20. Use it when every combination is intended.

Read the full lesson: Cross joins and self joins →

Interactive explainer1 / 3

Subqueries, correlated queries and semi/anti patterns

Input rows
Business question

Begin with the question

A subquery answers a smaller question inside a larger query. EXISTS asks whether a match exists; NOT EXISTS asks whether no match exists.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    A subquery answers a smaller question inside a larger query. EXISTS asks whether a match exists; NOT EXISTS asks whether no match exists.

  2. Choose the operation

    Suppose the business asks which customers ordered, not which orders they placed. An ordinary join repeats Asha for each order. EXISTS expresses the actual question and returns her customer row once.

  3. Check the meaning

    Use NOT EXISTS with the relationship condition. It tests absence without multiplying customer rows.

Read the full lesson: Subqueries, correlated queries and semi/anti patterns →

Interactive explainer1 / 3

CTEs and bounded recursion

Input rows
Business question

Begin with the question

A CTE names an intermediate query within one statement. A recursive CTE repeatedly uses its previous result to build a hierarchy or sequence.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    A CTE names an intermediate query within one statement. A recursive CTE repeatedly uses its previous result to build a hierarchy or sequence.

  2. Choose the operation

    A CTE is like a labeled step in a calculation: first summarize sales, then filter the summary. It improves readability but does not create a permanent table or guarantee materialization.

  3. Check the meaning

    The recursive predicate controls expansion. A real hierarchy also needs a strategy for cyclic relationships.

Read the full lesson: CTEs and bounded recursion →

Interactive explainer1 / 3

Combine result sets with set operators

Input rows
Business question

Begin with the question

Set operators combine compatible query results vertically. They answer questions about membership and duplicates, rather than matching columns as a join does.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    Set operators combine compatible query results vertically. They answer questions about membership and duplicates, rather than matching columns as a join does.

  2. Choose the operation

    Imagine two lists of customer IDs. A join puts related information side by side. A set operator compares or stacks the lists. Choose UNION ALL for preserving events and UNION only when removing duplicate result rows is intended.

  3. Check the meaning

    UNION ALL preserves every row. Removing duplicates is a separate business decision, not an automatic improvement.

Read the full lesson: Combine result sets with set operators →

Interactive explainer1 / 4

Window functions: keep the rows, add context

A: 200
B: 100
Two output rows

Group

GROUP BY customer collapses detail into two customer summaries.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Group

    GROUP BY customer collapses detail into two customer summaries.

  2. Window

    The window total is attached to each original event instead.

  3. Partition

    A and B are separate calculation groups. This is not physical storage partitioning.

  4. Output

    A final ORDER BY controls presentation. Seven records remain.

Read the full lesson: Window functions: keep the rows, add context →

Interactive explainer1 / 4

ROW_NUMBER, RANK and DENSE_RANK

100
50 and 50
NULL

Order A

Known amounts descend, then the unknown value is placed last.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Order A

    Known amounts descend, then the unknown value is placed last.

  2. Row number

    Unique event IDs decide the order of the two equal amounts.

  3. Rank

    A tie consumes two positions before the next rank.

  4. Dense rank

    Distinct value groups receive consecutive ranks.

Read the full lesson: ROW_NUMBER, RANK and DENSE_RANK →

Interactive explainer1 / 4

QUALIFY, latest records and deduplication

A: four events
B: three events
No amount filter

Candidates

All seven events participate. Unknown amounts are still valid candidates for latest-event selection.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Candidates

    All seven events participate. Unknown amounts are still valid candidates for latest-event selection.

  2. Number

    Order newest first inside each customer. Event ID resolves tied dates for this example.

  3. Qualify

    Keep the numbered winners. Other source rows remain stored or supplied.

  4. Change the question

    Exclude NULL before numbering and A’s candidate set changes.

Read the full lesson: QUALIFY, latest records and deduplication →

Interactive explainer1 / 4

Window frames: ROWS versus RANGE

Event 1: 100
Event 2: 50
Total: 150

ROWS at event 2

The ordered positions include 1 and 2 so far. Event 3 has not entered yet.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. ROWS at event 2

    The ordered positions include 1 and 2 so far. Event 3 has not entered yet.

  2. RANGE at Jan 2

    The date boundary includes both January 2 peers, not just whichever one appears first on the screen.

  3. ROWS at event 3

    The third position enters and the running sum catches up to 200.

  4. Unknown amount

    The final unknown amount does not add a known numeric value. The known total remains 200.

Read the full lesson: Window frames: ROWS versus RANGE →

Interactive explainer1 / 4

Running totals and moving averages

Current: 100
One observation
Sum/average: 100

Start

A’s first frame contains just 100. Both the running sum and known-value average are 100.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start

    A’s first frame contains just 100. Both the running sum and known-value average are 100.

  2. Advance

    At event 2, the two-row average uses 100 and 50.

  3. Slide

    At event 3, event 1 leaves the two-row frame.

  4. Missing

    At event 4, the frame contains one known 50 and one unknown amount.

Read the full lesson: Running totals and moving averages →

Interactive explainer1 / 4

LAG, LEAD and changes over time

Event 1
No previous event
Previous amount: NULL

First

The first record has no earlier record in its partition.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. First

    The first record has no earlier record in its partition.

  2. Next

    Event 2 reads event 1’s 100 and compares it with its own 50.

  3. Tie day

    Event ID places event 3 after event 2, although their dates match.

  4. Unknown current

    Event 4 has a known previous 50 but an unknown current amount.

Read the full lesson: LAG, LEAD and changes over time →

Interactive explainer1 / 3

PIVOT and UNPIVOT: reshape reports

Input rows
Business question

Begin with the question

PIVOT turns category values into columns using an aggregate. UNPIVOT turns selected columns into rows; it cannot recover detail lost during aggregation.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    PIVOT turns category values into columns using an aggregate. UNPIVOT turns selected columns into rows; it cannot recover detail lost during aggregation.

  2. Choose the operation

    A long sales table has one row per region and month. A report may want JAN and FEB next to each other. PIVOT performs that reshape, but it also aggregates if several source rows share a region/month.

  3. Check the meaning

    UNPIVOT reshapes the totals it receives. It cannot reconstruct source records that were combined by SUM.

Read the full lesson: PIVOT and UNPIVOT: reshape reports →

Interactive explainer1 / 3

GENERATE rows and evaluate lateral queries

Input rows
Business question

Begin with the question

GENERATOR supplies synthetic rows. A lateral query can refer to a preceding input row and return zero, one or several related rows for it.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    GENERATOR supplies synthetic rows. A lateral query can refer to a preceding input row and return zero, one or several related rows for it.

  2. Choose the operation

    Sometimes the missing input is a calendar or a small sequence, not a stored business table. GENERATOR creates rows; expressions in SELECT create their values. SEQ4 can have gaps, so use ROW_NUMBER when a contiguous number sequence matters.

  3. Check the meaning

    LATERAL allows the right-hand expression to depend on the preceding row. It can change both values and row counts.

Read the full lesson: GENERATE rows and evaluate lateral queries →

Interactive explainer1 / 4

ACID, autocommit and transaction boundaries

Account 1: 100
Account 2: 50

Starting balances

Two accounts total 150.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Starting balances

    Two accounts total 150.

  2. Uncommitted transfer

    Both updates are part of the same transaction.

  3. Rollback choice

    Discard both updates together.

  4. Commit choice

    Repeat the transfer and accept both changes.

Read the full lesson: ACID, autocommit and transaction boundaries →

Interactive explainer1 / 3

Isolation, concurrent DML and lock waits

Input rows
Business question

Begin with the question

Concurrent sessions can read and write at the same time, but conflicting writes may wait or fail. Isolation defines which changes a statement can see.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    Concurrent sessions can read and write at the same time, but conflicting writes may wait or fail. Isolation defines which changes a statement can see.

  2. Choose the operation

    Use two separate sessions, not two tabs that share one connection. A read in session B does not see an uncommitted write in session A. Later statements can see newly committed data; a transaction does not guarantee one frozen snapshot across all its statements.

  3. Check the meaning

    Each statement can observe newer committed work. Design retries around the complete business operation and avoid leaving transactions open.

Read the full lesson: Isolation, concurrent DML and lock waits →

Interactive explainer1 / 3

Lab: deduplicate, analyse and commit a batch

Input rows
Business question

Begin with the question

Apply deterministic ranking to a small event batch, calculate customer totals, then commit the chosen records as one controlled operation.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Begin with the question

    Apply deterministic ranking to a small event batch, calculate customer totals, then commit the chosen records as one controlled operation.

  2. Choose the operation

    An ingestion batch may contain several versions of one order. Keeping an arbitrary row is not a deduplication rule. Here the latest timestamp wins; if timestamps tie, the greatest event ID wins. Event IDs must represent an agreed ordering rule, not a convenient accident.

  3. Check the meaning

    Use the business key plus a complete, meaningful ordering rule. A successful deduplication SELECT does not by itself make repeated target inserts safe.

Read the full lesson: Lab: deduplicate, analyse and commit a batch →

Module 05

Stages, File Formats & Cloud Storage Integration

Interactive explainer1 / 4

From a file to a table: understand the journey

orders.csv
Five physical lines
Four orders

Source

The shop exports four orders plus a header.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Source

    The shop exports four orders plus a header.

  2. Location

    The stage provides access to the file.

  3. Interpretation

    The format tells the reader about the header, commas, quotes and missing amounts.

  4. Destination

    A later load operation writes typed rows into a table.

Read the full lesson: From a file to a table: understand the journey →

Interactive explainer1 / 4

Internal and external stages: choose the location

Laptop
Cloud bucket
Choose a route

Ask where

Start with the existing location of the source files.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Ask where

    Start with the existing location of the source files.

  2. Internal route

    Local files are uploaded into Snowflake-managed staging storage.

  3. External route

    A named external stage points to approved cloud storage.

  4. Reference

    Use @ to address files through a stage.

Read the full lesson: Internal and external stages: choose the location →

Interactive explainer1 / 4

Read CSV correctly: delimiters, headers and quotes

Five lines
Skip one header
Four data records

Header

Skip the label line, leaving four order records.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Header

    Skip the label line, leaving four order records.

  2. Separator

    A comma outside quotes ends a field.

  3. Enclosure

    The comma inside the quoted name remains part of that one field.

  4. Contract

    Save the agreed interpretation as a named format.

Read the full lesson: Read CSV correctly: delimiters, headers and quotes →

Interactive explainer1 / 4

Missing amounts, zero and data types

Empty field
NULL marker
Zero

Raw input

Keep the original representations distinct.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Raw input

    Keep the original representations distinct.

  2. Missing rules

    The agreed empty and textual markers become SQL NULL.

  3. Type check

    A readable field must still be convertible to its intended type.

  4. Meaning

    Do not hide conversion failures among genuinely missing values.

Read the full lesson: Missing amounts, zero and data types →

Interactive explainer1 / 4

Create a named stage, upload a file and find it

Database + schema
orders_csv_v1
Local orders.csv

Prepare

Select the sandbox context and create the format first.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Prepare

    Select the sandbox context and create the format first.

  2. Create

    Make an empty named internal stage.

  3. Transfer

    The supported local client reads and uploads the file.

  4. Inspect

    Confirm the file entry exists before trying to parse its contents.

Read the full lesson: Create a named stage, upload a file and find it →

Interactive explainer1 / 4

Preview the file and explain every output column

@orders_stage/incoming/
orders_csv_v1
Four records

Locate

Read the supplied file through the stage and explicit format.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate

    Read the supplied file through the stage and explicit format.

  2. Parse

    Position-based fields expose the source layout.

  3. Convert

    Names and casts turn source fields into understandable output.

  4. Trace

    Keep file metadata when investigating individual records.

Read the full lesson: Preview the file and explain every output column →

Interactive explainer1 / 3

Download and remove staged files

Source files
Storage location

Locate the data

GET downloads files from an internal stage to your client machine. REMOVE deletes staged files. Neither command is a table-row operation.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    GET downloads files from an internal stage to your client machine. REMOVE deletes staged files. Neither command is a table-row operation.

  2. Configure the boundary

    First distinguish downloading a file from querying its records. GET works with internal stages and a supported client such as SnowSQL. For an external stage, use the cloud provider’s download tools instead. A worksheet cannot write directly to your laptop folder.

  3. Observe the outcome

    GET is for internal stages. REMOVE targets files, so inspect its scope before running it.

Read the full lesson: Download and remove staged files →

Interactive explainer1 / 3

Choose a file format and compression contract

Source files
Storage location

Locate the data

A file format describes how bytes become records. File structure and compression are different choices: CSV can be compressed, and a .gz suffix alone does not tell you the record layout.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    A file format describes how bytes become records. File structure and compression are different choices: CSV can be compressed, and a .gz suffix alone does not tell you the record layout.

  2. Configure the boundary

    Choose from the actual source contract, not the filename alone. A JSON document and a CSV file both contain data, but splitting the JSON at commas is not a valid substitute for a JSON parser. Parquet and ORC are not text files to open and edit by hand.

  3. Observe the outcome

    The format is a parsing definition, not a conversion job.

Read the full lesson: Choose a file format and compression contract →

Interactive explainer1 / 3

Storage integrations and the two permission systems

Source files
Storage location

Locate the data

A storage integration is an account-level Snowflake object used to access approved external storage through a cloud identity. Cloud permissions and Snowflake privileges must both allow the operation.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    A storage integration is an account-level Snowflake object used to access approved external storage through a cloud identity. Cloud permissions and Snowflake privileges must both allow the operation.

  2. Configure the boundary

    Think of a building with two doors. Snowflake permissions decide whether your role can use the stage; cloud permissions decide whether the integration identity can access the files. Opening only one door is not enough.

  3. Observe the outcome

    Validate both Snowflake privileges and provider permissions. A location allowlist alone cannot authorize the cloud identity.

Read the full lesson: Storage integrations and the two permission systems →

Interactive explainer1 / 3

AWS S3: role permissions and trust

Source files
Storage location

Locate the data

An S3 integration uses an AWS IAM role. The role’s permission policy says what it may access; its trust policy says who may assume it.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    An S3 integration uses an AWS IAM role. The role’s permission policy says what it may access; its trust policy says who may assume it.

  2. Configure the boundary

    Choose a dedicated learning bucket and incoming/ prefix containing only the sample orders.csv. The AWS administrator creates a role using the official bootstrap procedure, then attaches the scoped read policy shown below. Bucket permissions apply to the bucket ARN; object permissions apply to object ARNs.

  3. Observe the outcome

    Trust permits assumption; the permission policy limits actions after assumption.

Read the full lesson: AWS S3: role permissions and trust →

Interactive explainer1 / 3

Google Cloud Storage: grant the generated identity

Source files
Storage location

Locate the data

A GCS integration identifies a Snowflake-managed service account. Your cloud administrator grants that identity access to the chosen bucket.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    A GCS integration identifies a Snowflake-managed service account. Your cloud administrator grants that identity access to the chosen bucket.

  2. Configure the boundary

    Create the integration first, then read STORAGE_GCP_SERVICE_ACCOUNT from DESC. Do not create an unrelated service account and assume Snowflake will use it. Use a dedicated lab bucket so the cloud permission scope is easy to reason about.

  3. Observe the outcome

    Bind cloud access to the exact generated identity, then verify actual file access.

Read the full lesson: Google Cloud Storage: grant the generated identity →

Interactive explainer1 / 3

Grant access, change configuration and retire an integration

Source files
Storage location

Locate the data

Integration lifecycle management means controlling who can use it, changing settings deliberately and removing dependencies before retirement.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    Integration lifecycle management means controlling who can use it, changing settings deliberately and removing dependencies before retirement.

  2. Configure the boundary

    An administrator can grant a builder role USAGE on the integration plus CREATE STAGE on the target schema. A reader of an existing external stage needs appropriate stage and parent-container access; do not assume every reader also needs permission to create integrations. File-format and warehouse permissions are separate.

  3. Observe the outcome

    Grant each permission at its own boundary; Snowflake SQL grants do not change cloud IAM.

Read the full lesson: Grant access, change configuration and retire an integration →

Interactive explainer1 / 3

Cross-cloud access, S3-compatible endpoints and exports

Source files
Storage location

Locate the data

The storage provider and Snowflake account location are separate choices. Supported access paths still need a deliberate plan for endpoints, transfer cost, data location and write permissions.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    The storage provider and Snowflake account location are separate choices. Supported access paths still need a deliberate plan for endpoints, transfer cost, data location and write permissions.

  2. Configure the boundary

    A valid URL does not prove the account can reach it. Review the provider’s supported endpoint and connectivity requirements, the organization’s data-residency rules and potential transfer charges. Avoid claiming all provider, region and private-network combinations work identically.

  3. Observe the outcome

    Validate the exact operation you intend to perform. Read access is not write access.

Read the full lesson: Cross-cloud access, S3-compatible endpoints and exports →

Interactive explainer1 / 3

Lab: prove allowed access and reject an excluded path

Source files
Storage location

Locate the data

Complete one provider setup, create a stage, then check both a permitted read and an excluded location. A trustworthy setup must demonstrate its boundary as well as its successful path.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate the data

    Complete one provider setup, create a stage, then check both a permitted read and an excluded location. A trustworthy setup must demonstrate its boundary as well as its successful path.

  2. Configure the boundary

    Choose AWS, GCS or Azure; you do not need all three. Finish that provider’s integration and cloud grants, then upload the shared orders.csv into incoming/ with the cloud provider’s approved upload tool. PUT is for internal stages, not this external upload.

  3. Observe the outcome

    Match the failure to its layer. Correct file access cannot compensate for incorrect parsing rules.

Read the full lesson: Lab: prove allowed access and reject an excluded path →

Module 1

Understanding modern data warehouses

Interactive explainer1 / 4

What is a data warehouse?

Orders
Payments
Returns

Collect

The order, payment and returns applications each hold one part of the story.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Collect

    The order, payment and returns applications each hold one part of the story.

  2. Prepare

    Connect records using the order ID and check currencies, dates and duplicates.

  3. Calculate

    In the example, payments of 150 minus refunds of 20 give net receipts of 130.

  4. Report

    Show the answer and the period it covers. A report based on yesterday’s load does not include today’s new payments.

Read the full lesson: What is a data warehouse? →

Interactive explainer1 / 3

Operational database vs data warehouse

Find item
Reserve stock
Confirm order

Checkout

One customer needs one order recorded correctly.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Checkout

    One customer needs one order recorded correctly.

  2. Pipeline

    Copy and prepare records for reporting. The reporting system may be behind the source.

  3. Report

    Read many orders to calculate a monthly total.

Read the full lesson: Operational database vs data warehouse →

Interactive explainer1 / 3

Traditional data warehouse challenges

More history
Same reports
Different capacity needs

Different needs

Historical records can grow while daily processing demand stays unchanged.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Different needs

    Historical records can grow while daily processing demand stays unchanged.

  2. Shared demand

    A load and dashboard requests compete for shared compute.

  3. Separate choices

    Consider independent storage and workload compute choices after identifying the cause.

Read the full lesson: Traditional data warehouse challenges →

Interactive explainer1 / 3

What is Snowflake?

Sales table
Persistent records
Stored history

Store

The sales table remains available independently of one running warehouse.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Store

    The sales table remains available independently of one running warehouse.

  2. Coordinate

    The request is checked and planned using identity and object information.

  3. Process

    Warehouse compute performs the needed work and returns totals.

Read the full lesson: What is Snowflake? →

Interactive explainer1 / 3

Why companies use Snowflake

Finance dashboard
Shared warehouse
Large analysis

Problem

Finance waits while a large analysis uses the same compute.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Problem

    Finance waits while a large analysis uses the same compute.

  2. Design

    Separate warehouses can serve the workloads against authorized shared data.

  3. Trade-off

    Monitor whether improved responsiveness justifies the additional active resources.

Read the full lesson: Why companies use Snowflake →

Interactive explainer1 / 3

Your first Snowflake mental model

North 30
North 20
South 10

Ask

Request totals by region. The question must define which sales belong in the calculation.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Ask

    Request totals by region. The question must define which sales belong in the calculation.

  2. Group

    Put the two North records together and the South record in its own group.

  3. Answer

    Return North 50 and South 10. A larger source could still produce only these two result rows.

Read the full lesson: Your first Snowflake mental model →

Module 2

Snowflake architecture

Interactive explainer1 / 3

The three-layer architecture

Sales records
Persistent storage
Reusable data

Keep

Stored sales records remain independently of reporting compute.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Keep

    Stored sales records remain independently of reporting compute.

  2. Coordinate

    The request is checked and planned before required work is dispatched.

  3. Process

    The reporting warehouse performs the calculation. Another warehouse can process authorized data independently.

Read the full lesson: The three-layer architecture →

Interactive explainer1 / 3

Database storage and logical objects

Order ID
Region
Amount

Visible table

Users see columns and rows, not a disk assignment for each value.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Visible table

    Users see columns and rows, not a disk assignment for each value.

  2. Stored form

    The platform organizes standard table data and metadata.

  3. Read selectively

    For February, skip January-only data but inspect ranges that might include February.

Read the full lesson: Database storage and logical objects →

Interactive explainer1 / 3

Virtual warehouses and workload isolation

Loading
One warehouse
Reporting

Shared compute

Loading and reporting request work from one warehouse.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Shared compute

    Loading and reporting request work from one warehouse.

  2. Separate compute

    Each workload can receive its own execution resources.

  3. Check the result

    Ask whether reports are faster, current enough and worth the resource usage.

Read the full lesson: Virtual warehouses and workload isolation →

Interactive explainer1 / 3

Cloud services, metadata and query planning

Connection
User identity
Session

Identify

Asha connects and the system establishes her identity.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify

    Asha connects and the system establishes her identity.

  2. Authorize

    The requested finance table is resolved and the permitted action is checked.

  3. Plan

    SQL and metadata are used to organize the required work.

Read the full lesson: Cloud services, metadata and query planning →

Interactive explainer1 / 3

Warehouse lifecycle and scaling

Request
Provision or resume
Run work

Start

Work needs compute, so the warehouse becomes available.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start

    Work needs compute, so the warehouse becomes available.

  2. Stop

    After appropriate inactivity, suspension stops compute while tables remain.

  3. Choose capacity

    One demanding task and many simultaneous tasks call for different investigations.

Read the full lesson: Warehouse lifecycle and scaling →

Interactive explainer1 / 3

Query paths and the three kinds of reuse

Object definitions
Data properties
Planning

Describe

Metadata helps identify relevant information.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Describe

    Metadata helps identify relevant information.

  2. Read less

    Previously read table values may be available locally, while calculations still run.

  3. Reuse answer

    An eligible previously computed result can avoid repeating its execution.

Read the full lesson: Query paths and the three kinds of reuse →

Module 3

Snowflake accounts, organizations and regions

Interactive explainer1 / 3

Organizations and accounts

Northstar organization
Development account
Production account

Group

Northstar’s organization links its environments.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Group

    Northstar’s organization links its environments.

  2. Contain

    Each account contains resources such as databases and warehouses.

  3. Separate

    Matching table names in two accounts do not make them the same data.

Read the full lesson: Organizations and accounts →

Interactive explainer1 / 3

Account boundaries, users and roles

Saved connection
Actual account
Intended environment

Destination

Confirm the account before trusting any object name.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Destination

    Confirm the account before trusting any object name.

  2. Permission

    The user identity and role context determine permitted actions.

  3. Data and compute

    Locate the table separately from choosing processing resources.

Read the full lesson: Account boundaries, users and roles →

Interactive explainer1 / 3

Cloud platforms and regions

AWS
Azure
Google Cloud

Provider

Choose the infrastructure platform as one part of the location decision.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Provider

    Choose the infrastructure platform as one part of the location decision.

  2. Region

    The account has a selected regional home within a supported platform.

  3. Data path

    Consider where information comes from and where its results go.

Read the full lesson: Cloud platforms and regions →

Interactive explainer1 / 3

Account identifiers and connection context

exampleorg
analyticsdev
exampleorg-analyticsdev

Identify destination

The fictional organization-and-account string describes where to connect.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify destination

    The fictional organization-and-account string describes where to connect.

  2. Authenticate

    Reaching a destination does not establish identity or permission.

  3. Choose context

    Set the intended role, objects and compute separately.

Read the full lesson: Account identifiers and connection context →

Interactive explainer1 / 3

Development, test and production environments

Development
Small example data
Proposed change

Prepare

Make the intended change in the development environment.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Prepare

    Make the intended change in the development environment.

  2. Review

    Confirm the requirement and follow the team’s process before changing production.

  3. Deploy

    Use the intended destination and controlled configuration.

Read the full lesson: Development, test and production environments →

Interactive explainer1 / 4

Choosing an account location: a practical scenario

Sources
Consumers
Requirements

Understand

List sources, consumers and approved constraints before choosing a location.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Understand

    List sources, consumers and approved constraints before choosing a location.

  2. Compare

    Evaluate supported locations against those specific needs.

  3. Record

    Write down the chosen destination and who operates it.

  4. Plan recovery

    Treat disruption recovery as its own design, not an automatic result of owning two accounts.

Read the full lesson: Choosing an account location: a practical scenario →

Module 4

Databases, schemas, tables and views

Interactive explainer1 / 4

Databases and schemas

Connected account
Object context
Access rules

Account

The connection establishes the account boundary. Identical database names in other accounts are different objects.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Account

    The connection establishes the account boundary. Identical database names in other accounts are different objects.

  2. Database

    The database groups schemas; it is not a warehouse or an allocation of compute.

  3. Schema

    Tables and views belong to schemas. The same short name in a different schema can identify a different object.

  4. Compute

    Authorized warehouse compute processes queries against the objects. It is separate from their logical containment.

Read the full lesson: Databases and schemas →

Interactive explainer1 / 4

Object names, identifiers and context

NORTHSTAR_LEARN
CORE
ORDERS

Full name

Each segment narrows the location within the connected account. None of these segments selects warehouse compute.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Full name

    Each segment narrows the location within the connected account. None of these segments selects warehouse compute.

  2. Short name

    An unqualified reference needs context. Check the account and current database/schema rather than assuming the short name is globally unique.

  3. Quoted name

    Under default behavior, the mixed-case quoted name differs from unquoted ORDERS. Use the intended spelling consistently.

  4. Literal

    The single-quoted word paid is a data value. It is not the name of a table or column.

Read the full lesson: Object names, identifiers and context →

Interactive explainer1 / 4

Tables, rows, columns and data types

One order
ORDER_ID
Order-level amount

Grain

The chosen record is one order, not one item or payment attempt. That decision determines how ORDER_ID should identify rows.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Grain

    The chosen record is one order, not one item or payment attempt. That decision determines how ORDER_ID should identify rows.

  2. Columns

    Each column has a type and meaning. Type information alone does not define currency or the revenue rule.

  3. Missing value

    Unknown, zero and empty text are different states. Treat them according to the field’s business meaning.

  4. Quality

    Required fields and business identity are different checks. Declaring a key on a standard table does not enforce uniqueness.

Read the full lesson: Tables, rows, columns and data types →

Interactive explainer1 / 4

Permanent, transient and temporary tables

Session ends
Table persists
Recovery policy

Permanent

The object survives the creating session. Recovery capabilities still have limits and are not a promise of indefinite history.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Permanent

    The object survives the creating session. Recovery capabilities still have limits and are not a promise of indefinite history.

  2. Transient

    The object also survives the session, but has no Fail-safe protection. Rebuildability must be an explicit design fact.

  3. Temporary

    The ordinary temporary table belongs to its creating session. It is not a reliable handoff to another session.

  4. Naming collision

    A temporary object with the same name can take precedence in its session. Distinct scratch names reduce confusion.

Read the full lesson: Permanent, transient and temporary tables →

Interactive explainer1 / 4

Views and the difference from tables

Order 101: paid
Order 102: pending
ORDERS table

Source table

The table stores order records. Two example rows are paid and pending; their values are inputs to the view definition.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Source table

    The table stores order records. Two example rows are paid and pending; their values are inputs to the view definition.

  2. Definition

    The regular view selects columns and filters paid records. Its definition does not create a second stored copy of the result.

  3. Source update

    If the pending order becomes paid, a later query can include it. The ordinary view does not need its own stored-row refresh job.

  4. Access design

    A view can limit an interface, but direct source permissions remain relevant. A restricted view is not a reason to ignore source access.

Read the full lesson: Views and the difference from tables →

Interactive explainer1 / 4

Designing a simple data object layer

CORE schema
ORDERS table
One row per order

Source responsibility

CORE.ORDERS stores order-level records with defined types and business meaning. It must be loaded and checked by a real process.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Source responsibility

    CORE.ORDERS stores order-level records with defined types and business meaning. It must be loaded and checked by a real process.

  2. Interface responsibility

    REPORTING.PAID_ORDERS presents selected columns and paid records. It is a regular view, not a second durable dataset.

  3. Consumer responsibility

    Finance queries the interface using appropriate access and compute. Results still depend on source freshness and meaning.

  4. Change impact

    Changing an underlying column can affect the view and its consumers. Trace the chain before altering the interface.

Read the full lesson: Designing a simple data object layer →

Module 5

Snowflake SQL fundamentals

Interactive explainer1 / 4

SELECT: ask your first question

101: 100
102: 50
103: NULL; 104: 80; 105: 0

Choose the source

Start with five order records. Each has an ID, customer, date, amount and status.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Choose the source

    Start with five order records. Each has an ID, customer, date, amount and status.

  2. Choose the columns

    SELECT picks the fields to show; it does not delete other fields from the source.

  3. Calculate an expression

    For order 101, 100 × 2 is 200. The source amount is still 100.

  4. Name the output

    An alias labels the calculated field so the reader knows what it means.

Read the full lesson: SELECT: ask your first question →

Interactive explainer1 / 4

WHERE: keep the rows you need

101: paid
103: paid
104: paid

Status filter

The paid rows are 101, 103 and 104. This is a row-selection rule, not a deletion.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Status filter

    The paid rows are 101, 103 and 104. This is a row-selection rule, not a deletion.

  2. Amount filter

    Require amount ≥ 80 too. Order 103 has an unknown amount, so it does not pass.

  3. Grouped alternatives

    Parentheses make the status alternatives one group before the amount condition is applied.

  4. Date interval

    January begins on January 1 and ends before February 1. Orders 101–103 are inside this interval.

Read the full lesson: WHERE: keep the rows you need →

Interactive explainer1 / 4

NULL, CASE and COALESCE

103: NULL
105: 0
Different meaning

Observe

Order 103 is unknown and 105 is known zero. Keep that distinction visible.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Observe

    Order 103 is unknown and 105 is known zero. Keep that distinction visible.

  2. Detect

    IS NULL identifies the missing record. Equality with NULL is not the right test.

  3. Label

    CASE checks unknown first, then large, then the fallback.

  4. Choose a fallback

    COALESCE may provide a display fallback. It does not repair the missing source fact.

Read the full lesson: NULL, CASE and COALESCE →

Interactive explainer1 / 4

ORDER BY, DISTINCT and LIMIT

100, 80, 50
0
NULL last

Sort

Ask for amounts from largest to smallest and explicitly place unknown values last.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Sort

    Ask for amounts from largest to smallest and explicitly place unknown values last.

  2. Tie-break

    If two amounts match, the next sort key determines their order.

  3. Limit

    After defining the order, keep the first two rows for this top-two question.

  4. Distinct

    The five source records contain only three different status strings.

Read the full lesson: ORDER BY, DISTINCT and LIMIT →

Interactive explainer1 / 4

Aggregates, GROUP BY and HAVING

5 rows
4 known amounts
1 unknown

Input

Five orders include one unknown amount. Counting rows and counting known values will differ.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Input

    Five orders include one unknown amount. Counting rows and counting known values will differ.

  2. Group

    The paid status contains three records. Two supply numeric amounts.

  3. Aggregate

    Summarize the paid bucket. Unknown is not converted into zero.

  4. Having

    Keep only groups whose known-amount total exceeds 100. Only paid passes here.

Read the full lesson: Aggregates, GROUP BY and HAVING →

Interactive explainer1 / 4

INNER, LEFT, RIGHT and FULL joins

101 + Asha
102 + Asha
103 + Ben; 105 + Cara

Inner

Only orders with a known customer match. 104 has customer 9 and is excluded.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Inner

    Only orders with a known customer match. 104 has customer 9 and is excluded.

  2. Left

    Keep every order. The unmatched order receives NULL customer fields.

  3. Right

    With customers on the right, preserve each customer, including Dev without an order.

  4. Full

    Preserve both unmatched sides. Four matched order rows plus unmatched 104 and unmatched Dev give six rows.

Read the full lesson: INNER, LEFT, RIGHT and FULL joins →

Interactive explainer1 / 4

CROSS JOIN and self joins

Asha, Ben
current, previous
2 × 2

Cross inputs

Two chosen customers and two reporting periods have no natural matching key in this exercise.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Cross inputs

    Two chosen customers and two reporting periods have no natural matching key in this exercise.

  2. Cross output

    Create every combination intentionally. These are reporting slots, not four actual purchases.

  3. Self aliases

    Use two names for the same order dataset to compare one order with another.

  4. Unique pair

    The less-than rule keeps 101–102, not 101–101 or 102–101.

Read the full lesson: CROSS JOIN and self joins →

Interactive explainer1 / 4

Strings, dates and type conversions

Input: " asha "
Trim: "asha"
Upper: "ASHA"

Text

TRIM removes surrounding spaces; UPPER gives a consistent display case. It does not establish customer identity.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Text

    TRIM removes surrounding spaces; UPPER gives a consistent display case. It does not establish customer identity.

  2. Dates

    January dates share a January 1 month bucket. February dates share February 1.

  3. Valid conversion

    A text amount with valid decimal formatting becomes an exact numeric value with the requested scale.

  4. Invalid conversion

    Invalid text becomes NULL with TRY conversion. Keep an error indicator rather than treating it as a genuine zero.

Read the full lesson: Strings, dates and type conversions →

Interactive explainer1 / 4

WITH, UNION and a complete business question

101: 100
103: NULL
104: 80

Filter

The paid_orders step keeps 101, 103 and 104. A CTE gives this intermediate expression a name.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Filter

    The paid_orders step keeps 101, 103 and 104. A CTE gives this intermediate expression a name.

  2. Match

    Match to known customers. 101 belongs to Asha, 103 to Ben, and 104 has no matching customer.

  3. Summarize

    Known amounts total 100 for Asha. Ben’s all-NULL input has no known sum.

  4. Stack distinction

    UNION ALL keeps repeated outputs, while UNION removes exact duplicate output rows. Neither operation is a customer matching rule.

Read the full lesson: WITH, UNION and a complete business question →

Module 6

Advanced SQL and window functions

Interactive explainer1 / 4

Window functions: keep the rows, add context

A: 200
B: 100
Two output rows

Group

GROUP BY customer collapses detail into two customer summaries.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Group

    GROUP BY customer collapses detail into two customer summaries.

  2. Window

    The window total is attached to each original event instead.

  3. Partition

    A and B are separate calculation groups. This is not physical storage partitioning.

  4. Output

    A final ORDER BY controls presentation. Seven records remain.

Read the full lesson: Window functions: keep the rows, add context →

Interactive explainer1 / 4

ROW_NUMBER, RANK and DENSE_RANK

100
50 and 50
NULL

Order A

Known amounts descend, then the unknown value is placed last.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Order A

    Known amounts descend, then the unknown value is placed last.

  2. Row number

    Unique event IDs decide the order of the two equal amounts.

  3. Rank

    A tie consumes two positions before the next rank.

  4. Dense rank

    Distinct value groups receive consecutive ranks.

Read the full lesson: ROW_NUMBER, RANK and DENSE_RANK →

Interactive explainer1 / 4

QUALIFY, latest records and deduplication

A: four events
B: three events
No amount filter

Candidates

All seven events participate. Unknown amounts are still valid candidates for latest-event selection.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Candidates

    All seven events participate. Unknown amounts are still valid candidates for latest-event selection.

  2. Number

    Order newest first inside each customer. Event ID resolves tied dates for this example.

  3. Qualify

    Keep the numbered winners. Other source rows remain stored or supplied.

  4. Change the question

    Exclude NULL before numbering and A’s candidate set changes.

Read the full lesson: QUALIFY, latest records and deduplication →

Interactive explainer1 / 4

Window frames: ROWS versus RANGE

Event 1: 100
Event 2: 50
Total: 150

ROWS at event 2

The ordered positions include 1 and 2 so far. Event 3 has not entered yet.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. ROWS at event 2

    The ordered positions include 1 and 2 so far. Event 3 has not entered yet.

  2. RANGE at Jan 2

    The date boundary includes both January 2 peers, not just whichever one appears first on the screen.

  3. ROWS at event 3

    The third position enters and the running sum catches up to 200.

  4. Unknown amount

    The final unknown amount does not add a known numeric value. The known total remains 200.

Read the full lesson: Window frames: ROWS versus RANGE →

Interactive explainer1 / 4

Running totals and moving averages

Current: 100
One observation
Sum/average: 100

Start

A’s first frame contains just 100. Both the running sum and known-value average are 100.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start

    A’s first frame contains just 100. Both the running sum and known-value average are 100.

  2. Advance

    At event 2, the two-row average uses 100 and 50.

  3. Slide

    At event 3, event 1 leaves the two-row frame.

  4. Missing

    At event 4, the frame contains one known 50 and one unknown amount.

Read the full lesson: Running totals and moving averages →

Interactive explainer1 / 4

LAG, LEAD and changes over time

Event 1
No previous event
Previous amount: NULL

First

The first record has no earlier record in its partition.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. First

    The first record has no earlier record in its partition.

  2. Next

    Event 2 reads event 1’s 100 and compares it with its own 50.

  3. Tie day

    Event ID places event 3 after event 2, although their dates match.

  4. Unknown current

    Event 4 has a known previous 50 but an unknown current amount.

Read the full lesson: LAG, LEAD and changes over time →

Interactive explainer1 / 4

FIRST_VALUE, LAST_VALUE and NTH_VALUE

Event 1
First position
FIRST_VALUE: 100

First

A’s chronological frame begins with amount 100.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. First

    A’s chronological frame begins with amount 100.

  2. Second

    The second position is event 2 with amount 50.

  3. Last record

    The full frame ends at event 4 with a NULL amount.

  4. Last known

    IGNORE NULLS finds the earlier known 50. It does not claim the final event’s amount was 50.

Read the full lesson: FIRST_VALUE, LAST_VALUE and NTH_VALUE →

Interactive explainer1 / 4

NTILE, distribution ranks and percentage shares

100 → bucket 1
50 → 1; 50 → 2
NULL → bucket 2

Bucket

A’s four positions become two buckets. Equal 50s can be split across the boundary.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Bucket

    A’s four positions become two buckets. Equal 50s can be split across the boundary.

  2. Relative rank

    Competition ranks map to a fraction of the rank range.

  3. Cumulative distribution

    The two 50 peers together end at position 3 of 4.

  4. Share

    Money shares divide the amount by the known customer total, not by a rank.

Read the full lesson: NTILE, distribution ranks and percentage shares →

Interactive explainer1 / 4

Subqueries, EXISTS and staged calculations

A: 100 found
B: none above 90
Two truth outcomes

Existence condition

A has an event above 90; B does not. Ask yes or no for each customer.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Existence condition

    A has an event above 90; B does not. Ask yes or no for each customer.

  2. Preserve outer grain

    Every A event is retained once by the existence filter, including its unknown event.

  3. Group

    Create one row per customer before ranking customer totals.

  4. Rank stage

    Now the ranking operates on the two summarized rows.

Read the full lesson: Subqueries, EXISTS and staged calculations →

Interactive explainer1 / 4

Activity groups: put the window ideas together

Jan 1
Jan 2, Jan 2
Jan 5

Dates

A’s sequence has a three-day gap before its final event. Same-day events remain separately ordered by ID.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Dates

    A’s sequence has a three-day gap before its final event. Same-day events remain separately ordered by ID.

  2. Boundaries

    Start at the first record and at a gap greater than two days.

  3. Running sum

    Accumulate the boundary flags to label the groups.

  4. Interpret

    The label must be paired with its customer. Late events can change the grouping when recomputed.

Read the full lesson: Activity groups: put the window ideas together →

Module 7

Stages and file formats

Interactive explainer1 / 4

From a file to a table: understand the journey

orders.csv
Five physical lines
Four orders

Source

The shop exports four orders plus a header.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Source

    The shop exports four orders plus a header.

  2. Location

    The stage provides access to the file.

  3. Interpretation

    The format tells the reader about the header, commas, quotes and missing amounts.

  4. Destination

    A later load operation writes typed rows into a table.

Read the full lesson: From a file to a table: understand the journey →

Interactive explainer1 / 4

Internal and external stages: choose the location

Laptop
Cloud bucket
Choose a route

Ask where

Start with the existing location of the source files.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Ask where

    Start with the existing location of the source files.

  2. Internal route

    Local files are uploaded into Snowflake-managed staging storage.

  3. External route

    A named external stage points to approved cloud storage.

  4. Reference

    Use @ to address files through a stage.

Read the full lesson: Internal and external stages: choose the location →

Interactive explainer1 / 4

Read CSV correctly: delimiters, headers and quotes

Five lines
Skip one header
Four data records

Header

Skip the label line, leaving four order records.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Header

    Skip the label line, leaving four order records.

  2. Separator

    A comma outside quotes ends a field.

  3. Enclosure

    The comma inside the quoted name remains part of that one field.

  4. Contract

    Save the agreed interpretation as a named format.

Read the full lesson: Read CSV correctly: delimiters, headers and quotes →

Interactive explainer1 / 4

Missing amounts, zero and data types

Empty field
NULL marker
Zero

Raw input

Keep the original representations distinct.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Raw input

    Keep the original representations distinct.

  2. Missing rules

    The agreed empty and textual markers become SQL NULL.

  3. Type check

    A readable field must still be convertible to its intended type.

  4. Meaning

    Do not hide conversion failures among genuinely missing values.

Read the full lesson: Missing amounts, zero and data types →

Interactive explainer1 / 4

Create a named stage, upload a file and find it

Database + schema
orders_csv_v1
Local orders.csv

Prepare

Select the sandbox context and create the format first.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Prepare

    Select the sandbox context and create the format first.

  2. Create

    Make an empty named internal stage.

  3. Transfer

    The supported local client reads and uploads the file.

  4. Inspect

    Confirm the file entry exists before trying to parse its contents.

Read the full lesson: Create a named stage, upload a file and find it →

Interactive explainer1 / 4

Preview the file and explain every output column

@orders_stage/incoming/
orders_csv_v1
Four records

Locate

Read the supplied file through the stage and explicit format.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate

    Read the supplied file through the stage and explicit format.

  2. Parse

    Position-based fields expose the source layout.

  3. Convert

    Names and casts turn source fields into understandable output.

  4. Trace

    Keep file metadata when investigating individual records.

Read the full lesson: Preview the file and explain every output column →

Interactive explainer1 / 4

External stages: a cloud address plus approved access

Shop export
Cloud storage
incoming/orders.csv

Producer

The application writes orders into the existing cloud bucket.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Producer

    The application writes orders into the existing cloud bucket.

  2. Trust

    Administrators configure approved access on both sides.

  3. Reference

    The external stage connects a name to the URL and access settings.

  4. Consume

    An authorized role lists and previews the existing files.

Read the full lesson: External stages: a cloud address plus approved access →

Interactive explainer1 / 4

Beyond CSV: troubleshoot and prepare for loading

CSV
JSON
Parquet

Identify

Choose a reader based on the actual file encoding and structure.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Identify

    Choose a reader based on the actual file encoding and structure.

  2. Locate

    Verify file selection and access before investigating field values.

  3. Interpret

    Check structure, missing-value rules and conversions.

  4. Hand off

    Document evidence and unresolved checks for the loading step.

Read the full lesson: Beyond CSV: troubleshoot and prepare for loading →

Module 8

COPY INTO and data loading

Interactive explainer1 / 4

Staged files to stored rows: what COPY INTO changes

orders.csv
@orders_stage/incoming/
orders_csv_v1

Locate

Module 7 made the file available and understandable.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Locate

    Module 7 made the file available and understandable.

  2. Prepare

    Create a target with the intended column types.

  3. Load

    COPY reads the chosen file and inserts accepted records.

  4. Reconcile

    Check both the operation and the resulting table.

Read the full lesson: Staged files to stored rows: what COPY INTO changes →

Interactive explainer1 / 4

Prepare the table and agree on column mapping

One order
Four fields
Known and missing values

Meaning

Define the meaning of one row before choosing types.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Meaning

    Define the meaning of one row before choosing types.

  2. Mapping

    Match the ordered source fields to the target.

  3. Context

    Use the intended role, database, schema and warehouse.

  4. Baseline

    Record the fresh target’s starting count.

Read the full lesson: Prepare the table and agree on column mapping →

Interactive explainer1 / 4

Validate first: discover errors without inserting rows

FILES
CSV format
Target types

Select

Choose the exact file and target to check.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Select

    Choose the exact file and target to check.

  2. Validate

    Check the supported load without inserting records.

  3. Diagnose

    The CSV structure is valid, but banana is not a numeric amount.

  4. Decide

    Correct the delivery and validate again before the real load.

Read the full lesson: Validate first: discover errors without inserting rows →

Interactive explainer1 / 4

Your first COPY INTO: read every clause and result

ORDERS_LOAD_LAB
Zero existing rows
Expected four orders

Destination

Start with the fresh target prepared earlier.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Destination

    Start with the fresh target prepared earlier.

  2. Read

    Select one file and interpret it with the agreed format.

  3. Insert

    Load the accepted records and inspect operation counts.

  4. Verify

    Check the stored records and their special cases.

Read the full lesson: Your first COPY INTO: read every clause and result →

Interactive explainer1 / 4

Choose exactly which files belong to a load

Today
Yesterday
Corrections

Inventory

A stage may contain multiple deliveries and formats.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Inventory

    A stage may contain multiple deliveries and formats.

  2. Scope

    Define which files belong to this operation.

  3. Inspect

    Compare actual entries with the expected delivery.

  4. Reconcile

    Validate and load the same reviewed set.

Read the full lesson: Choose exactly which files belong to a load →

Interactive explainer1 / 4

ON_ERROR: stop, skip the file or accept valid rows

201: 75.00
202: banana
203: 25.00

Input

Three records share one file; one amount cannot become a number.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Input

    Three records share one file; one amount cannot become a number.

  2. Abort

    The statement fails and adds no rows for this experiment.

  3. Skip

    The whole bad file is left out.

  4. Continue

    Valid records load, and the rejected order needs an explicit repair path.

Read the full lesson: ON_ERROR: stop, skip the file or accept valid rows →

Interactive explainer1 / 4

Prove the load: counts, history and missing records

Expected files
Observed files
Missing delivery?

Inventory

Check whether the intended delivery arrived.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Inventory

    Check whether the intended delivery arrived.

  2. Operation

    Read the COPY output and recent history.

  3. Table

    Check the stored data from several angles.

  4. Investigate

    Use source and job identity to explain discrepancies.

Read the full lesson: Prove the load: counts, history and missing records →

Interactive explainer1 / 4

Retry safely: file history is not order deduplication

Same table
Same unchanged file
Normally skipped

Same file

Known load metadata can prevent an immediate unchanged replay.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Same file

    Known load metadata can prevent an immediate unchanged replay.

  2. Same orders

    A new source file may still contain old business records.

  3. Partial repair

    Accepted records must be accounted for before replaying a correction.

  4. Verify

    Check the final business keys and values after the repair.

Read the full lesson: Retry safely: file history is not order deduplication →

Interactive explainer1 / 4

Simple load transformations and the complete hand-off

Target column list
SELECT expressions
Matching order

Map

Pair each destination column with a source expression.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Map

    Pair each destination column with a source expression.

  2. Trace

    Add source metadata without pretending it came from a CSV field.

  3. Separate

    Keep complex business transformations outside COPY.

  4. Complete

    A hand-off includes operational and business evidence.

Read the full lesson: Simple load transformations and the complete hand-off →

Object reference

Additional object concepts

Interactive explainer1 / 3

Stored query results: materialized views and dynamic tables

Northstar sales team
Business requirement

Start with the requirement

Northstar may accelerate a repeated sales total with a materialized view. A multi-step curated sales dataset may instead use dynamic tables.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar may accelerate a repeated sales total with a materialized view. A multi-step curated sales dataset may instead use dynamic tables.

  2. Choose the objects

    Compare the responsibilities: Materialized view: Precomputes a supported query over one base table for query acceleration.; Dynamic table: Maintains a query-defined result for a transformation pipeline.; Target lag: A desired freshness target for dynamic-table data, not a guaranteed schedule.

  3. Explain the outcome

    Choose by query support and freshness needs, then account for maintenance cost.

Read the full lesson: Stored query results: materialized views and dynamic tables →

Interactive explainer1 / 3

External, Iceberg and hybrid tables

Northstar sales team
Business requirement

Start with the requirement

Northstar has archived files in cloud storage, a shared Iceberg dataset and an application that updates individual records. These are three different object-selection questions.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar has archived files in cloud storage, a shared Iceberg dataset and an application that updates individual records. These are three different object-selection questions.

  2. Choose the objects

    Compare the responsibilities: External table: Exposes externally stored file data through table metadata; read-only through the external table.; Iceberg table: Uses the Apache Iceberg table format and a catalog; management capabilities depend on the catalog configuration.; Hybrid table: Optimized for transactional reads and writes with indexes and enforced keys.

  3. Explain the outcome

    A file location, an open table format and a transactional access pattern are not the same requirement.

Read the full lesson: External, Iceberg and hybrid tables →

Interactive explainer1 / 3

File formats and stages

Northstar sales team
Business requirement

Start with the requirement

Northstar receives orders.csv with a header and comma-separated values. The stage answers where it is; the file format answers how to read it.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar receives orders.csv with a header and comma-separated values. The stage answers where it is; the file format answers how to read it.

  2. Choose the objects

    Compare the responsibilities: File format: Parsing rules such as CSV delimiter and header handling.; Internal stage: A Snowflake-managed location for files.; External stage: A reference to a cloud storage location with configured access.

  3. Explain the outcome

    Creating a stage or file format does not upload a file or load a table.

Read the full lesson: File formats and stages →

Interactive explainer1 / 3

Pipes, streams and tasks

Northstar sales team
Business requirement

Start with the requirement

New order files are ingested through a pipe. A stream exposes changes in the landing table. A task can apply those changes to a reporting table.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    New order files are ingested through a pipe. A stream exposes changes in the landing table. A task can apply those changes to a reporting table.

  2. Choose the objects

    Compare the responsibilities: Pipe: Stores the COPY statement used by Snowpipe for file ingestion.; Stream: Tracks a change offset and exposes changes since that point.; Task: Runs SQL on a schedule or trigger using configured compute.

  3. Explain the outcome

    A stream does not run SQL for you, and a task does not automatically know which rows are new.

Read the full lesson: Pipes, streams and tasks →

Interactive explainer1 / 3

Functions, UDFs and stored procedures

Northstar sales team
Business requirement

Start with the requirement

Northstar uses UPPER to standardize a label, a UDF to calculate an amount after tax, and a procedure for a multi-step maintenance workflow.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar uses UPPER to standardize a label, a UDF to calculate an amount after tax, and a procedure for a multi-step maintenance workflow.

  2. Choose the objects

    Compare the responsibilities: Built-in function: Snowflake-provided behavior, such as UPPER or ROUND.; UDF: Your own function, called within supported SQL expressions.; Stored procedure: A named routine for a workflow, invoked with CALL.

  3. Explain the outcome

    Use a function for a reusable calculation; consider a procedure for coordinated actions.

Read the full lesson: Functions, UDFs and stored procedures →

Interactive explainer1 / 3

Alerts and integrations

Northstar sales team
Business requirement

Start with the requirement

Northstar wants to detect a failed load and send a notification. The alert decides when to act; the notification integration configures the allowed destination.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar wants to detect a failed load and send a notification. The alert decides when to act; the notification integration configures the allowed destination.

  2. Choose the objects

    Compare the responsibilities: Alert: Condition plus action, executed according to its configuration.; Storage integration: Configured access to supported external cloud storage.; Notification integration: Configuration for supported notification destinations or messaging.

  3. Explain the outcome

    An integration supplies a particular connection boundary; it is not a universal credential.

Read the full lesson: Alerts and integrations →

Interactive explainer1 / 3

Shares and listings

Northstar sales team
Business requirement

Start with the requirement

Northstar exposes a curated sales view to a partner. A private listing can describe the dataset and make it available to the intended consumer.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar exposes a curated sales view to a partner. A private listing can describe the dataset and make it available to the intended consumer.

  2. Choose the objects

    Compare the responsibilities: Share: A controlled set of object access grants for consumers.; Provider: The account publishing access to its data.; Consumer: The account using the shared data with its own access controls.

  3. Explain the outcome

    Sharing is deliberate access to selected data, not permission to edit the provider’s source tables.

Read the full lesson: Shares and listings →

Interactive explainer1 / 3

Tags and policies: label data, then enforce rules

Northstar sales team
Business requirement

Start with the requirement

Northstar labels customer email as sensitive. A masking policy can hide its value from an analyst role, while a row access policy can limit a regional team to its own rows.

Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.

Read the complete diagram explanation
  1. Start with the requirement

    Northstar labels customer email as sensitive. A masking policy can hide its value from an analyst role, while a row access policy can limit a regional team to its own rows.

  2. Choose the objects

    Compare the responsibilities: Tag: A name/value label used for organization and governance.; Masking policy: Controls the value returned for a column under defined conditions.; Row access policy: Controls which rows a query can return.

  3. Explain the outcome

    A sensitivity label alone does not hide data; enforcement needs the right policy and access design.

Read the full lesson: Tags and policies: label data, then enforce rules →