Configuration reference
This page provides reference for keys supported by Declarative Automation Bundles (formerly known as Databricks Asset Bundles) configuration (YAML). See What are Declarative Automation Bundles?.
For complete bundle examples, see Bundle configuration examples and the bundle-examples GitHub repository.
artifacts
Type: Map
Specifies the artifacts to automatically build during bundle deployments that can be used later in bundle runs. Each key is the name of the artifact, and the value is a Map that defines the artifact build settings.
You can define, combine, and override the settings for artifacts in bundles as described in Override with target settings.
artifacts:
<artifact-name>:
<artifact-field-name>: <artifact-field-value>
Key | Type | Description |
|---|---|---|
| String | An optional set of build commands to run locally before deployment. For Python wheel builds, the Databricks CLI assumes that it can find a local install of the Python |
| Boolean | Whether to patch the wheel version dynamically based on the timestamp of the whl file. If this is set to Added in Databricks CLI version 0.245.0 |
| String | The executable type. Valid values are |
| Sequence | The relative or absolute path to the built artifact files. See artifacts.name.files. |
| Map | For a Added in Databricks CLI version 1.15.0 |
| Sequence | For a Added in Databricks CLI version 1.15.0 |
| String | The local path of the directory for the artifact. Paths are relative to the location of the bundle configuration file. For Python wheel builds, it is the path to the Python wheel file's |
| String | The type of the artifact. Valid values are |
Examples
The following configuration builds a Python wheel using Poetry:
artifacts:
default:
type: whl
build: poetry build
path: .
The following configuration runs tests and builds a wheel. For a complete bundle tutorial that uses artifacts to build a wheel, see Build a Python wheel file using Declarative Automation Bundles.
artifacts:
default:
type: whl
build: |-
# run tests
python -m pytest tests/ -v
# build the actual artifact
python setup.py bdist_wheel
path: .
For an example configuration that builds a JAR and uploads it to Unity Catalog, see Bundle that uploads a JAR file to Unity Catalog.
artifacts.name.files
Type: Sequence
The relative or absolute path to the built artifact files. Use source to specify the built artifacts. Paths are relative to the location of the bundle configuration file.
Key | Type | Description |
|---|---|---|
| String | Required. The artifact source file. |
artifacts.name.git
Type: Map
For a tgz artifact, snapshot this git ref instead of the working tree. Mutually exclusive with build.
Added in Databricks CLI version 1.15.0
Key | Type | Description |
|---|---|---|
| String | The git branch to snapshot. Added in Databricks CLI version 1.15.0 |
| String | The git commit to snapshot. Takes precedence over Added in Databricks CLI version 1.15.0 |
bundle
Type: Map
The bundle attributes when deploying to this target.
A bundle configuration file must contain only one top-level bundle mapping.
This bundle mapping must contain a name mapping that specifies a programmatic (or logical) name for the bundle. The following example declares a bundle with the programmatic (or logical) name hello-bundle.
bundle:
name: hello-bundle
A bundle mapping can also be a child of one or more of the targets in the top-level targets mapping. Each of these child bundle mappings specify any non-default overrides at the target level.
Key | Type | Description |
|---|---|---|
| String | The ID of a cluster to use to run the bundle. This key enables you to specify the ID of a cluster to use as an override for clusters defined elsewhere in the bundle configuration file. For information about how to retrieve the ID of a cluster, see Compute resource URL and ID. The |
| String | Deprecated. The ID of the compute to use to run the bundle. |
| String | The Databricks CLI version to use for the bundle. See bundle.databricks_cli_version. |
| Map | The definition of the bundle deployment. For supported attributes see Declarative Automation Bundles deployment modes. See bundle.deployment. |
| String | The deployment engine to use. Valid values are Added in Databricks CLI version 0.295.0 |
| Map | The Git version control details that are associated with your bundle. For supported attributes see git. |
| String | The name of the bundle. |
| String | Reserved. A Universally Unique Identifier (UUID) for the bundle that uniquely identifies the bundle in internal Databricks systems. This is generated when a bundle project is initialized using a Databricks template (using the Added in Databricks CLI version 0.236.0 |
bundle.databricks_cli_version
The bundle mapping can contain a databricks_cli_version mapping that constrains the Databricks CLI version required by the bundle. This can prevent issues caused by using mappings that are not supported in a certain version of the Databricks CLI.
The Databricks CLI version conforms to semantic versioning and the databricks_cli_version mapping supports specifying version constraints. If the current databricks --version value is not within the bounds specified in the bundle's databricks_cli_version mapping, an error occurs when databricks bundle validate is executed on the bundle. The following examples demonstrate some common version constraint syntax:
bundle:
name: hello-bundle
databricks_cli_version: '0.218.0' # require Databricks CLI 0.218.0
bundle:
name: hello-bundle
databricks_cli_version: '0.218.*' # allow all patch versions of Databricks CLI 0.218
bundle:
name: my-bundle
databricks_cli_version: '>= 0.218.0' # allow any version of Databricks CLI 0.218.0 or higher
bundle:
name: my-bundle
databricks_cli_version: '>= 0.218.0, <= 1.0.0' # allow any Databricks CLI version between 0.218.0 and 1.0.0, inclusive
bundle.deployment
Type: Map
The definition of the bundle deployment
Key | Type | Description |
|---|---|---|
| String | The ID the deployment metadata service assigned to this bundle's deployment. Output only. Added in Databricks CLI version 1.16.0 |
| Boolean | Whether to fail on active runs. If this is set to true a deployment that is running can be interrupted. |
| Integer | The most recent version the deployment metadata service recorded for this deployment. Output only. Added in Databricks CLI version 1.16.0 |
| Map | The deployment lock attributes. See bundle.deployment.lock. |
bundle.deployment.lock
Type: Map
The deployment lock attributes.
Key | Type | Description |
|---|---|---|
| Boolean | Whether this lock is enabled. |
| Boolean | Whether to force this lock if it is enabled. |
experimental
Type: Map
Defines attributes for experimental features.
Key | Type | Description |
|---|---|---|
| Boolean | Whether to record deployment history using the deployment metadata service (DMS), which tracks what changed across deployments. Added in Databricks CLI version 1.16.0 |
| Boolean | Whether to deploy the bundle to a hidden, read-only folder so that deployed assets can't be modified by non-admin users and running jobs aren't affected by in-progress deployments. See immutable_folder. Added in Databricks CLI version 1.6.0 |
| Map | Deprecated. Use the top-level python mapping instead. Added in Databricks CLI version 0.238.0 |
| Boolean | Whether to use a Python wheel wrapper. |
| Map | The commands to run. |
| Boolean | Determines whether to skip deleting the Added in Databricks CLI version 0.254.0 |
| Boolean | Whether to skip adding the prefix (set in Added in Databricks CLI version 0.255.0 |
| Boolean | Whether to use the legacy run_as behavior. |