Snowflake has made it easier to run non-SQL workloads close to warehouse data. That is useful, but it does not make the warehouse the right execution environment for every Python script or Spark application. The real architectural decision is where a workload should execute, who should operate it, and whether moving it changes cost, reliability, or governance for the better.
For data leaders, the question is not simply whether Snowflake Code Bundles can run a job. It is whether they reduce operational complexity without creating a new performance bottleneck or a poorly understood production dependency. This guide provides a practical decision framework, a reference operating model, and a pilot checklist.
The short answer
Use warehouse-based Code Bundles when a bounded Python or Spark batch workload primarily reads, transforms, and writes governed Snowflake data, and when keeping execution and orchestration near that data simplifies operations. Keep external compute when the workload is application-centric, needs specialized runtimes or sustained services, relies heavily on non-Snowflake data, or requires infrastructure controls that the preview feature cannot yet meet.
Do not move existing SQL transformations into Python merely because Python is available. Do not migrate a mature Spark platform based on a promise of source compatibility without testing its actual libraries, execution behavior, cost, and recovery requirements. Start with one representative job, not a wholesale platform decision.
What changed in September 2026?
On September 24, 2026, Snowflake announced preview support for Python Code Bundles on warehouse compute and Spark batch jobs using Snowpark Connect. Its September 24, 2026 release notes describe these additions alongside ML job support on compute pools. Snowflake’s Code Bundles documentation distinguishes those preview capabilities from the generally available notebook-scheduling capability previously associated with Notebook Projects.
A Code Bundle is a versioned Snowflake object containing project files and a YAML execution specification. It has an entrypoint, a source location, a runtime configuration, and an execution target. A run can be initiated with EXECUTE CODE BUNDLE, and supported orchestration options include Snowflake Tasks and external clients. This changes the packaging and deployment boundary: teams can submit a project rather than wrapping every script inside a stored procedure or managing an independent job container.
Read Snowflake’s Code Bundles documentation for the current feature status and supported execution patterns. Preview means teams should confirm account, region, runtime, security, and support constraints before committing a critical production workload.
Three bundle types, not one generic runtime
A custom bundle runs Python and can target a virtual warehouse or a Snowpark Container Services compute pool. A spark bundle runs Python, Scala, or Java Spark jobs on warehouse compute through Snowpark Connect. An ml bundle targets the Snowflake Container Runtime on a compute pool. These are different execution models with different dependency and resource assumptions.
For a custom Python bundle, warehouse compute is positioned for data processing where the heavy work is pushed down to Snowflake SQL or Snowpark operations. A compute pool is better suited to substantial Python-side processing, specialized packages, GPUs, or custom runtime requirements. Spark support should be evaluated as a supported Snowpark Connect execution path, not as an assurance that every Spark feature or third-party connector behaves exactly like an existing cluster.
Why the execution boundary matters
A typical analytics estate has at least four layers: ingestion, transformation, orchestration, and consumption. SQL models, Python transformations, Spark applications, and dashboards can all interact with the same warehouse, but their operating requirements differ. Moving code into Snowflake changes the placement of compute and responsibility; it does not eliminate the need for dependency management, tests, access control, monitoring, or a deployment process.
For example, a daily Python job that applies a small amount of procedural logic around Snowflake queries may be a good fit. A long-running customer-facing API that must respond continuously is not a batch Code Bundle merely because it uses Snowflake. A Spark job that mostly transforms warehouse-resident tables may merit a pilot. A Spark job that depends on unsupported libraries or external distributed storage may not.
The same principle applies to BI architecture. Actiknow’s business intelligence services cover data integration, modeling, reporting, and dashboard delivery. Those downstream needs should determine freshness, correctness, and operating requirements before teams choose the execution platform.
Five situations where warehouse Code Bundles deserve a pilot
1. Python orchestration around warehouse-native transformations
Consider a daily data-quality job that queries control tables, applies business rules, writes exception records, and emits a run summary. Most expensive operations occur in Snowflake. A packaged Python entrypoint may keep the job close to its data while preserving a conventional code repository and versioned release.
The design should still prefer set-based SQL for large joins and aggregations. Python should coordinate and validate, not pull millions of rows into a local process to reproduce work the warehouse already performs efficiently.

