Overview
What the Spark runtime gives you#
- Apache Spark with Python 3.12 (PySpark, pandas, NumPy, scikit-learn, DuckDB and more).
- The Groundzero helper library (
GZ). It creates your Spark session and adds every connector as a method on that session. - More than 50 connector families: databases, warehouses, object stores, streams, SaaS APIs, vector stores and LLM providers.
- Apache Iceberg support for Groundzero Lakehouse tables, with per-table permissions, audit logging and lineage.
- A paged preview of your result in the UI, and logs streamed while the job runs.
- JupyterLab notebooks on the same runtime.
You do not install or deploy anything. Pick the Spark runtime and a compute size when you create a job, dataset or notebook.
Choose the Spark runtime#
Groundzero offers three runtime families. Use the table to decide which one fits your workload.
| Spark | DuckDB | Standard | |
|---|---|---|---|
| Engine | Distributed Apache Spark | Single-node DuckDB | Managed query engine |
| Language | Python (PySpark) | Python (DuckDB) | SQL plus pandas Prep |
| Scales by | Adding workers | Larger compute size | Managed by Groundzero |
| Best for | Large joins, wide ETL, streaming, ML | Fast single-node analysis | Simple governed datasets |
| Chosen for | Jobs, notebooks, datasets | Jobs, notebooks, datasets | Datasets only |
| Compute picker | Yes, with workers | Yes | None |
Choose Spark when:
- Your data does not fit comfortably in the memory of one machine.
- You need Structured Streaming (Kafka, Kinesis, Pulsar, Iceberg streaming).
- You need the broadest connector coverage, including bulk loads from Snowflake and Redshift straight into the lakehouse.
- You train or score models over a DataFrame, or call an LLM for every row.
Choose another runtime when the data is small (a few gigabytes) and start-up time matters more than scale. Spark starts a driver and at least one worker before your code runs, so a single-node runtime starts faster.
Where the other runtimes are documented
The DuckDB and Standard runtimes have their own guides. This guide only covers Spark.
How a run works#
Compute size and workers#
You choose a named compute size in the runtime picker. Each size sets the CPU and memory of the driver and of every worker.
| Setting | Value | Notes |
|---|---|---|
| Minimum workers | Default 1 | Set in the runtime picker |
| Maximum workers | 10 | Fixed per session |
| Scale-up trigger | 70 percent | Average CPU or memory use across workers |
| Executor memory | 65 percent of worker memory | Never more than worker memory minus 1 GiB |
Workers are added automatically when CPU or memory use passes 70 percent, up to a maximum of 10 workers. Workers added during a heavy workload stay until the session ends. Spark releases idle executors after 120 seconds. To get more memory per executor, choose a larger compute size.
What happens when a job runs#
- Groundzero loads your script.
- It replaces placeholders such as
{STRTTM}and{SITENM}in the code (see Placeholders in the API reference). - It runs the script. Standard output and standard error stream to the job log.
- If the script defined a variable named
outputDF, Groundzero reads up to 100,000 rows of it for the preview and shows the first page. Later pages are served without recomputing the result. - Groundzero records the final status and lineage, and sends the completion notification if one is configured.
Notebooks skip these steps. They start JupyterLab with a kernel that has already
imported sparkSession, pandas, numpy, pyspark and executeJob.
Sessions and datasets#
A dataset that uses the Spark runtime runs its query in a Spark session that is shared between users of the same dataset. One session handles one run at a time. When every session for the dataset is busy, Groundzero starts another instead of queueing your run. A session stays available for 280 seconds after its last run and shuts down after 300 seconds of inactivity.
Lakehouse permissions are checked as the user who starts each run, and the session clears its views when the user changes. One user never sees another user's governed rows.
Keep a notebook or dataset warm
If your next run starts within a few minutes, it reuses the running session and skips the Spark start-up. After the idle window, the next run starts a new session.
Versions#
| Component | Version |
|---|---|
| Python | 3.12 |
| Apache Spark (and PySpark) | 3.5.6 |
| Java | OpenJDK 17 |
| Apache Iceberg | 1.11.0 |
| Delta Lake | 3.3.2 |
| Apache Hudi | 1.1.1 |
| NumPy | 2.3.5 |
| pandas | 2.2 or later, below 3 |
| DuckDB (Python) | 1.5.5 |
| scikit-learn | 1.5.2 |
| PyTorch (CPU) | 2.14.0 |
| MLflow | 2.20.4 |
| Qualipilot (data quality) | 3.5.0 |
| Docling (PDF extraction) | 2.116.0 |
Connector driver versions you may need when you read vendor documentation:
| Connector | Version |
|---|---|
| PostgreSQL JDBC | 42.7.11 |
| MySQL | 8.4.0 |
| SQL Server JDBC | 13.4.0 |
| Oracle JDBC | 23.6.0.24.10 |
| Snowflake Spark / JDBC | 3.1.7 / 3.28.0 |
| MongoDB Spark | 10.5.0 |
| Kafka clients | 3.4.1 |
| Elasticsearch Spark | 9.4.1 |
| BigQuery Spark | 0.44.0 |
What changed recently#
The Spark runtime is updated continuously and has no numbered releases. Recent changes that affect your code, newest first:
- Bulk loads from Snowflake and Redshift into lakehouse tables
(
bulkLoadGzLakehouseFromSnowflake,bulkLoadGzLakehouseFromRedshift). - Lineage is recorded for every connector read and write.
- Dataset previews of wide nested columns no longer run out of memory.
- Faster start-up for Spark sessions.
- The
*NativeREST methods are now named*Arrow. - Qualipilot 3.5.0 data quality, PDF extraction with OCR, Agent calls over documents, an xAI connector and LLM completion across providers.
Machine-learning variants#
Three machine-learning variants add libraries for model work. They keep every Spark and Groundzero feature. Choose a variant in the runtime picker when you need it.
| Variant | Adds |
|---|---|
| scikit-learn | opencv-python-headless, xgboost, lightgbm, catboost |
| PyTorch | PyTorch 2.5.1 and torchvision 0.20.1 (CUDA 12.1 build), shap, lime, albumentations, transformers, huggingface_hub, fastai, simsimd, plus the scikit-learn set |
| TensorFlow | tensorflow, nltk, spacy, h5py, shap, lime, scipy, opencv, xgboost, lightgbm, catboost |
All variants include scikit-learn 1.5.2, NumPy and pandas. The PyTorch variant uses the CUDA 12.1 build of PyTorch, so it can use an NVIDIA GPU when you set a GPU size.
Check the exact versions
The TensorFlow variant installs its packages without version pins. To see a
version, run import tensorflow as tf; print(tf. (or the
equivalent for any package) in a notebook on the variant.
For LLM fine-tuning libraries (unsloth, trl, peft, bitsandbytes), use a GPU
variant and install them with %pip in a notebook (see Install and use extra
packages).