This guide is designed to help data scientists get started with Snowflake, understanding both the how and the why of the platform. It is by no means comprehensive; more of a condensed reference to the key concepts and patterns that I have found useful in my own data science work.
If you are coming from Python and pandas, understanding what happens behind your analysis takes a little exploration. Where does the computation actually run? When does data move into Python? And when might writing SQL directly make the work easier? These are some of the questions I want to work through in this guide.
We will start with the core concepts and architecture, then look at how SQL fits into an analytical workflow. A follow-up guide will explore Snowpark and practical Python workflows.
Throughout, I have included links to official documentation where you can explore further!

API usage and technical claims were reviewed against official documentation as of 1 November 2026 - Snowflake is evolving rapidly, and things are changing fast, so, whilst discussion around architecture should remain (mostly) valid, the specifics of the APIs and features may change. I urge you to always check the documentation for your installed Snowflake and Snowpark version before adapting the snippets! The code is supposed to be purely illustrative. The examples assume an existing authorised session and suitable tables, and they do not require you to set up an account or generate a dataset to follow the explanation.
1 Introduction to Snowflake for Data Science
Snowflake is a managed cloud data platform that brings together data storage, processing, and analytical tools. For data scientists, one of the more useful aspects is being able to work with shared datasets and perform substantial transformations without first loading everything into a Python process.
To understand how this works, I would start with one architectural detail: the separation of storage and compute.
1.1 Core Concept: Separation of Storage and Compute
- Storage holds the data in your tables.
- Compute provides the resources used to process that data.
The useful consequence is that you can change the resources used for an analysis without having to move or recreate the underlying tables. For example, you might use a small warehouse for exploratory queries, then choose a larger one for a more demanding transformation, while working with the same stored data.
This also means different workloads can use separate compute resources against the same datasets. We will explore two of these resources—virtual warehouses and compute pools—in the next section, including how they fit into a Python workflow.
For now, the distinction to keep in mind is between where the data is stored and which resources are doing the work. See Snowflake’s architecture overview for more detail.
1.2 Snowflake Notebooks
Snowflake Notebooks provide an interactive environment where you can write Python, SQL, and Markdown in the same document. If you already use Jupyter, the cell-based workflow should feel familiar.
What makes them useful here is their integration with the data platform. For example, you can explore a shared table using SQL, continue the analysis in Python, and document your reasoning alongside the code—all within the same notebook.
There are a few practical benefits worth highlighting:
- Access to shared data: work with Snowflake tables using the permissions available to your account.
- A managed environment: start from a supplied runtime, then configure the packages and compute resources your work requires.
- Collaboration: organise notebooks and supporting files in Workspaces, with options for shared working and Git integration.
- Scheduling: run notebooks automatically for recurring work, such as preparing a regular report.
For this guide, notebooks give us a useful setting for exploring how SQL and Python work together. To understand their performance and resource requirements, though, we need to look a little more closely at where each operation runs.
Snowflake’s current notebook experience lives in Workspaces and uses Container Runtime. You may also encounter legacy notebooks, which support Warehouse Runtime and Container Runtime. The interfaces and setup differ, so use the documentation for the experience available in your account. See the Workspaces release notes and legacy notebook overview.
Notebooks on Container Runtime
A notebook needs an environment in which to run its Python code. This is what the runtime provides: the Python interpreter, installed packages, and access to the compute resources used by the notebook.
Container Runtime provides this environment through Snowpark Container Services. It supports CPU and GPU configurations and additional package installation, subject to the permissions and integrations available in your account. This can be useful when your analysis needs a particular Python library or your modelling work requires more memory or GPU resources.
There are two compute resources involved, and understanding their roles helps explain what happens as we move between SQL and Python:
- The query warehouse executes SQL cells and Snowpark queries.
- The compute pool runs the notebook’s Python process, including ordinary pandas and typical scikit-learn code.
For example, we might first use SQL to summarise a large table on the warehouse, then bring that summary into the notebook’s Python process to create a plot. Both steps belong to the same analysis, but they use different resources.
The diagram below illustrates this division. Throughout the guide, when I refer to local Python, I mean the Python process running the code. In a container notebook, that process runs on the compute pool; when connecting from your own computer through an external client or editor, it may run directly on your laptop.
When we collect a result into Python—for example, using .to_pandas()—it needs to fit in that process’s memory. This is why reducing the data before transferring it remains useful, even when the notebook itself runs inside Snowflake.
Notebook sessions and services can be suspended or restarted. Save results you need to keep, and record package requirements so the environment can be recreated. For details of the compute diagram, see Notebooks on Container Runtime and the Workspaces limitations.
2 Architecture: Compute and Environment
Following from the notebook example, I want to go a little deeper into the two compute resources. A slow SQL query and a Python process running out of memory can look like similar problems from inside a notebook, but they call for different decisions. Understanding where the work happens helps us choose which resource to investigate or change.
2.1 Virtual Warehouses vs. Compute Pools
Virtual Warehouses
A virtual warehouse provides compute resources for SQL queries and Snowpark operations that execute in the query engine. Think of the data-shaping part of an analysis: selecting relevant records, joining tables, and calculating summaries. These are the kinds of tasks we will ask the warehouse to perform throughout this guide.
| Feature | Practical meaning |
|---|---|
| Sizing | Warehouses use “T-shirt” sizes such as XS, S, and M, where each step up roughly doubles the compute resources (nodes, CPU cores, RAM, SSD storage, etc), as well as the credit consumption per hour! |
| Typical work | Filtering, joins, aggregation, window functions, and supported Snowpark transformations. |
| Billing | Compute is charged while the warehouse runs, including idle time. There is a 60-second minimum on each start, followed by per-second billing. |
| Memory | Snowpark-optimised warehouses offer configurations for memory-intensive workloads, including supported Python execution on the warehouse. |
I would start with the smallest suitable warehouse, inspect the query, and then assess whether more compute addresses the bottleneck. For example, if a join unexpectedly multiplies the number of rows, understanding that join is a better first step than immediately choosing a larger warehouse. We will return to query inspection in the SQL section.
Remember that these resources are separate: increasing warehouse size changes the resources available to the query engine, but an ordinary Python process running on a compute pool or laptop has its own memory allocation. See warehouse considerations and Snowpark-optimised warehouses.
Compute Pools
A compute pool is a collection of virtual machines used by Snowpark Container Services. For our container notebook, this is where the Python process lives.
Suppose we have prepared a manageable training dataset and now want to fit a model using ordinary scikit-learn code. The next question is whether the Python environment has enough memory and suitable resources for that task. The compute pool’s instance family, or machine configuration, determines the CPU, memory, and any GPU resources available.
| Feature | Practical meaning |
|---|---|
| Typical work | Container notebooks, ML jobs, model serving, and custom container services. |
| Configuration | Choose from the instance families available in your region and account, subject to permissions and capacity. |
| Billing | Depends on the instance family and provisioned nodes over time; an idle running service can still cost money. |
| Packages | The runtime or container image determines the environment. A managed notebook runtime does not imply unrestricted operating-system access. |
Account administrators may provide shared or system compute pools. Check what is available to you/your organization rather than assuming that a particular CPU or GPU configuration exists in every account. You can use these two commands in a SQL worksheet to inspect the available compute pools and instance families, using the same role as the notebook:
-- Existing pools visible to your current role
SHOW COMPUTE POOLS;
-- Instance families available for creating a pool
SHOW COMPUTE POOL INSTANCE FAMILIES;The first result shows each pool’s name, state, and instance_family. Match that family to the name in the second result to check its vcpu, memory_gib, gpu, and gpu_count. For GPU workloads, also check gpu_memory_gib: this is the memory available per GPU, rather than the node’s main memory.
A listed pool is not necessarily one your notebook role can use. Visibility can come from monitoring permissions; running a notebook requires USAGE on the pool. If no suitable pool appears, ask your administrator which pool to use and whether your role needs access. An empty result does not necessarily mean the account has no pools. The instance-family list describes hardware options for creating a pool; it does not mean a pool with that hardware already exists.
See Snowflake’s references for SHOW COMPUTE POOLS and SHOW COMPUTE POOL INSTANCE FAMILIES for the output columns and access requirements.
Cost Considerations
The distinction between these resources also matters for cost. A container notebook can incur both warehouse and compute-pool costs: the warehouse handles SQL and query pushdown, while the compute pool hosts the Python runtime. Here, pushdown means sending an operation to Snowflake’s query engine to run there.
A warehouse can also support notebook functionality, and its running time can include idle periods between queries.
My recommendation is to check which resources remain active when you finish and use sensible auto-suspend settings, which stop eligible compute after a period of inactivity. Notebook service settings and warehouse settings control different resources. Snowflake’s notebook usage and cost monitoring guide provides the relevant monitoring views.
📖 Further Reading: Warehouse considerations | Working with compute pools | Notebook usage and costs
2.2 Package Management and Security
The packages available in a notebook can influence the environment you choose. You might be happy with the supplied libraries for an exploratory analysis, but need an additional package or a particular version for a modelling workflow. This is one reason it is useful to understand the runtime before starting the analysis.
Package installation depends on the notebook experience and runtime:
- Legacy Warehouse Runtime uses its package selector and supported package sources. Availability also depends on account policies and applicable package terms.
- Container Runtime includes a base environment and supports additional packages. Direct access to external package repositories requires an external access integration and appropriate permissions. Workspaces also supports Snowflake artifact repositories as a preview feature, subject to package policies and access requirements.
- Custom container images provide another option where supported, with responsibility for maintaining that environment.
I would record package versions and runtime choices alongside the analysis. Installing a package interactively can be convenient while exploring, but it may need reinstalling after a restart. A short list of requirements makes it much easier to return to the notebook later or share the work with someone else.
📖 Further Reading: Workspaces packages and runtime | Artifact repositories in Workspaces | Legacy Container Runtime packages | Custom runtime images | Workspaces limitations
2.3 When to Use Which: A Decision Guide
With those distinctions in mind, here is a quick guide to choosing a starting point. A single analysis may use several of these approaches: preparing features on a warehouse, for example, then fitting a model in the notebook’s Python process.
| Your task | Starting point and rationale |
|---|---|
| Cleaning, joining, and summarising large tables | SQL or Snowpark on a warehouse. Process data before transferring it to Python. |
| A familiar pandas workflow | Snowpark pandas. Retain much of the pandas API, while checking backend selection and supported operations. |
| Training with ordinary scikit-learn code | A Python runtime with enough memory, often Container Runtime. Training happens where that process runs; it does not automatically distribute over a warehouse. |
| GPU training or inference in a container | A suitable GPU compute pool. Match hardware to the model and available runtime. |
| Custom environment or a long-running service | Snowpark Container Services. Package and run the service in a supported container environment. |
3 Working with Data: SQL Strategy
One of the key principle that I hope has become clear from the discussion so far is to bring the computation to the data wherever it makes sense. Even if you prefer Python, understanding what SQL can do gives you more options for shaping a dataset before collecting it into memory. If there is one thing you take away from this guide, this should be it!
3.1 Why Direct SQL?
Imagine a table that is much larger than the memory available to your Python process. If all you need is a grouped summary, downloading every row gives Python a lot of data to hold just to calculate a small result. Calculating that summary in Snowflake first can reduce the transfer to a few rows. SQL gives us a direct way to describe the filtering, joins, aggregations, and window calculations involved.
Snowflake’s query engine can optimise this work and use information about how data is stored to avoid some unnecessary scanning. Its tables are organised into storage units called micro-partitions, whose metadata can help identify which units need to be read. The effectiveness depends on the query and data layout; see micro-partition pruning.
This pattern can still fit a pandas-style workflow: supported Snowpark pandas operations can be translated into SQL and executed on Snowflake. Understanding that connection makes it easier to see why the location of the work matters, whichever syntax you choose.
3.2 Do the Heavy Lifting in SQL
Following the discussion above, I would then recommend the following pattern:
- Filter and select early. Keep the rows and columns needed for the analysis.
- Use joins and window functions. Lags, ranks, and rolling calculations often have direct SQL equivalents.
- Hand over a manageable result to Python. Keep using Snowpark if further transformations can remain in Snowflake, or collect the result for a library that needs in-memory data.
When a query is slow, I would inspect its Query Profile before increasing the warehouse size. The profile shows how the work was carried out, helping you identify which steps deserve attention. Look for expensive scans, joins that unexpectedly multiply rows, and spilling: intermediate work being written to storage when it exceeds the available execution memory. See Snowflake’s performance guidance for more information!
4 Summary and Further Reading
Understanding where each step runs helps us choose the right compute resources and avoid moving more data than necessary. My starting point is to shape and summarise data on the warehouse, then collect a manageable result for the Python work that needs it.
In a follow-up guide, we will apply those ideas with Snowpark and explore ways to save results and make experiments reproducible.
For more detail, the following Snowflake resources are a useful starting point:
| Topic | Official reference |
|---|---|
| Architecture | Snowflake architecture overview |
| Notebooks | Workspaces notebooks |
| Compute | Warehouse considerations and compute pools |
| Packages | Workspaces packages and runtime |
| Query performance | Query Profile and micro-partition pruning |