# Spark Driver

> The main Spark process. It plans the work and hands tasks to the executors.

**Field:** Data Engineering  
**Category:** Processing  
**Also known as:** Driver Program, Spark Driver Program, Driver Node

## Think of it like

It is like a head chef who reads the order and hands out the jobs. The chef does not chop.

## Definition

The Spark driver is the main process of a Spark program. It runs your code, plans the work and splits it into small tasks. It then sends those tasks to executors on other machines and keeps track of them. When you ask for a result, such as with collect, the answer comes back to the driver. If the driver stops, the whole program stops.

## Example

A job counts 2 billion clicks. The driver splits it into 400 tasks and sends them out. It gets back one small number.

## Why it matters

Every Spark job has exactly one driver. When it runs out of memory, the whole job fails.

## Common mistake

Calling collect on a huge table. Every row is pulled into the driver, and it runs out of memory.

## Three principles

- **One per program.** It runs your main code.
- **Plans and sends.** Splits the work into tasks.
- **Gets results.** Answers come back to it.

## Related terms

- [Apache Spark](https://learn.benibix.com/term/data/apache-spark)
- [Spark Executor](https://learn.benibix.com/term/data/spark-executor)
- [PySpark](https://learn.benibix.com/term/data/pyspark)
- [Data Shuffle](https://learn.benibix.com/term/data/data-shuffle)
- [Databricks Compute](https://learn.benibix.com/term/data/databricks-compute)

## Told apart from

- [Spark Driver vs Spark Executor](https://learn.benibix.com/compare/spark-driver-vs-spark-executor): People think the Spark driver does the heavy work, and it does not. The driver runs your code, plans the job and hands out tasks. The executors on other machines do the reading and the adding up. Only the final answer comes back to the driver. That is why pulling a huge table into it makes it crash.

![A highlighted driver at the top runs your code and splits it into tasks. Arrows marked tasks lead down to three executors. Each executor holds its own slice of the big table and a highlighted copy of the small table. A note says that in a broadcast join each executor gets the small table and joins locally, so the big table never moves between machines.](https://learn.benibix.com/diagrams/dat3-spark-cluster.svg)

---

Source: https://learn.benibix.com/term/data/spark-driver
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-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
