---
title: Spark Submit (legacy, deprecated, removal planned for mid-2026)
description: Configure a legacy Spark Submit task in a Lakeflow Job. This task type is deprecated and pending removal; use a JAR task instead.
canonical_url: https://docs.databricks.com/aws/en/jobs/tasks/spark-submit-legacy
---

# Spark Submit (legacy, deprecated, removal planned for mid-2026)

The **Spark Submit** task type is a legacy pattern for configuring JARs as tasks.

> [!WARNING]
>
> The Spark Submit task is deprecated and pending removal in mid-2026. Usage of this task type is disallowed for new use cases and strongly discouraged for existing customers. Databricks recommends using the **JAR** task instead for JVM workloads. See [JAR task for jobs](https://docs.databricks.com/aws/en/jobs/tasks/jar.md).

## Limitations

* You can only run spark-submit tasks on new clusters.
* You must upload your JAR file to a location or Maven repository compatible with your compute configuration. See [Java and Scala library support](https://docs.databricks.com/aws/en/libraries/index.md#jar-library-support).
* You cannot access JAR files stored in volumes.
* Spark-submit does not support cluster autoscaling. To learn more about autoscaling, see [Cluster autoscaling](https://docs.databricks.com/aws/en/compute/configure.md#autoscaling).
* Spark-submit does not support cluster auto-termination. Spark applications launched using Spark-submit should explicitly call `System.exit` when they have completed.
* Spark-submit does not support [Databricks Utilities (`dbutils`) reference](https://docs.databricks.com/aws/en/dev-tools/databricks-utils.md). To use Databricks Utilities, use JAR tasks instead.
* If you use a Unity Catalog-enabled cluster, spark-submit is supported only if the cluster uses the dedicated access mode. Standard access mode is not supported. See [Access modes](https://docs.databricks.com/aws/en/compute/configure.md#access-mode).
* Structured Streaming jobs should never have maximum concurrent runs set to greater than 1. Streaming jobs should be set to run using the cron expression `"* * * * * ?"` (every minute). Because a streaming task runs continuously, it should always be the final task in a job.

## Configure a Spark Submit task

Add a `Spark Submit` task from the **Tasks** tab in the Jobs UI by doing the following:

1. Click ![Plus icon.](https://docs.databricks.com/aws/en/images/product-icons/PlusIcon.svg) **Add task**.

2. Enter a name into the **Task name** field.

3. In the **Type** drop-down menu, select `Spark Submit`.

4. Use **Compute** to configure a cluster that supports the logic in your task.

5. Use the **Parameters** text box to provide all arguments and configurations necessary to run your task as a JSON array of strings.
   * The first three arguments are used to identify the main class to run in a JAR at a specified path, as in the following example:

     ```json
     ["--class", "org.apache.spark.mainClassName", "dbfs:/Filestore/libraries/jar_path.jar"]
     ```

   * You cannot override the `master`, `deploy-mode`, and `executor-cores` settings configured by Databricks

   * Use `--jars` and `--py-files` to add dependent Java, Scala, and Python libraries.

   * Use `--conf` to set Spark configurations.

   * The `--jars`, `--py-files`, `--files` arguments support DBFS and S3 paths.

   * By default, the Spark submit job uses all available memory, excluding memory reserved for Databricks services. You can set `--driver-memory`, and `--executor-memory` to a smaller value to leave some room for off-heap usage.

6. Click **Save task**.