2. Batch enrichment with limited procedural logic
Some transformations need branching, reusable libraries, or structured validation that is cumbersome in a single SQL statement. Code Bundles can be a sensible home when the runtime dependencies are supported and the job’s memory and duration are predictable. Define exactly which operations execute in Snowflake and which execute in Python.
3. A Spark workload with Snowflake-resident inputs and outputs
Snowpark Connect can provide a path for certain Spark applications to execute against Snowflake compute. The strongest candidates are bounded batch transformations with limited external dependencies, clear input and output contracts, and code that can be validated against a representative dataset. Snowflake’s Spark job specification documents the language, runtime, dependency, and compute options that must be checked.

Compatibility must be proven with tests. Review unsupported APIs, Spark SQL behavior, UDFs, partition assumptions, dependency packaging, and any code that expects local or distributed filesystem semantics. A passing smoke test on ten rows is not a migration assessment.
4. Scheduled analytics maintenance
Jobs that update derived tables, validate reconciliation totals, or produce periodic control outputs can benefit from native scheduling with Snowflake Tasks. However, schedule ownership, upstream readiness, missed-run handling, and rerun procedures remain necessary. The fact that a task can launch a bundle does not make the workflow self-healing.
5. Teams trying to reduce a small external job estate
If a company maintains separate infrastructure only to execute a few scripts that mainly query Snowflake, Code Bundles may remove an unnecessary platform component. Quantify the benefit before migrating: fewer deployments, fewer secrets, simpler access reviews, and reduced operational handoffs may matter more than raw execution speed.
When to keep Python or Spark outside warehouse compute
Application services and interactive APIs
A web service needs request routing, availability controls, scaling, health checks, and often persistent processes. Code Bundles are designed around executing jobs. They should not be treated as a substitute for an application hosting platform. Use a service runtime when a service runtime is the actual requirement.
Compute-heavy Python that cannot be pushed down
If most time is spent in Python memory, complex native libraries, GPU processing, or a specialized runtime, compare compute pools or external platforms. Warehouse execution is attractive when the warehouse does the bulk of data processing. A large in-process algorithm can reverse that advantage.

External data movement dominates
A job that spends most of its time calling third-party APIs, moving large files between clouds, or waiting on external systems may be better placed in integration infrastructure. Evaluate network access, secret handling, retry semantics, rate limits, and the ownership of external side effects. Data proximity alone is not decisive.
Established Spark platforms with broad ecosystem dependencies
An existing Spark platform may already have stable scheduling, observability, connectors, autoscaling, and disaster recovery. Moving to Snowflake should offer a demonstrable advantage after compatibility testing, not simply a shorter architecture diagram. Mixed workloads may warrant a hybrid model.
Strict production constraints on preview features
As of November 2026, Snowflake documents warehouse Code Bundles and Spark bundle execution as public preview. Organizations with change-control, regulatory, or support restrictions may reasonably defer production adoption. The correct decision can be to run a controlled proof of concept while retaining a proven production path.
Code Bundles versus SQL, stored procedures, Tasks, and external orchestration
SQL and dbt models remain a strong default for relational transformations. Stored procedures are useful for logic that fits their execution and governance model. A Code Bundle is a packaging and execution option for non-SQL project code. A Task is an orchestration mechanism that can schedule execution. These are complementary concepts, not interchangeable products.
An external orchestrator such as Airflow may still own a workflow that crosses multiple systems, manages complex dependencies, or coordinates retries across vendors. It can invoke a Code Bundle for the Snowflake-resident portion while retaining end-to-end workflow state. Avoid creating two competing schedulers for the same business process.
For multi-source data estates, Actiknow’s custom solutions practice describes integrations, database and data-lake setup, and automation. That is a useful reminder to design the full data flow before deciding where one job should run.
A reference architecture for a governed batch job
Start with a source-controlled repository containing application code, tests, a pinned dependency manifest, and code_bundle.yml. A deployment pipeline validates the repository, creates or updates the bundle in a development environment, executes a test dataset, and promotes an approved version to production. Production execution uses a narrowly scoped role and a dedicated warehouse or compute target where appropriate.
The bundle reads governed source tables, writes to a staging or output schema, and records a run identifier, input watermark, row counts, validation results, and final status. A downstream publication step updates the business-facing table only after checks pass. Alerts go to the owner responsible for restoring the business outcome, not merely the administrator of the warehouse.
A minimal Python bundle specification
For orientation, the following simplified YAML illustrates a custom Python bundle targeting a warehouse. The exact supported fields and runtime versions should be confirmed against Snowflake’s current reference before deployment:
bundle:
type: custom
compute_type: warehouse
language: python
compute_options:
runtime_version: ‘3.11’
The entrypoint is a Python file in the packaged project. In a configured Snowflake session, execution uses the EXECUTE CODE BUNDLE statement with the bundle name and ENTRYPOINT. Production projects will also need explicit dependency, permission, deployment, and logging decisions. Do not copy a sample specification into production without testing it in the target account.
Seven controls that matter before production
1. Identity and least privilege
Use a dedicated execution role with only the database, schema, stage, bundle, and warehouse privileges it needs. Keep deployment rights separate from execution rights where practical. Review ownership and grants for created objects, and verify the role cannot read unrelated data. Do not use a broad administrator role merely because a pilot is easier that way.

