Configure job parameters

This article describes job parameter functionality and configuring job parameters with the Databricks workspace UI. You can also add job parameters to JSON and YAML definitions used with the REST API, CLI, and DABs. See Jobs API, What is the Databricks CLI?, and What are Databricks Asset Bundles?.

What are job parameters?

Job parameters are key-value pairs that allow you to parameterize jobs with default static or dynamic values. You can optionally override parameters configured in a job when triggering a new run. See Run a job with different parameters.

Job parameter keys can only contain _ - . or alphanumeric characters. Parameter values are set as strings or dynamic value references. See What is a dynamic value reference?.

Note

You can use any valid JSON as a parameter value. For example, the For each task type can parse lists such as the following:

[1, 2, 3]
['a', 'b', 'c']

Add or edit job parameters

Use the Job parameters dialog to add new parameters, edit existing parameter keys and values, or delete parameters.

To edit parameters with the workspace UI, select an existing job using the following steps:

  1. Click Workflows Icon Workflows in the sidebar.

  2. In the Name column, click the job name.

  3. In the Job details sidebar, click Edit parameters. The Job parameters dialog appears.

  4. Add or edit parameters using Key and Value fields.

  5. Click the Trash to remove a parameter.

  6. Click Save to apply your changes.

Note

Click { } to list available dynamic value references. Select an option from the list to insert it into the Value field.

Job parameter pushdown

Job parameters are automatically pushed down as key-value parameters to all tasks that accept key-value parameters, which include the following task types:

  • Notebook

  • Python wheel (only when configured with keyword arguments)

  • SQL query, legacy dashboard, or file

  • Run Job

Job parameters passed to tasks are visible in the task configuration in the UI alongside configured task parameters.

Important

Job parameters take precedence over task parameters. If a job parameter and a task parameter have the same key, the job parameter overrides the task parameter.

Dynamic value references to job parameters

All tasks that accept dynamic value references can access job parameters.

Use the dynamic value reference {{job.parameters.<name>}}, replacing <name> with the key that identifies the parameter.

Run a job with different parameters

You can override configured job parameters or add new ones when you run a job with different parameters. See Run a job with different parameters.

You can also override job parameters when you repair a job run. See Re-run failed and skipped tasks.