# Snowpark

> Code you write in Python or Java that runs in Snowflake.

**Field:** Data Engineering  
**Category:** Storage & Warehousing  
**Also known as:** Snowflake Snowpark, Snowpark Python, Snowpark API

## Think of it like

It is like sending your recipe to the farm. The cooking happens where the food grows.

## Definition

Snowpark is a set of Snowflake libraries for working with data in Python, Java or Scala instead of SQL. You write DataFrame code, and Snowpark turns it into work that runs inside Snowflake. The data never has to come down to your laptop. Nothing runs until you ask for a result, such as a count. Your own functions can be sent up to run next to the data too.

## Example

A data scientist cleans 50 million rows with Snowpark Python. The work runs in Snowflake. Only a short summary comes back to her laptop.

## Example code

```python
df = session.table("orders").filter(col("amount") > 100)
df.count()
```

The filter runs inside Snowflake. Only the count comes back.

## Why it matters

Python users can work on big tables without moving them. That is faster and safer than a download.

## Common mistake

Calling to_pandas on a huge table. That pulls every row down to your machine, which is what Snowpark is there to avoid.

## Three principles

- **DataFrames.** Python, Java or Scala, not SQL.
- **Runs in Snowflake.** The data stays where it is.
- **Lazy.** Nothing runs until you ask.

## Related terms

- [Snowflake](https://learn.benibix.com/term/data/snowflake)
- [DataFrame](https://learn.benibix.com/term/data/dataframe)
- [Snowflake Virtual Warehouse](https://learn.benibix.com/term/data/snowflake-virtual-warehouse)
- [PySpark](https://learn.benibix.com/term/data/pyspark)
- [pandas](https://learn.benibix.com/term/data/pandas)
- [Data Transformation](https://learn.benibix.com/term/data/data-transformation)

![Left, tied together: two servers, each with its own compute and its own disk, so more data means more servers even when nobody is querying. Right, kept apart: three compute boxes, one for reports, one for loading and one turned off at no cost, all reading one shared store of data. A note says you add compute for a busy hour and turn it off after, and the data never moves.](https://learn.benibix.com/diagrams/dat-storage-compute.svg)

---

Source: https://learn.benibix.com/term/data/snowpark
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