2. Secrets and external access
Code Bundles can configure secrets and external access integrations where supported. Inventory every outbound dependency and credential, then test the exact permissions in the target runtime. Avoid embedding tokens in source code, YAML, logs, or environment-specific commits. Prefer managed identity and controlled secret mechanisms where available.
3. Immutable versions and rollback
A bundle version is a snapshot of packaged files. Record the source commit, dependency versions, bundle version, execution environment, and deployment approval. Releasing new code should not erase the ability to reproduce the prior run. A rollback procedure must specify which version is restored and how partially written data is reconciled.
4. Idempotent writes and replay
A scheduler can retry after a timeout even if the first attempt completed part of the work. Design outputs so the same logical batch can be safely reprocessed. Use stable business keys, controlled MERGE or replacement patterns, checkpoints, and a clear rule for late-arriving data. Never treat a successful job status as proof that financial or operational totals are correct.
5. Workload isolation and cost
Benchmark on a warehouse sized for the actual job, and consider isolating heavy scheduled work from interactive dashboards. Measure credits, execution time, queued time, bytes scanned, data transferred, and cost per successful batch. Warehouse size and auto-suspend settings affect economics; shared capacity can create interference even when each job is individually efficient.
6. Observability and business reconciliation
Capture job start and finish times, query or execution identifiers, error categories, retries, source freshness, expected versus processed records, and downstream publication status. Alert on missed schedules and stale outputs, not only thrown exceptions. A completed bundle that silently produces an empty table can be more damaging than a visible failure.
7. Runtime and dependency management
Pin and review supported Python, Spark, and package versions. Test imports, startup overhead, dependency resolution, stage access, and the precise filesystem assumptions of the job. Snowflake documents that warehouse stage mounts are read-only, while compute-pool mounts have different capabilities. These details can break an otherwise plausible migration.
A practical decision scorecard
Score each candidate job from 1 (poor fit) to 5 (strong fit) against six dimensions: data locality, SQL pushdown, runtime compatibility, external dependencies, operational simplification, and preview tolerance. A job with high locality and pushdown but low compatibility should not be averaged into approval; unsupported critical dependencies are a hard stop.
Example A: a nightly Python reconciliation over Snowflake tables may score well because the inputs, joins, and outputs are already warehouse-resident. Example B: a Scala Spark job with a complex connector ecosystem may score poorly until dependencies and semantics are verified. Example C: an API that continuously serves customer requests is usually the wrong workload category regardless of its score.
The scorecard is a conversation aid, not a vendor benchmark. Require an actual proof of concept for borderline cases, and define the business outcome that would justify a migration.
How to benchmark fairly
Compare the current platform and the proposed bundle on the same representative input volume and transformation logic. Record elapsed time, compute consumption, engineering effort, failure recovery, and the freshness of the final business table. Include cold starts, normal loads, and peak loads. Separate query execution from dependency installation, orchestration wait, and output validation.

