· 8 min read
Snowpark: What It Runs Well, and Where Ingestion Belongs
Snowpark runs transformations and ML beside data already in Snowflake. Source extraction, schema handling, and failure ownership remain with the pipelines that load it.
Running code inside the warehouse does not make every data task warehouse work. A Snowpark application can build DataFrame operations while Snowflake executes the corresponding SQL. That boundary affects where transformations, machine learning, and source ingestion belong. The opposing view treats the warehouse as the place for every data task, including ingestion.
What is Snowpark?
Snowpark is Snowflake’s set of libraries and runtimes for expressing data and machine learning work and executing it with Snowflake compute. Its libraries cover Python, Java, Scala, and supported Spark DataFrame code. Client DataFrame applications can build operations without retrieving the data; Snowflake executes those operations with its compute.
The name covers distinct mechanisms:
- DataFrame API: Builds relational operations that Snowflake later executes as SQL.
- User-defined functions: Return values for use in SQL statements.
- Stored procedures: Run independent, multi-step operations inside Snowflake.
- Snowflake ML: Covers feature engineering, model training, and inference. Its Snowpark ML Python library uses the
snowflake.mlnamespace. - Snowpark Connect: Runs supported Spark DataFrame and SQL code on a Snowflake warehouse.
- Snowpark-optimized warehouses: Supply configurable memory and CPU architecture for suitable Snowpark code.
These parts share Snowflake compute, but each supports a different kind of work.
What does Snowpark run well?
Snowpark is strongest for transformations, feature engineering, and machine learning on data that has landed in Snowflake. If substantial inputs and outputs reside there, the deciding question is whether Snowpark has a documented execution mechanism for the operation.
This table maps the main uses to those mechanisms.
| Work | Snowflake mechanism | What it supports or limits |
|---|---|---|
| Data transformation | DataFrame API | Lazy relational operations and SQL execution |
| Feature engineering | Snowflake ML | CPU and GPU processing paths |
| Model training | Notebook or ML Job | Supported frameworks and distributed training |
| Inference | Model Registry | Inference from registered models |
Memory-heavy code can use Snowpark-optimized warehouses. They use one node with configurable memory and a default or x86 CPU architecture. Generally available configurations provide up to 256 GB. The 1 TB configurations are currently in preview, as of 26 November 2026, and available only on AWS. Initial creation and resumption can take longer than for standard warehouses, and non-Snowpark work might not benefit.
How does Snowpark execute the work?
Snowpark DataFrames are evaluated lazily, while user-defined functions and stored procedures run custom code inside Snowflake’s restricted engine. Creating or transforming a DataFrame does not retrieve its data. An action such as collect() generates and sends the corresponding SQL to Snowflake.
This first-party Python example shows the boundary between construction and execution:
>>> # Create a DataFrame with the "id" and "name" columns from the "sample_product_data" table. >>> # This does not execute the query. >>> df = session.table("sample_product_data").select(col("id"), col("name")) >>> # Send the query to the server for execution and >>> # return a list of Rows containing the results. >>> results = df.collect()
A user-defined function returns a value for use in SQL. It can issue queries but cannot perform data manipulation or definition operations. A stored procedure runs independently and can perform multi-step operations, including UPDATE and CREATE.
Snowflake ML training runs in a Snowflake Notebook or ML Job with access to Container Runtime. Snowpark Connect supports Apache Spark 3.5 DataFrame and SQL code. Its Spark Connect limits exclude RDD APIs, Structured Streaming, pyspark.ml, JVM interoperability, and direct access to drivers or executors.
How does Snowpark compare with Spark and Databricks?
The useful comparison is the operating boundary, not a universal ranking. Similar DataFrame syntax can hide differences in where work runs and which compute components a team manages.
An Apache Spark application uses a driver to coordinate work and executors to run tasks. An external cluster manager allocates resources for the application. Databricks compute includes automatically managed serverless compute and customer-configured classic compute. The same three questions make those differences visible.
| Platform | Where code runs | What the team operates | Documented work |
|---|---|---|---|
| Snowpark | Snowflake compute | Selected Snowflake warehouse | DataFrames, procedures, and ML |
| Apache Spark | Driver and executors | Components depend on cluster deployment | Cluster application tasks |
| Databricks | Serverless or classic compute | Managed or customer-configured compute | Notebooks, jobs, pipelines, and SQL |
Databricks SQL warehouses run SQL, analytics, and business intelligence work under serverless or classic management models. Snowpark Connect uses familiar Spark DataFrame code, but executes supported operations on Snowflake rather than exposing Spark’s lower-level components.
What do external access integrations change?
External access changes what Snowflake code can reach, not who owns ingestion. Java, Python, or Scala handlers in user-defined functions and stored procedures can call approved external network locations through an external access integration. Private connectivity requires Business Critical Edition or later.
The setup process has four controls. A network rule identifies permitted outbound locations. A Snowflake secret holds credentials. The integration combines the permitted rules and secrets. The function or procedure then references that integration, and Snowflake denies calls outside the permitted rule.
These controls grant network access to handler code. They do not assign responsibility for source behavior, data shape, schema changes, or recovery. That responsibility depends on which pipeline brings the source records into Snowflake.
Where does ingestion belong?
Ingestion belongs to the pipeline that extracts source records and decides whether they may enter Snowflake. Its owner handles data shape, schema changes, source failures, and recovery. The UK Government Data Quality Framework is government guidance for managing data quality across its lifecycle. It supports treating problems at their source and improving quality early in that lifecycle.
The framework’s collection example checks whether an entered age is between 4 and 11. A check that needs load history runs after loading, beside the record for that load. This keeps a failure tied to the batch that caused it.
A downstream correction does not correct a source-facing pipeline that receives the same invalid shape again. Quality assurance can continue through the data lifecycle, but the first correction stays close to the source and its owner.
Where does source lineage come from?
Source provenance comes from records that connect pipeline runs with their inputs and outputs. Warehouse metadata can describe work inside Snowflake, but the original source identity must enter with the loading process or a submitted lineage event.
Access History records Snowflake objects and participating stages or external locations. Copy History records completed file loads, including the staged file and target table. Snowflake external lineage can represent external sources when a system submits compatible events. OpenLineage’s model describes those events through Jobs, Runs, and input and output Datasets.
A Job consumes or produces Datasets. A Run represents one occurrence of that Job, and its update identifies the input and output Datasets. The run cycle defines START, RUNNING, COMPLETE, and FAIL events that can add detail during execution. Facets attach more detail, so a basic event does not guarantee field-level information. Records created during execution therefore preserve source context without relying only on a hand-maintained map.
How does dltHub bring source data into Snowflake?
A dltHub pipeline brings source records into Snowflake for Snowpark to process after loading. The source-facing pipeline owns that path.
This table shows the documented boundary.
| Stage | Capability | Limit |
|---|---|---|
| Schema | evolve accepts changes | Default behavior |
| Schema | freeze fails before loading | No destination load |
| Schema | discard_row removes a row | Nested child can differ |
| Schema | discard_value removes a value | Unsupported with Pydantic validation |
| Run record | Schema, state, package, and trace | Stored as pipeline artifacts |
| Data quality | Checks destination data | Runs after the load |
Schema contracts apply the listed behavior before destination loading. Pipeline artifacts include inferred schemas, state, load packages, and execution traces. Data-quality checks are currently in public preview, as of 26 November 2026. They evaluate destination data and write summaries to _dlt_checks; a failed check does not stop the completed load.
The datasets UI is currently in public preview, as of 26 November 2026. Its read-only schema graph shows tables, normalized child tables, and foreign-key relationships inside a dataset. Workspace Explorer is currently in private preview, as of 26 November 2026. Its Data Lineage tab traces SQL databases, filesystems, and REST APIs through pipelines to datasets. The separate Job Graph shows success, failure, and completion triggers. This lineage ends at datasets; it does not provide table- or column-level lineage. When the Snowflake-as-orchestrator trigger pattern is selected, Snowflake stays the orchestrator of record. The separate guide to Snowflake ingestion covers the available loading methods.
Snowpark processes landed data; pipelines own ingestion
Snowpark handles supported transformations and machine learning on landed Snowflake data. The source-facing pipeline owns extraction, data shape, source failures, and the records that connect each load with its input.
An external access integration can make a network call possible without transferring that ownership to a function or stored procedure.
Book a call to try dltHub for source-to-Snowflake pipelines.
What is dltHub?
The agentic data layer on top of any data warehouse. Build, govern, heal and serve your data infrastructure on dltHub's managed infrastructure.
Was this page helpful?