Skip to main content
Run your Spark applications on oleander-managed infrastructure or on your own registered Spark clusters. Upload artifacts to oleander for the managed cluster, or keep jobs in your environment for registered clusters. Manage runs and capture lineage metadata for full observability of your data transformations. Spark also serves queries you never submit as jobs. The query router sends Iceberg DDL, writes to a destination table, and inputs too large for a sandbox here automatically, and those runs show up alongside the ones you submit yourself.

Installation

Configuration

Authenticate with the API key from your oleander settings.

Oleander Managed Spark

Upload, list, and delete artifacts only on the oleander-managed cluster.

Initialize a PySpark workspace

Create a new PySpark job workspace:
Example:
You can also initialize the current directory:
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

List your uploaded Spark artifacts:
This lists all Spark artifacts available to run.

Upload your Spark artifact

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

Include Python dependencies

If your Python artifact needs additional Python modules, package them in a ZIP and include them with --py-files:
Example:

Include a virtual environment

If your Python artifact depends on a packaged virtual environment, include it with --virtualenv:
Example:

Delete a Spark artifact

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

Submit and execute a Spark job

Submit your uploaded artifact to the oleander-managed cluster. Use the exact uploaded filename without the path, such as process_sales_data.py or analytics-batch.jar. The --wait flag keeps the command running until the job finishes.
Example:

Common submit options

  • --cluster: Cluster name. Defaults to the oleander-managed cluster when omitted.
  • --namespace (required): Namespace for the job, a logical group such as a team or project.
  • --name (required): Job name. Runs with the same namespace and name are grouped under the same job.
  • --args: Spark job entrypoint arguments.
  • --sparkConf: Spark configurations without --conf, for example spark.default.parallelism=8. Separate multiple configurations with whitespace.
  • --packages: Extra package coordinates.
  • --jobTags: Job-specific tags in key=value form. Separate multiple tags with whitespace.
  • --runTags: Run-specific tags.
  • --wait: Wait until the job finishes.

Oleander-managed submit options

  • --driverMachineType: oleander Spark driver machine type.
  • --executorMachineType: oleander Spark executor machine type.
  • --executorNumbers: Number of executor instances.

Registered EMR Serverless Spark

Register your EMR Serverless cluster and target it by name when submitting jobs. Include --cluster <name> and provide the S3 entrypoint to a .py or .jar artifact.

Register an EMR Serverless cluster

Register options

  • --region: AWS region of the EMR Serverless application.
  • --account-id: AWS account ID of the EMR Serverless application.
  • --controller-role-arn: IAM role ARN oleander assumes to start job runs. Add this to the role’s trust policy so oleander can assume it:
Add this permissions policy to the controller role so oleander can run the job:
  • --execution-role-arn: IAM role ARN the job uses; the Spark application runs with this role’s permissions.
  • --application-id: EMR Serverless application ID.
  • --log-bucket: S3 bucket for job logs.

Submit a job to EMR Serverless

Example:

Submit options

  • --cluster (required): Name of the registered cluster.
  • --namespace (required): Namespace for the job, a logical group such as a team or project.
  • --name (required): Job name. Runs with the same namespace and name are grouped under the same job.
  • --args: Spark job entrypoint arguments.
  • --sparkConf: Spark configurations without --conf, for example spark.default.parallelism=8. Separate multiple configurations with whitespace.
  • --packages: Extra package coordinates.
  • --jobTags: Job-specific tags in key=value form. Separate multiple tags with whitespace.
  • --runTags: Run-specific tags.
  • --executionIamPolicy: IAM policy for job permissions. Final permissions are the intersection of the job execution role and this policy.
  • --pyFiles: Extra pyFiles for the PySpark job. Mutually exclusive with --mainClass.
  • --virtualenv: Virtual environment archive for Python jobs.
  • --mainClass: Entrypoint main class for the Java/Scala Spark job. Use instead of Python-specific options such as --pyFiles and --virtualenv.
  • --wait: Wait until the job finishes.

Registered Glue Spark

Register your Glue cluster and target it by name when submitting jobs. Include --cluster <name>. Submit uses the existing Glue job name in your environment.

Register a Glue cluster

Register options

  • --controller-role-arn: IAM role ARN oleander assumes to start job runs. Add this to the role’s trust policy so oleander can assume it:
Add this permissions policy to the controller role so oleander can run the job:

Submit a job to Glue

Use --cluster to select the registered cluster:
Example:

Submit options

  • --cluster (required): Name of the registered cluster.
  • --namespace (required): Namespace for the job, a logical group such as a team or project.
  • --name (required): Job name. Runs with the same namespace and name are grouped under the same job.
  • --args: Spark job entrypoint arguments.
  • --sparkConf: Spark configurations without --conf, for example spark.default.parallelism=8. Separate multiple configurations with whitespace.
  • --packages: Extra package coordinates.
  • --jobTags: Job-specific tags in key=value form. Separate multiple tags with whitespace.
  • --runTags: Run-specific tags.
  • --executionIamPolicy: IAM policy for job permissions. Final permissions are the intersection of the job execution role and this policy.
  • --workerType: Glue worker type.
  • --numberOfWorkers: Number of Glue workers.
  • --enableAutoScaling: Set to true for auto scaling, false otherwise.
  • --executionClass: Glue execution class. Either STANDARD or FLEX.
  • --timeoutMinutes: Glue job timeout in minutes.
  • --wait: Wait until the job finishes.
When your Spark job runs, oleander captures OpenLineage metadata for lineage and dependencies. View results and the lineage graph in your oleander dashboard.