Explore how the pieces fit.
Choose a concept and step through its explanation. These educational models do not connect to Snowflake or run SQL.
Introduction, Setup & Connectivity
What Snowflake does and when to use it
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
- Sources
Business systems produce related records.
- Prepare
The pipeline reconciles identifiers and definitions.
- Analyze
Compute reads the prepared tables.
Read the full lesson: What Snowflake does and when to use it →
Warehouses, lakes, lakehouses and traditional databases
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
- Store
Preserve the source according to its purpose.
- Organize
Choose table management and ownership.
- Serve
Prepare the access pattern the consumer needs.
Read the full lesson: Warehouses, lakes, lakehouses and traditional databases →
Compare Snowflake, BigQuery, Redshift and Databricks
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
- Requirements
Specify the actual workload.
- Evaluate
Use equivalent data and query outcomes.
- Decide
Include the work needed to operate and migrate.
Read the full lesson: Compare Snowflake, BigQuery, Redshift and Databricks →
Choose an edition, cloud provider and region
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
- Requirements
Identify the capability and location needs.
- Choose
Record all three choices.
- Verify
Check feature availability for the actual account.
Read the full lesson: Choose an edition, cloud provider and region →
Understand accounts, organizations and identifiers
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
- Organization
A company groups its accounts.
- Account
Connect to the intended boundary.
- Context
Resolve the correct objects within it.
Read the full lesson: Understand accounts, organizations and identifiers →
Set up a trial and find your way around Snowsight
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
- Register
Create or obtain the learning account.
- Orient
Read account and execution context.
- Query
Create a SQL file and inspect a small result.
Read the full lesson: Set up a trial and find your way around Snowsight →
Find query evidence and explore databases
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
- Find
Locate the specific statement execution.
- Diagnose
Read status and context together.
- Explore
Resolve a table through its namespace.
Read the full lesson: Find query evidence and explore databases →
Use the loading and administration interfaces
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
- Inspect
Read the small source file.
- Load
Review target and detected format.
- Observe
Inspect rows and administrative context.
Read the full lesson: Use the loading and administration interfaces →
SnowSQL, Snowflake CLI and connection choices
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
- Select
Choose the interface supported by the application.
- Configure
Supply connection identity and approved authentication.
- Verify
Inspect the actual session before accessing a table.
Read the full lesson: SnowSQL, Snowflake CLI and connection choices →
Connect Java and desktop tools with JDBC and ODBC
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
- JDBC
A Java application calls the database driver.
- ODBC
A tool finds a configured driver and data source.
- Close
Inspect results and release client resources.
Read the full lesson: Connect Java and desktop tools with JDBC and ODBC →
Read a result with the Python connector
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
- Connect
Use the configured connection identity.
- Execute
Bind a value and fetch the response.
- Finish
Record query identity and release resources.
Read the full lesson: Read a result with the Python connector →
Understand the SQL API request and response
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
- Submit
Send SQL and context through an authenticated request.
- Observe
Follow the execution status.
- Retrieve
Read the result and preserve evidence.
Read the full lesson: Understand the SQL API request and response →
Architecture, Warehouses & Billing Basics
Follow a query through storage, compute and cloud services
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
- Keep
Stored sales records remain independently of reporting compute.
- Coordinate
The request is checked and planned before required work is dispatched.
- 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 →
Micro-partitions, columnar storage and compression
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
- Visible table
Users see columns and rows, not a disk assignment for each value.
- Stored form
The platform organizes standard table data and metadata.
- 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 →
Metadata and the query optimizer
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
- Describe
Catalog and storage information describe the input.
- Plan
The optimizer selects operations for the requested result.
- Observe
Compare the planned work with execution evidence.
Virtual warehouses, sizes and states
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
- Shared compute
Loading and reporting request work from one warehouse.
- Separate compute
Each workload can receive its own execution resources.
- Check the result
Ask whether reports are faster, current enough and worth the resource usage.
Read the full lesson: Virtual warehouses, sizes and states →
Auto-suspend and auto-resume through a small lab
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
- Start
Work needs compute, so the warehouse becomes available.
- Stop
After appropriate inactivity, suspension stops compute while tables remain.
- 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 →
Scaling up, scaling out and multi-cluster warehouses
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
- Observe
Separate execution work from waiting.
- Scale up
Change resources available within each cluster.
- Scale out
Add clusters to serve concurrency.
Read the full lesson: Scaling up, scaling out and multi-cluster warehouses →
Concurrency and query queueing
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
- Arrive
Requests overlap during a busy period.
- Wait
Inspect the reason for waiting.
- Respond
Choose a remedy for the observed cause.
Serverless features and their compute responsibilities
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
- Choose work
Specify the freshness and operation.
- Identify compute
Find who provisions the resources.
- Observe usage
Read the service-specific evidence.
Read the full lesson: Serverless features and their compute responsibilities →
Credits, compute billing, storage and cloud services
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
- Measure compute
Multiply applicable rates by billed running intervals.
- Measure storage
Account for stored volume and retention.
- Adjust services
Calculate the applicable daily cloud-services adjustment.
- Reconcile
Keep the categories visible in the overall account picture.
Read the full lesson: Credits, compute billing, storage and cloud services →
Database Objects & SQL Foundations
Databases, schemas and tables
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
- 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.
- 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.
- Explain the outcome
Use the full name to identify the data; use a warehouse to process it.
Choose numeric, text, Boolean and binary types
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
- Choose the input
A data type defines which values a column can hold and how Snowflake interprets them.
- 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.
- 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 →
Read, filter and order rows
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
- Choose the input
SELECT chooses columns and expressions. WHERE filters rows; ORDER BY determines presentation; LIMIT caps the returned row count.
- 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.
- Explain the result
ID breaks ties so the LIMIT result has a predictable order.
CASE and missing values
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
- Choose the input
CASE chooses a result from conditions. NULL means missing or unknown, so it needs explicit handling.
- 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.
- Explain the result
No. It selects a presentation or calculation fallback; the underlying business value may still be unknown.
Clean, calculate and convert values
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
- Choose the input
Built-in functions transform text, numbers and dates. Conversion functions interpret values as a chosen type.
- 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.
- 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.
Summarize groups with GROUP BY and HAVING
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
- Choose the input
GROUP BY combines rows into groups. Aggregate functions summarize each group; HAVING filters the summaries.
- 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.
- 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 →
Dates, times and timestamp choices
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
- Choose the input
DATE stores a calendar date, TIME stores a clock time, and timestamps combine date and time with different time-zone semantics.
- 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.
- Explain the result
No. It stores an offset with the instant; keep a separate named zone when future local-time rules matter.
Choose how long a table should live
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
- 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.
- 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.
- Explain the outcome
Transient does not mean session-only, and temporary does not mean free.
Views and secure views
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
- 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.
- 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.
- Explain the outcome
A view defines what to show. Permissions decide who may see it.
Sequences generate identifiers
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
- 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.
- 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.
- Explain the outcome
Count records with COUNT; do not infer the count from a sequence.
Create, change, empty and remove a table
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
- Choose the input
CREATE defines an object, ALTER changes its definition, TRUNCATE removes its rows, and DROP removes the object.
- 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.
- Explain the result
TRUNCATE empties the table. DROP removes the object itself.
Read the full lesson: Create, change, empty and remove a table →
Insert, update, delete and merge rows
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
- Choose the input
DML changes table rows. MERGE matches incoming rows to a target and chooses an update or insert action.
- 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.
- 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 →
Lab: build a small sales dataset
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
- Choose the input
Apply the object and SQL concepts to a small, disposable sales table and answer a business question.
- 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.
- Explain the result
No known amount contributes to that group. Reporting zero would imply a known total and hide the missing-data issue.
Advanced SQL & Transactions
Inner, left, right and full outer joins
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
- Match Asha
Customer 1 matches orders 101 and 102, so there are two pairs.
- Keep unmatched customers
LEFT keeps Ben and Chen with NULL order columns.
- Keep an unmatched order
RIGHT and FULL retain order 103 even though customer 4 is absent.
- Compare counts
The chosen preserved side determines which unmatched rows remain.
Read the full lesson: Inner, left, right and full outer joins →
Cross joins and self joins
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
- 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.
- 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.
- Check the meaning
A cross join multiplies row counts: 4 × 5 = 20. Use it when every combination is intended.
Subqueries, correlated queries and semi/anti patterns
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
- 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.
- 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.
- 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 →
CTEs and bounded recursion
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
- 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.
- 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.
- Check the meaning
The recursive predicate controls expansion. A real hierarchy also needs a strategy for cyclic relationships.
Combine result sets with set operators
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
- 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.
- 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.
- 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 →
Window functions: keep the rows, add context
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
- Group
GROUP BY customer collapses detail into two customer summaries.
- Window
The window total is attached to each original event instead.
- Partition
A and B are separate calculation groups. This is not physical storage partitioning.
- Output
A final ORDER BY controls presentation. Seven records remain.
Read the full lesson: Window functions: keep the rows, add context →
ROW_NUMBER, RANK and DENSE_RANK
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
- Order A
Known amounts descend, then the unknown value is placed last.
- Row number
Unique event IDs decide the order of the two equal amounts.
- Rank
A tie consumes two positions before the next rank.
- Dense rank
Distinct value groups receive consecutive ranks.
QUALIFY, latest records and deduplication
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
- Candidates
All seven events participate. Unknown amounts are still valid candidates for latest-event selection.
- Number
Order newest first inside each customer. Event ID resolves tied dates for this example.
- Qualify
Keep the numbered winners. Other source rows remain stored or supplied.
- Change the question
Exclude NULL before numbering and A’s candidate set changes.
Read the full lesson: QUALIFY, latest records and deduplication →
Window frames: ROWS versus RANGE
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
- ROWS at event 2
The ordered positions include 1 and 2 so far. Event 3 has not entered yet.
- RANGE at Jan 2
The date boundary includes both January 2 peers, not just whichever one appears first on the screen.
- ROWS at event 3
The third position enters and the running sum catches up to 200.
- Unknown amount
The final unknown amount does not add a known numeric value. The known total remains 200.
Running totals and moving averages
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
- Start
A’s first frame contains just 100. Both the running sum and known-value average are 100.
- Advance
At event 2, the two-row average uses 100 and 50.
- Slide
At event 3, event 1 leaves the two-row frame.
- Missing
At event 4, the frame contains one known 50 and one unknown amount.
LAG, LEAD and changes over time
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
- First
The first record has no earlier record in its partition.
- Next
Event 2 reads event 1’s 100 and compares it with its own 50.
- Tie day
Event ID places event 3 after event 2, although their dates match.
- Unknown current
Event 4 has a known previous 50 but an unknown current amount.
PIVOT and UNPIVOT: reshape reports
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
- 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.
- 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.
- Check the meaning
UNPIVOT reshapes the totals it receives. It cannot reconstruct source records that were combined by SUM.
GENERATE rows and evaluate lateral queries
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
- 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.
- 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.
- 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 →
ACID, autocommit and transaction boundaries
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
- Starting balances
Two accounts total 150.
- Uncommitted transfer
Both updates are part of the same transaction.
- Rollback choice
Discard both updates together.
- Commit choice
Repeat the transfer and accept both changes.
Read the full lesson: ACID, autocommit and transaction boundaries →
Isolation, concurrent DML and lock waits
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
- 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.
- 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.
- 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 →
Lab: deduplicate, analyse and commit a batch
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
- Begin with the question
Apply deterministic ranking to a small event batch, calculate customer totals, then commit the chosen records as one controlled operation.
- 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.
- 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 →
Stages, File Formats & Cloud Storage Integration
From a file to a table: understand the journey
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
- Source
The shop exports four orders plus a header.
- Location
The stage provides access to the file.
- Interpretation
The format tells the reader about the header, commas, quotes and missing amounts.
- Destination
A later load operation writes typed rows into a table.
Read the full lesson: From a file to a table: understand the journey →
Internal and external stages: choose the location
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
- Ask where
Start with the existing location of the source files.
- Internal route
Local files are uploaded into Snowflake-managed staging storage.
- External route
A named external stage points to approved cloud storage.
- Reference
Use @ to address files through a stage.
Read the full lesson: Internal and external stages: choose the location →
Read CSV correctly: delimiters, headers and quotes
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
- Header
Skip the label line, leaving four order records.
- Separator
A comma outside quotes ends a field.
- Enclosure
The comma inside the quoted name remains part of that one field.
- Contract
Save the agreed interpretation as a named format.
Read the full lesson: Read CSV correctly: delimiters, headers and quotes →
Missing amounts, zero and data types
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
- Raw input
Keep the original representations distinct.
- Missing rules
The agreed empty and textual markers become SQL NULL.
- Type check
A readable field must still be convertible to its intended type.
- Meaning
Do not hide conversion failures among genuinely missing values.
Read the full lesson: Missing amounts, zero and data types →
Create a named stage, upload a file and find it
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
- Prepare
Select the sandbox context and create the format first.
- Create
Make an empty named internal stage.
- Transfer
The supported local client reads and uploads the file.
- 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 →
Preview the file and explain every output column
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
- Locate
Read the supplied file through the stage and explicit format.
- Parse
Position-based fields expose the source layout.
- Convert
Names and casts turn source fields into understandable output.
- Trace
Keep file metadata when investigating individual records.
Read the full lesson: Preview the file and explain every output column →
Download and remove staged files
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
- 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.
- 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.
- Observe the outcome
GET is for internal stages. REMOVE targets files, so inspect its scope before running it.
Choose a file format and compression contract
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
- 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.
- 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.
- Observe the outcome
The format is a parsing definition, not a conversion job.
Read the full lesson: Choose a file format and compression contract →
Storage integrations and the two permission systems
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
- 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.
- 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.
- 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 →
AWS S3: role permissions and trust
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
- 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.
- 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.
- Observe the outcome
Trust permits assumption; the permission policy limits actions after assumption.
Google Cloud Storage: grant the generated identity
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
- Locate the data
A GCS integration identifies a Snowflake-managed service account. Your cloud administrator grants that identity access to the chosen bucket.
- 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.
- 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 →
Azure Blob: tenant consent and storage access
Locate the data
An Azure integration uses a service principal in your tenant. Tenant consent enables the identity relationship; a storage role assignment then authorizes access to blobs.
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
- Locate the data
An Azure integration uses a service principal in your tenant. Tenant consent enables the identity relationship; a storage role assignment then authorizes access to blobs.
- Configure the boundary
Create the integration using the tenant ID and an azure:// URL. DESC returns AZURE_CONSENT_URL and AZURE_MULTI_TENANT_APP_NAME. An authorized tenant administrator opens the returned consent URL and approves the request.
- Observe the outcome
Consent and storage authorization are two separate steps.
Read the full lesson: Azure Blob: tenant consent and storage access →
Grant access, change configuration and retire an integration
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
- Locate the data
Integration lifecycle management means controlling who can use it, changing settings deliberately and removing dependencies before retirement.
- 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.
- 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 →
Cross-cloud access, S3-compatible endpoints and exports
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
- 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.
- 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.
- 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 →
Lab: prove allowed access and reject an excluded path
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
- 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.
- 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.
- 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 →
Understanding modern data warehouses
What is a data warehouse?
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
- Collect
The order, payment and returns applications each hold one part of the story.
- Prepare
Connect records using the order ID and check currencies, dates and duplicates.
- Calculate
In the example, payments of 150 minus refunds of 20 give net receipts of 130.
- Report
Show the answer and the period it covers. A report based on yesterday’s load does not include today’s new payments.
Operational database vs data warehouse
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
- Checkout
One customer needs one order recorded correctly.
- Pipeline
Copy and prepare records for reporting. The reporting system may be behind the source.
- Report
Read many orders to calculate a monthly total.
Read the full lesson: Operational database vs data warehouse →
Traditional data warehouse challenges
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
- Different needs
Historical records can grow while daily processing demand stays unchanged.
- Shared demand
A load and dashboard requests compete for shared compute.
- Separate choices
Consider independent storage and workload compute choices after identifying the cause.
Read the full lesson: Traditional data warehouse challenges →
What is Snowflake?
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
- Store
The sales table remains available independently of one running warehouse.
- Coordinate
The request is checked and planned using identity and object information.
- Process
Warehouse compute performs the needed work and returns totals.
Why companies use Snowflake
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
- Problem
Finance waits while a large analysis uses the same compute.
- Design
Separate warehouses can serve the workloads against authorized shared data.
- Trade-off
Monitor whether improved responsiveness justifies the additional active resources.
Your first Snowflake mental model
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
- Ask
Request totals by region. The question must define which sales belong in the calculation.
- Group
Put the two North records together and the South record in its own group.
- Answer
Return North 50 and South 10. A larger source could still produce only these two result rows.
Snowflake architecture
The three-layer architecture
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
- Keep
Stored sales records remain independently of reporting compute.
- Coordinate
The request is checked and planned before required work is dispatched.
- Process
The reporting warehouse performs the calculation. Another warehouse can process authorized data independently.
Database storage and logical objects
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
- Visible table
Users see columns and rows, not a disk assignment for each value.
- Stored form
The platform organizes standard table data and metadata.
- Read selectively
For February, skip January-only data but inspect ranges that might include February.
Read the full lesson: Database storage and logical objects →
Virtual warehouses and workload isolation
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
- Shared compute
Loading and reporting request work from one warehouse.
- Separate compute
Each workload can receive its own execution resources.
- Check the result
Ask whether reports are faster, current enough and worth the resource usage.
Read the full lesson: Virtual warehouses and workload isolation →
Cloud services, metadata and query planning
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
- Identify
Asha connects and the system establishes her identity.
- Authorize
The requested finance table is resolved and the permitted action is checked.
- Plan
SQL and metadata are used to organize the required work.
Read the full lesson: Cloud services, metadata and query planning →
Warehouse lifecycle and scaling
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
- Start
Work needs compute, so the warehouse becomes available.
- Stop
After appropriate inactivity, suspension stops compute while tables remain.
- Choose capacity
One demanding task and many simultaneous tasks call for different investigations.
Query paths and the three kinds of reuse
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
- Describe
Metadata helps identify relevant information.
- Read less
Previously read table values may be available locally, while calculations still run.
- Reuse answer
An eligible previously computed result can avoid repeating its execution.
Read the full lesson: Query paths and the three kinds of reuse →
Snowflake accounts, organizations and regions
Organizations and accounts
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
- Group
Northstar’s organization links its environments.
- Contain
Each account contains resources such as databases and warehouses.
- Separate
Matching table names in two accounts do not make them the same data.
Account boundaries, users and roles
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
- Destination
Confirm the account before trusting any object name.
- Permission
The user identity and role context determine permitted actions.
- Data and compute
Locate the table separately from choosing processing resources.
Cloud platforms and regions
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
- Provider
Choose the infrastructure platform as one part of the location decision.
- Region
The account has a selected regional home within a supported platform.
- Data path
Consider where information comes from and where its results go.
Account identifiers and connection context
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
- Identify destination
The fictional organization-and-account string describes where to connect.
- Authenticate
Reaching a destination does not establish identity or permission.
- Choose context
Set the intended role, objects and compute separately.
Read the full lesson: Account identifiers and connection context →
Development, test and production environments
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
- Prepare
Make the intended change in the development environment.
- Review
Confirm the requirement and follow the team’s process before changing production.
- Deploy
Use the intended destination and controlled configuration.
Read the full lesson: Development, test and production environments →
Choosing an account location: a practical scenario
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
- Understand
List sources, consumers and approved constraints before choosing a location.
- Compare
Evaluate supported locations against those specific needs.
- Record
Write down the chosen destination and who operates it.
- 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 →
Databases, schemas, tables and views
Databases and schemas
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
- Account
The connection establishes the account boundary. Identical database names in other accounts are different objects.
- Database
The database groups schemas; it is not a warehouse or an allocation of compute.
- Schema
Tables and views belong to schemas. The same short name in a different schema can identify a different object.
- Compute
Authorized warehouse compute processes queries against the objects. It is separate from their logical containment.
Object names, identifiers and context
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
- Full name
Each segment narrows the location within the connected account. None of these segments selects warehouse compute.
- Short name
An unqualified reference needs context. Check the account and current database/schema rather than assuming the short name is globally unique.
- Quoted name
Under default behavior, the mixed-case quoted name differs from unquoted ORDERS. Use the intended spelling consistently.
- 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 →
Tables, rows, columns and data types
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
- Grain
The chosen record is one order, not one item or payment attempt. That decision determines how ORDER_ID should identify rows.
- Columns
Each column has a type and meaning. Type information alone does not define currency or the revenue rule.
- Missing value
Unknown, zero and empty text are different states. Treat them according to the field’s business meaning.
- 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 →
Permanent, transient and temporary tables
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
- Permanent
The object survives the creating session. Recovery capabilities still have limits and are not a promise of indefinite history.
- Transient
The object also survives the session, but has no Fail-safe protection. Rebuildability must be an explicit design fact.
- Temporary
The ordinary temporary table belongs to its creating session. It is not a reliable handoff to another session.
- 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 →
Views and the difference from tables
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
- Source table
The table stores order records. Two example rows are paid and pending; their values are inputs to the view definition.
- Definition
The regular view selects columns and filters paid records. Its definition does not create a second stored copy of the result.
- 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.
- 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 →
Designing a simple data object layer
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
- Source responsibility
CORE.ORDERS stores order-level records with defined types and business meaning. It must be loaded and checked by a real process.
- Interface responsibility
REPORTING.PAID_ORDERS presents selected columns and paid records. It is a regular view, not a second durable dataset.
- Consumer responsibility
Finance queries the interface using appropriate access and compute. Results still depend on source freshness and meaning.
- 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 →
Snowflake SQL fundamentals
SELECT: ask your first question
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
- Choose the source
Start with five order records. Each has an ID, customer, date, amount and status.
- Choose the columns
SELECT picks the fields to show; it does not delete other fields from the source.
- Calculate an expression
For order 101, 100 × 2 is 200. The source amount is still 100.
- Name the output
An alias labels the calculated field so the reader knows what it means.
WHERE: keep the rows you need
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
- Status filter
The paid rows are 101, 103 and 104. This is a row-selection rule, not a deletion.
- Amount filter
Require amount ≥ 80 too. Order 103 has an unknown amount, so it does not pass.
- Grouped alternatives
Parentheses make the status alternatives one group before the amount condition is applied.
- Date interval
January begins on January 1 and ends before February 1. Orders 101–103 are inside this interval.
NULL, CASE and COALESCE
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
- Observe
Order 103 is unknown and 105 is known zero. Keep that distinction visible.
- Detect
IS NULL identifies the missing record. Equality with NULL is not the right test.
- Label
CASE checks unknown first, then large, then the fallback.
- Choose a fallback
COALESCE may provide a display fallback. It does not repair the missing source fact.
ORDER BY, DISTINCT and LIMIT
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
- Sort
Ask for amounts from largest to smallest and explicitly place unknown values last.
- Tie-break
If two amounts match, the next sort key determines their order.
- Limit
After defining the order, keep the first two rows for this top-two question.
- Distinct
The five source records contain only three different status strings.
Aggregates, GROUP BY and HAVING
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
- Input
Five orders include one unknown amount. Counting rows and counting known values will differ.
- Group
The paid status contains three records. Two supply numeric amounts.
- Aggregate
Summarize the paid bucket. Unknown is not converted into zero.
- Having
Keep only groups whose known-amount total exceeds 100. Only paid passes here.
INNER, LEFT, RIGHT and FULL joins
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
- Inner
Only orders with a known customer match. 104 has customer 9 and is excluded.
- Left
Keep every order. The unmatched order receives NULL customer fields.
- Right
With customers on the right, preserve each customer, including Dev without an order.
- Full
Preserve both unmatched sides. Four matched order rows plus unmatched 104 and unmatched Dev give six rows.
CROSS JOIN and self joins
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
- Cross inputs
Two chosen customers and two reporting periods have no natural matching key in this exercise.
- Cross output
Create every combination intentionally. These are reporting slots, not four actual purchases.
- Self aliases
Use two names for the same order dataset to compare one order with another.
- Unique pair
The less-than rule keeps 101–102, not 101–101 or 102–101.
Strings, dates and type conversions
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
- Text
TRIM removes surrounding spaces; UPPER gives a consistent display case. It does not establish customer identity.
- Dates
January dates share a January 1 month bucket. February dates share February 1.
- Valid conversion
A text amount with valid decimal formatting becomes an exact numeric value with the requested scale.
- Invalid conversion
Invalid text becomes NULL with TRY conversion. Keep an error indicator rather than treating it as a genuine zero.
WITH, UNION and a complete business question
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
- Filter
The paid_orders step keeps 101, 103 and 104. A CTE gives this intermediate expression a name.
- Match
Match to known customers. 101 belongs to Asha, 103 to Ben, and 104 has no matching customer.
- Summarize
Known amounts total 100 for Asha. Ben’s all-NULL input has no known sum.
- 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 →
Advanced SQL and window functions
Window functions: keep the rows, add context
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
- Group
GROUP BY customer collapses detail into two customer summaries.
- Window
The window total is attached to each original event instead.
- Partition
A and B are separate calculation groups. This is not physical storage partitioning.
- Output
A final ORDER BY controls presentation. Seven records remain.
Read the full lesson: Window functions: keep the rows, add context →
ROW_NUMBER, RANK and DENSE_RANK
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
- Order A
Known amounts descend, then the unknown value is placed last.
- Row number
Unique event IDs decide the order of the two equal amounts.
- Rank
A tie consumes two positions before the next rank.
- Dense rank
Distinct value groups receive consecutive ranks.
QUALIFY, latest records and deduplication
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
- Candidates
All seven events participate. Unknown amounts are still valid candidates for latest-event selection.
- Number
Order newest first inside each customer. Event ID resolves tied dates for this example.
- Qualify
Keep the numbered winners. Other source rows remain stored or supplied.
- Change the question
Exclude NULL before numbering and A’s candidate set changes.
Read the full lesson: QUALIFY, latest records and deduplication →
Window frames: ROWS versus RANGE
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
- ROWS at event 2
The ordered positions include 1 and 2 so far. Event 3 has not entered yet.
- RANGE at Jan 2
The date boundary includes both January 2 peers, not just whichever one appears first on the screen.
- ROWS at event 3
The third position enters and the running sum catches up to 200.
- Unknown amount
The final unknown amount does not add a known numeric value. The known total remains 200.
Running totals and moving averages
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
- Start
A’s first frame contains just 100. Both the running sum and known-value average are 100.
- Advance
At event 2, the two-row average uses 100 and 50.
- Slide
At event 3, event 1 leaves the two-row frame.
- Missing
At event 4, the frame contains one known 50 and one unknown amount.
LAG, LEAD and changes over time
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
- First
The first record has no earlier record in its partition.
- Next
Event 2 reads event 1’s 100 and compares it with its own 50.
- Tie day
Event ID places event 3 after event 2, although their dates match.
- Unknown current
Event 4 has a known previous 50 but an unknown current amount.
FIRST_VALUE, LAST_VALUE and NTH_VALUE
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
- First
A’s chronological frame begins with amount 100.
- Second
The second position is event 2 with amount 50.
- Last record
The full frame ends at event 4 with a NULL amount.
- 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 →
Subqueries, EXISTS and staged calculations
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
- Existence condition
A has an event above 90; B does not. Ask yes or no for each customer.
- Preserve outer grain
Every A event is retained once by the existence filter, including its unknown event.
- Group
Create one row per customer before ranking customer totals.
- Rank stage
Now the ranking operates on the two summarized rows.
Read the full lesson: Subqueries, EXISTS and staged calculations →
Activity groups: put the window ideas together
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
- Dates
A’s sequence has a three-day gap before its final event. Same-day events remain separately ordered by ID.
- Boundaries
Start at the first record and at a gap greater than two days.
- Running sum
Accumulate the boundary flags to label the groups.
- 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 →
Stages and file formats
From a file to a table: understand the journey
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
- Source
The shop exports four orders plus a header.
- Location
The stage provides access to the file.
- Interpretation
The format tells the reader about the header, commas, quotes and missing amounts.
- Destination
A later load operation writes typed rows into a table.
Read the full lesson: From a file to a table: understand the journey →
Internal and external stages: choose the location
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
- Ask where
Start with the existing location of the source files.
- Internal route
Local files are uploaded into Snowflake-managed staging storage.
- External route
A named external stage points to approved cloud storage.
- Reference
Use @ to address files through a stage.
Read the full lesson: Internal and external stages: choose the location →
Read CSV correctly: delimiters, headers and quotes
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
- Header
Skip the label line, leaving four order records.
- Separator
A comma outside quotes ends a field.
- Enclosure
The comma inside the quoted name remains part of that one field.
- Contract
Save the agreed interpretation as a named format.
Read the full lesson: Read CSV correctly: delimiters, headers and quotes →
Missing amounts, zero and data types
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
- Raw input
Keep the original representations distinct.
- Missing rules
The agreed empty and textual markers become SQL NULL.
- Type check
A readable field must still be convertible to its intended type.
- Meaning
Do not hide conversion failures among genuinely missing values.
Read the full lesson: Missing amounts, zero and data types →
Create a named stage, upload a file and find it
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
- Prepare
Select the sandbox context and create the format first.
- Create
Make an empty named internal stage.
- Transfer
The supported local client reads and uploads the file.
- 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 →
Preview the file and explain every output column
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
- Locate
Read the supplied file through the stage and explicit format.
- Parse
Position-based fields expose the source layout.
- Convert
Names and casts turn source fields into understandable output.
- Trace
Keep file metadata when investigating individual records.
Read the full lesson: Preview the file and explain every output column →
External stages: a cloud address plus approved access
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
- Producer
The application writes orders into the existing cloud bucket.
- Trust
Administrators configure approved access on both sides.
- Reference
The external stage connects a name to the URL and access settings.
- Consume
An authorized role lists and previews the existing files.
Read the full lesson: External stages: a cloud address plus approved access →
Beyond CSV: troubleshoot and prepare for loading
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
- Identify
Choose a reader based on the actual file encoding and structure.
- Locate
Verify file selection and access before investigating field values.
- Interpret
Check structure, missing-value rules and conversions.
- Hand off
Document evidence and unresolved checks for the loading step.
Read the full lesson: Beyond CSV: troubleshoot and prepare for loading →
COPY INTO and data loading
Staged files to stored rows: what COPY INTO changes
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
- Locate
Module 7 made the file available and understandable.
- Prepare
Create a target with the intended column types.
- Load
COPY reads the chosen file and inserts accepted records.
- Reconcile
Check both the operation and the resulting table.
Read the full lesson: Staged files to stored rows: what COPY INTO changes →
Prepare the table and agree on column mapping
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
- Meaning
Define the meaning of one row before choosing types.
- Mapping
Match the ordered source fields to the target.
- Context
Use the intended role, database, schema and warehouse.
- Baseline
Record the fresh target’s starting count.
Read the full lesson: Prepare the table and agree on column mapping →
Validate first: discover errors without inserting rows
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
- Select
Choose the exact file and target to check.
- Validate
Check the supported load without inserting records.
- Diagnose
The CSV structure is valid, but banana is not a numeric amount.
- Decide
Correct the delivery and validate again before the real load.
Read the full lesson: Validate first: discover errors without inserting rows →
Your first COPY INTO: read every clause and result
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
- Destination
Start with the fresh target prepared earlier.
- Read
Select one file and interpret it with the agreed format.
- Insert
Load the accepted records and inspect operation counts.
- Verify
Check the stored records and their special cases.
Read the full lesson: Your first COPY INTO: read every clause and result →
Choose exactly which files belong to a load
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
- Inventory
A stage may contain multiple deliveries and formats.
- Scope
Define which files belong to this operation.
- Inspect
Compare actual entries with the expected delivery.
- Reconcile
Validate and load the same reviewed set.
Read the full lesson: Choose exactly which files belong to a load →
ON_ERROR: stop, skip the file or accept valid rows
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
- Input
Three records share one file; one amount cannot become a number.
- Abort
The statement fails and adds no rows for this experiment.
- Skip
The whole bad file is left out.
- 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 →
Prove the load: counts, history and missing records
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
- Inventory
Check whether the intended delivery arrived.
- Operation
Read the COPY output and recent history.
- Table
Check the stored data from several angles.
- Investigate
Use source and job identity to explain discrepancies.
Read the full lesson: Prove the load: counts, history and missing records →
Retry safely: file history is not order deduplication
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
- Same file
Known load metadata can prevent an immediate unchanged replay.
- Same orders
A new source file may still contain old business records.
- Partial repair
Accepted records must be accounted for before replaying a correction.
- Verify
Check the final business keys and values after the repair.
Read the full lesson: Retry safely: file history is not order deduplication →
Simple load transformations and the complete hand-off
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
- Map
Pair each destination column with a source expression.
- Trace
Add source metadata without pretending it came from a CSV field.
- Separate
Keep complex business transformations outside COPY.
- Complete
A hand-off includes operational and business evidence.
Read the full lesson: Simple load transformations and the complete hand-off →
Additional object concepts
Stored query results: materialized views and dynamic tables
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
- 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.
- 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.
- 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 →
External, Iceberg and hybrid tables
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
- 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.
- 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.
- Explain the outcome
A file location, an open table format and a transactional access pattern are not the same requirement.
File formats and stages
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
- 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.
- 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.
- Explain the outcome
Creating a stage or file format does not upload a file or load a table.
Pipes, streams and tasks
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
- 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.
- 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.
- Explain the outcome
A stream does not run SQL for you, and a task does not automatically know which rows are new.
Functions, UDFs and stored procedures
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
- 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.
- 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.
- 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 →
Alerts and integrations
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
- 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.
- 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.
- Explain the outcome
An integration supplies a particular connection boundary; it is not a universal credential.
Tags and policies: label data, then enforce rules
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
- 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.
- 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.
- 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 →