For Spark, compare row counts, null behavior, decimal precision, time zones, duplicate handling, and ordering assumptions. Differences in results are defects to investigate, not acceptable performance tradeoffs. For Python, test memory pressure and data movement, not only the duration of one SQL query.
Do not extrapolate a 1 GB pilot linearly to a 1 TB production workload. Use multiple data volumes and measure how runtime and credits scale. Include a deliberate failure, a retry, and a replay of the same batch to prove recoverability.
A 30-day adoption plan
Days 1-5: inventory and selection
List candidate Python and Spark jobs, their owners, runtimes, dependencies, data locations, frequency, costs, SLAs, and current incident history. Select one low-risk, high-locality job with an unambiguous output contract. Confirm preview eligibility and any internal production policy restrictions.
Days 6-12: package and establish controls
Build the bundle, pin dependencies, create least-privilege roles, and define the deployment path. Add source-to-output reconciliation, a stable batch identifier, and structured execution logs. Preserve the existing job as a fallback.
Days 13-20: compare execution and recovery
Run both implementations against comparable inputs. Validate output equivalence, duration, compute credits, queueing, and error handling. Simulate a failure after partial progress and confirm the rerun does not duplicate or corrupt data.
Days 21-26: limited operational pilot
Schedule the candidate in a controlled environment or approved limited production scope. Monitor multiple runs and verify that business owners receive useful failure and freshness alerts. Review access grants, deployment history, and the cost attribution.
Days 27-30: decide and document
Approve expansion only if the pilot meets its defined business and operational thresholds. Otherwise retain external execution and document the blocker. Record the architecture decision, supported workloads, runbook, rollback route, and next review date. A documented decision not to migrate is a valid result.
Executive questions worth asking
Can the team identify which workloads are actually candidates, rather than assuming all Python and Spark should move? What percentage of processing occurs inside Snowflake versus in the Python process or external systems? Are we reducing a platform dependency or merely shifting its operational burden? What happens when a job runs twice? Who owns stale or incorrect downstream metrics? Can we show cost per successful business outcome?
These questions connect platform design to business reliability. The aim is not to maximize the amount of code executed inside Snowflake. It is to create a smaller, clearer, more dependable operating model for the workloads that belong there.
Frequently asked questions
Are Snowflake Code Bundles generally available?
Not uniformly. Snowflake documents generally available notebook scheduling on compute pools, while warehouse execution, Spark bundles, and several related capabilities are in public preview as of November 2026. Check current release notes and your account before making production commitments.
Do Code Bundles replace Snowflake Tasks?
No. A Code Bundle packages and executes code. A Task can schedule or orchestrate execution. A single workflow may use both.
Do they replace stored procedures?
Not categorically. They provide another execution and packaging option for non-SQL projects. Stored procedures remain useful when their semantics, integration, and governance fit the workload.
Can any existing Spark application run unchanged?
Do not assume so. Snowpark Connect supports specific Spark execution paths. Test APIs, connectors, libraries, SQL semantics, and output equivalence against the actual application.
Does warehouse execution mean Python uses the same architecture as a SQL query?
No. The job runs in a supported warehouse execution environment, but Python-side processing and pushed-down warehouse operations have different resource characteristics. Measure both.
Can a Code Bundle call external APIs?
External access is subject to supported integrations, security configuration, and runtime constraints. For API-heavy workflows, compare the complexity and reliability of an external integration service before moving execution.
How should a team choose between warehouse and compute pool?
Favor warehouse compute when most work can be pushed down into Snowflake data operations. Evaluate compute pools for more substantial Python-side processing, specialized runtimes, or hardware requirements, subject to feature support.
What is the most important migration test?
Business output equivalence under realistic volume, followed by safe recovery after failure. Faster execution is not a success if records are missing, duplicated, or calculated differently.
Will Code Bundles automatically lower Snowflake costs?
No. They can reduce operational components, but compute credits, startup behavior, warehouse sizing, and workload interference must be measured. Compare total operating cost, not just the number of services.
Should every new Python transformation use a Code Bundle?
No. Start with the simplest maintainable mechanism that satisfies the contract. SQL, dbt, stored procedures, Code Bundles, compute pools, and external jobs each have appropriate roles.
The decision: run code where it belongs
Snowflake Code Bundles are an important addition to the data engineering toolkit because they make packaged non-SQL execution more accessible within Snowflake. The value is architectural choice, not an instruction to consolidate every workload into one runtime. The best candidates have warehouse-local data, bounded batch behavior, supported dependencies, and a clear operational advantage.
If your team is deciding whether to consolidate data transformations, integrations, and reporting jobs, Actiknow can help assess the data flow, ownership model, and delivery requirements. Explore our business intelligence and custom integration capabilities, or contact Actiknow to discuss a focused architecture review.
Technical references
Snowflake Code Bundles documentation (feature availability, execution targets, versioning, scheduling, and runtime configuration).
Snowflake September 24, 2026 release notes (preview launch of warehouse execution and Spark bundles).
Snowflake Spark job specification reference (supported bundle fields and language/runtime dependencies).

