Snowsight Workspaces & Notebooks

Snowflake · Snowflake Fundamentals

Theory

Workspaces is Snowsight's file-based editor for SQL and Python, opened from Projects → Workspaces. It replaced the legacy Worksheets: instead of loose worksheets you keep files such as load_orders.sql in folders, set the role, warehouse and database context from the editor, and a workspace can be connected to a Git repository so the same files are versioned and reviewed like any other code.

Notebooks in Workspaces are Jupyter-compatible notebooks with Python, SQL and Markdown cells. Their Python kernel runs on the Container Runtime, a Snowflake-managed notebook service on a compute pool node, while SQL and Snowpark queries still run on a warehouse. For example, a SQL cell can pull last month's orders and the next Python cell can chart them. The original notebooks are now called Legacy Notebooks.

Why we use it

Analysts and engineers need one place to write, organise and version SQL and Python next to the data. Files, folders and Git make work reviewable and reusable, and notebooks mix queries, code and explanation without exporting data to a laptop.

When to use it

Use workspace SQL files for queries, DDL and scripts you will rerun; use a notebook for exploration, data science and step-by-step analysis. Use Snowflake CLI or a scheduler for unattended automation, and suspend idle notebook services to stop their compute cost.

How it works

  1. Projects → Workspaces
  2. Is it a script you will rerun or deploy? Yes: Create a SQL file and set role and warehouse. No: Create a notebook.
  3. Write the code and run it (Ctrl+Enter runs the current statement)
  4. Is the notebook's Python service running? Yes: Run Python cells on the compute pool node. No: Connect to start a notebook service.
  5. SQL and Snowpark queries run on the chosen warehouse
  6. Save, commit to Git or share the file

Example

-- In a workspace SQL file (Projects → Workspaces → + Add new → SQL File)
USE ROLE sysadmin;
USE WAREHOUSE compute_wh;

SELECT region, SUM(amount) AS total_sales
FROM sales_db.public.orders
GROUP BY region
ORDER BY total_sales DESC;

-- See notebook services that are using compute pool nodes
SHOW SERVICES OF TYPE NOTEBOOK;

Key points

Snowflake topics

Snowflake Fundamentals

Warehouses & Performance

Staging & SnowSQL

Tables & Data Handling

Cloud Integrations

Storage & Optimization

Security & Governance

Views, Pipelines & Automation

Data Types & SQL Fundamentals

Semi-Structured Data Deep Dive

Advanced Features

Data Sharing & Collaboration

Cost Management & Monitoring

Databases, Schemas & Objects

Performance Deep Dive

Advanced Security & Governance

Stored Procedures & UDFs

Ecosystem & Integrations

SnowPro Certification Prep

T
Tech Town
Log InSign Up Free
Home SQL Python DSA Power BI Snowflake Databricks Spark Gen AI Practice Problems Contest Blog

Mastering Snowflake

The modern data cloud, from architecture to SnowPro certification. Click any topic in the sidebar to open it right here.

{{ sectionCount }}
Sections
{{ topicCount }}
Topics
Free
Forever
Hands-on practice Practice Snowflake SQL Sharpen the SQL you use in Snowflake: 150 query problems in a live editor with instant checking. Start practising →
Section {{ sec.num }}

{{ sec.label }}

Snowflake  /  {{ current.sectionLabel }}  /  {{ current.name }}

{{ current.name }}

Theory

{{ current.def }}

Why we use it

{{ rich.why }}

When to use it

{{ rich.when }}

{{ sec.h }}

{{ sec.body }}

{{ sec.body }}

Diagram

{{ rich.dg.caption }}

{{ tb.title }}
{{ c.v }}
{{ rich.dg.op }}
➜
{{ rich.dg.output.title }}
{{ c.v }}
{{ nd.label }}
{{ nd.sub }}
{{ nd.label }}
{{ nd.sub }}
{{ rich.dg.left.title }}
{{ it }}
{{ rich.dg.right.title }}
{{ it }}
On screen — where to click

{{ rich.ui.title }}

{{ u.text }}
  1. {{ st.n }}{{ st.text }}
{{ rich.ui.title }}
{{ u.text }}
Flowchart — how it works
{{ nd.text }}
{{ nd.text }}
◇ {{ nd.text }}
Yes → {{ nd.yes }}
No → {{ nd.no }}
Syntax
{{ current.syntax }}
Example
{{ current.example }}
Want to run this yourself? Unlike the SQL and Python courses, Snowflake needs a real account — there's no in-browser engine for it. Click Copy above, then paste it into a free Snowflake trial (30 days, no card required) and run it in Snowsight.
Key Points — click to check off as you learn
  • {{ pt.mark }} {{ pt.text }}

Share this topic