Skip to main content
Run your Spark applications on oleander-managed infrastructure or on your own registered clusters. For a full overview of Spark on oleander, see the Spark documentation.

Oleander-managed Spark

Initialize a PySpark workspace

Create a new PySpark job workspace:
Example:
You can also initialize the current directory:
Pass flags to skip the interactive prompts:
The initialized workspace includes:
  • entrypoint.py as the Spark job entrypoint
  • mylib/ for Python modules packaged as pyFiles
  • pyproject.toml and uv.lock for project and dependency management with uv
  • Makefile targets for building deployable artifacts
Use uv to manage dependencies:
Use make to build the deployment artifacts:
This builds:
  • out/pyfiles.zip
  • out/environment.tar.gz
You can also build individual artifacts:
After building, upload and submit from the initialized workspace:

List your Spark artifacts

Download a Spark artifact

Print the source of an uploaded artifact to stdout:
To fetch a specific version:

Upload a Spark artifact

Upload a local .py or .jar artifact to oleander:
Example:
JAR example:
Every upload creates a new artifact version on the backend. Upload options:

Delete a Spark artifact

Use the exact uploaded artifact name, including the file extension. Example:

Submit a job

Submit an uploaded artifact to the oleander-managed cluster. Use the uploaded artifact name as the entrypoint.
Example:
Common submit options: Oleander-managed submit options:

Stop a running job

Abort a run that is currently in progress:
The run ID is returned when you submit a job and is also visible in the oleander UI.

Registered clusters

List registered clusters

Registered EMR Serverless

Register your EMR Serverless cluster, then target it by name when submitting jobs.

Register a cluster

See the Spark documentation for IAM policy details.

Submit a job

Use an EMR-compatible entrypoint, such as an S3 URI to a .py or .jar artifact.
Example:
Additional EMR Serverless flags:

Registered Glue

Register your Glue cluster, then target it by name.

Register a cluster

See the Spark documentation for IAM policy details.

Submit a job

For Glue, the entrypoint is the Glue job name.
Additional Glue flags:
For Glue jobs, --args must be passed as alternating key-value pairs, for example --args source s3://bucket/in target s3://bucket/out.