---
title: Declarative Automation Bundles resources
description: Learn about resources supported by Declarative Automation Bundles and how to configure them.
canonical_url: https://docs.databricks.com/aws/en/dev-tools/bundles/resources
---

# Declarative Automation Bundles resources

Declarative Automation Bundles (formerly known as Databricks Asset Bundles) allows you to specify information about the Databricks resources used by the bundle in the `resources` mapping in the bundle configuration. See [resources reference](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#resources).

This page provides configuration reference for all supported resource types for bundles and provides details and an example for each supported type. For additional examples, see [Bundle configuration examples](https://docs.databricks.com/aws/en/dev-tools/bundles/examples.md).

The JSON schema for bundles that is used to validate YAML configuration is in the [Databricks CLI GitHub repository](https://github.com/databricks/cli/blob/main/bundle/schema/jsonschema.json).

> [!TIP]
>
> To generate YAML for any existing resource, use the `databricks bundle generate` command. See [databricks bundle generate](https://docs.databricks.com/aws/en/dev-tools/cli/bundle-commands.md#generate).

## <a id="resource-types" />Supported resources

The following table lists supported resource types for bundles (YAML and Python, where applicable). Some resources can be created by defining them in a bundle and deploying the bundle, and some resources can only be created by referencing an existing asset to include in the bundle.

Resource configuration defines a Databricks object that corresponds to a [Databricks REST API](https://docs.databricks.com/api/workspace/introduction) object. The REST API object's supported create request fields, expressed as YAML, are the resource's supported keys. Links to documentation for each resource's corresponding object are in the table below.

> [!TIP]
>
> The `databricks bundle validate` command returns warnings if unknown resource properties are found in bundle configuration files.

| Resource                                                                                                                          | [Python support](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md)                             | Corresponding REST API object                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| [alert](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alerts)                                                 | [Alerts](https://databricks.github.io/cli/python/databricks.bundles.alerts.html)                                   | [Alert object](https://docs.databricks.com/api/workspace/alertsv2/createalert)                               |
| [app](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#apps)                                                     | [Apps](https://databricks.github.io/cli/python/databricks.bundles.apps.html)                                       | [App object](https://docs.databricks.com/api/workspace/apps/create)                                          |
| [catalog](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#catalogs) (Unity Catalog)                             | [Catalogs](https://databricks.github.io/cli/python/databricks.bundles.catalogs.html)                               | [Catalog object](https://docs.databricks.com/api/workspace/catalogs/create)                                  |
| [cluster](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#clusters)                                             | [Clusters](https://databricks.github.io/cli/python/databricks.bundles.clusters.html)                               | [Cluster object](https://docs.databricks.com/api/workspace/clusters/create)                                  |
| [cluster\_policy](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster_policies)                             | [Cluster policies](https://databricks.github.io/cli/python/databricks.bundles.cluster_policies.html)               | [Cluster policy object](https://docs.databricks.com/api/workspace/clusterpolicies/create)                    |
| [dashboard](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#dashboards)                                         | [Dashboards](https://databricks.github.io/cli/python/databricks.bundles.dashboards.html)                           | [Dashboard object](https://docs.databricks.com/api/workspace/lakeview/create)                                |
| [data\_quality\_monitor](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitors) (Unity Catalog) | [Data quality monitors](https://databricks.github.io/cli/python/databricks.bundles.data_quality_monitors.html)     | [Data quality monitor object](https://docs.databricks.com/api/workspace/dataquality/createmonitor)           |
| [database\_catalog](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_catalogs)                          | [Database catalogs](https://databricks.github.io/cli/python/databricks.bundles.database_catalogs.html)             | [Database catalog object](https://docs.databricks.com/api/workspace/database/createdatabasecatalog)          |
| [database\_instance](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_instances)                        | [Database instances](https://databricks.github.io/cli/python/databricks.bundles.database_instances.html)           | [Database instance object](https://docs.databricks.com/api/workspace/database/createdatabaseinstance)        |
| [experiment](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#experiments)                                       | [Experiments](https://databricks.github.io/cli/python/databricks.bundles.experiments.html)                         | [Experiment object](https://docs.databricks.com/api/workspace/experiments/createexperiment)                  |
| [external\_location](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#external_locations) (Unity Catalog)        | [External locations](https://databricks.github.io/cli/python/databricks.bundles.external_locations.html)           | [External location object](https://docs.databricks.com/api/workspace/externallocations/create)               |
| [feature](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#features) (Unity Catalog)                             | [Features](https://databricks.github.io/cli/python/databricks.bundles.features.html)                               |                                                                                                              |
| [feature\_spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature_specs) (Unity Catalog)                  | [Feature specs](https://databricks.github.io/cli/python/databricks.bundles.feature_specs.html)                     |                                                                                                              |
| [genie\_spaces](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#genie_spaces)                                   | [Genie spaces](https://databricks.github.io/cli/python/databricks.bundles.genie_spaces.html)                       | [Genie agents](https://docs.databricks.com/api/workspace/genie/createspace)                                  |
| [instance\_pool](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pools)                                | [Instance pools](https://databricks.github.io/cli/python/databricks.bundles.instance_pools.html)                   | [Instance pool object](https://docs.databricks.com/api/workspace/instancepools/create)                       |
| [job](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#jobs)                                                     | [Jobs](https://databricks.github.io/cli/python/databricks.bundles.jobs.html)                                       | [Job object](https://docs.databricks.com/api/workspace/jobs/create)                                          |
| [job\_run](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job_runs)                                            | [Job runs](https://databricks.github.io/cli/python/databricks.bundles.job_runs.html)                               | [Job run object](https://docs.databricks.com/api/workspace/jobs/runnow)                                      |
| [materialization\_set](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_sets)                    | [Materialization sets](https://databricks.github.io/cli/python/databricks.bundles.materialization_sets.html)       |                                                                                                              |
| [mcp\_service](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#mcp_services)                                    | [MCP services](https://databricks.github.io/cli/python/databricks.bundles.mcp_services.html)                       | [MCP service object](https://docs.databricks.com/api/ai-gateway/v1/mcp-service)                              |
| [model (legacy)](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#models)                                        | [Models](https://databricks.github.io/cli/python/databricks.bundles.models.html)                                   | [Model (legacy) object](https://docs.databricks.com/api/workspace/modelregistry/createmodel)                 |
| [model\_provider\_service](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_provider_services)             | [Model provider services](https://databricks.github.io/cli/python/databricks.bundles.model_provider_services.html) | [Model provider service object](https://docs.databricks.com/api/ai-gateway/v1/model-provider-service)        |
| [model\_service](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_services)                                | [Model services](https://databricks.github.io/cli/python/databricks.bundles.model_services.html)                   | [Model service object](https://docs.databricks.com/api/ai-gateway/v1/model-service)                          |
| [model\_serving\_endpoint](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoints)             | [Model serving endpoints](https://databricks.github.io/cli/python/databricks.bundles.model_serving_endpoints.html) | [Model serving endpoint object](https://docs.databricks.com/api/workspace/servingendpoints/create)           |
| [pipeline](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipelines)                                           | [Pipelines](https://databricks.github.io/cli/python/databricks.bundles.pipelines.html)                             | [Pipeline object](https://docs.databricks.com/api/workspace/pipelines/create)                                |
| [postgres\_branch](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches)                           |                                                                                                                    | [Postgres branch object](https://docs.databricks.com/api/workspace/postgres/createbranch)                    |
| [postgres\_catalog](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_catalogs)                          |                                                                                                                    | [Postgres catalog object](https://docs.databricks.com/api/workspace/postgres/createcatalog)                  |
| [postgres\_data\_api](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_data_apis)                       |                                                                                                                    |                                                                                                              |
| [postgres\_database](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_databases)                        |                                                                                                                    | [Postgres database object](https://docs.databricks.com/api/workspace/postgres/createdatabase)                |
| [postgres\_endpoint](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_endpoints)                        |                                                                                                                    | [Postgres compute endpoint object](https://docs.databricks.com/api/workspace/postgres/createendpoint)        |
| [postgres\_project](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_projects)                          |                                                                                                                    | [Postgres project object](https://docs.databricks.com/api/workspace/postgres/createproject)                  |
| [postgres\_role](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_roles)                                |                                                                                                                    | [Postgres role object](https://docs.databricks.com/api/workspace/postgres/createrole)                        |
| [postgres\_snapshot\_schedule](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_snapshot_schedules)     |                                                                                                                    | [Postgres snapshot schedule object](https://docs.databricks.com/api/postgres/v1/update-snapshot-schedule)    |
| [postgres\_synced\_table](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_synced_tables)               |                                                                                                                    | [Postgres synced table object](https://docs.databricks.com/api/workspace/postgres/createsyncedtable)         |
| [quality\_monitor](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitors)                            | [Quality monitors](https://databricks.github.io/cli/python/databricks.bundles.quality_monitors.html)               | [Quality monitor object](https://docs.databricks.com/api/workspace/qualitymonitors/create)                   |
| [registered\_model](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#registered_models) (Unity Catalog)          | [Registered models](https://databricks.github.io/cli/python/databricks.bundles.registered_models.html)             | [Registered model object](https://docs.databricks.com/api/workspace/registeredmodels/create)                 |
| [schema](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#schemas) (Unity Catalog)                               | [Schemas](https://databricks.github.io/cli/python/databricks.bundles.schemas.html)                                 | [Schema object](https://docs.databricks.com/api/workspace/schemas/create)                                    |
| [secret](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#secrets) (Unity Catalog)                               | [Secrets](https://databricks.github.io/cli/python/databricks.bundles.secrets.html)                                 | [Secret object](https://docs.databricks.com/api/workspace/secretsuc/createsecret)                            |
| [secret\_scope](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#secret_scopes)                                  | [Secret scopes](https://databricks.github.io/cli/python/databricks.bundles.secret_scopes.html)                     | [Secret scope object](https://docs.databricks.com/api/workspace/secrets/createscope)                         |
| [sql\_warehouse](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#sql_warehouses)                                | [SQL warehouses](https://databricks.github.io/cli/python/databricks.bundles.sql_warehouses.html)                   | [SQL warehouse object](https://docs.databricks.com/api/workspace/warehouses/create)                          |
| [synced\_database\_table](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_tables)                      | [Synced database tables](https://databricks.github.io/cli/python/databricks.bundles.synced_database_tables.html)   | [Synced database table object](https://docs.databricks.com/api/workspace/database/createsynceddatabasetable) |
| [vector\_search\_endpoint](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#vector_search_endpoints)             | [Vector search endpoints](https://databricks.github.io/cli/python/databricks.bundles.vector_search_endpoints.html) | [AI Search endpoint object](https://docs.databricks.com/api/workspace/vectorsearchendpoints/createendpoint)  |
| [vector\_search\_index](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#vector_search_indexes)                  | [Vector search indexes](https://databricks.github.io/cli/python/databricks.bundles.vector_search_indexes.html)     | [Vector search index object](https://docs.databricks.com/api/workspace/vectorsearchindexes/createindex)      |
| [volume](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#volumes) (Unity Catalog)                               | [Volumes](https://databricks.github.io/cli/python/databricks.bundles.volumes.html)                                 | [Volume object](https://docs.databricks.com/api/workspace/volumes/create)                                    |

## <a id="alerts" />alert

**`Type: Map`**

The alert resource defines a [SQL alert (v2)](https://docs.databricks.com/api/workspace/alertsv2/createalert).

Alerts are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.alerts](https://databricks.github.io/cli/python/databricks.bundles.alerts.html).

*Added in Databricks CLI version 0.279.0*

```yaml
alerts:
  <alert-name>:
    <alert-field-name>: <alert-field-value>
```

| Key                      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `custom_description`     | String   | Optional. Custom description for the alert, used as the notification body. Interpreted according to `custom_template_format`. For the available template variables, see [Notification templates](https://docs.databricks.com/aws/en/sql/user/alerts/create.md#notification-templates).<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                        |
| `custom_summary`         | String   | Optional. Custom summary for the alert, used as the notification subject. Interpreted according to `custom_template_format`.<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `custom_template_format` | String   | (Public Preview) The format used to interpret the `custom_summary` and `custom_description` templates. Valid values are:<br /><ul><li>`HTML`: Treats both templates as HTML with Mustache `{{VARIABLE_NAME}}` placeholders.</li><li>`MARKDOWN`: Treats both templates as Markdown with allowlisted `@VARIABLE_NAME` placeholders and converts them to the format each notification destination expects, so a single template renders correctly in email, Slack, and Microsoft Teams.</li></ul><br />If unset, both templates are rendered as HTML.<br />*Added in Databricks CLI version 1.21.0*                                             |
| `display_name`           | String   | Required. The display name of the alert, for example, `Example alert`.<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `evaluation`             | Map      | Required. The condition evaluated against the query result, and who is notified when it is met. See [alert.evaluation](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation).<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                   |
| `file_path`              | String   | The local file path of the alert asset.<br />*Added in Databricks CLI version 0.282.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `lifecycle`              | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                      |
| `parameters`             | Sequence | (Beta) A list of parameters to pass into the alert SQL query statement containing parameter markers. Static values only. See [alert.parameters](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-parameters).<br />*Added in Databricks CLI version 1.10.0*                                                                                                                                                                                                                                                                                                                                                           |
| `parent_path`            | String   | Optional. The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated. Example: `/Users/someone@example.com`.<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `permissions`            | Sequence | The alert permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `query_text`             | String   | Required. Text of the query to be run, for example, `SELECT 1`.<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `run_as`                 | Map      | Optional. Specifies the identity that will be used to run the alert. This field allows you to configure alerts to run as a specific user or service principal. See [run\_as](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#run_as).<br /><ul><li>For user identity: Set `user_name` to the email of an active workspace user. Users can only set this to their own email.</li><li>For service principal: Set `service_principal_name` to the application ID. Requires the servicePrincipal/user role. If not specified, the alert will run as the request user.</li></ul><br />*Added in Databricks CLI version 0.279.0* |
| `schedule`               | Map      | Required. The schedule on which the alert runs its query and evaluates the condition. See [alert.schedule](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-schedule).<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                 |
| `warehouse_id`           | String   | Required. ID of the SQL warehouse attached to the alert, for example, `a7066a8ef796be84`.<br />*Added in Databricks CLI version 0.279.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

### <a id="alert-evaluation" />alert.evaluation

**`Type: Map`**

The condition evaluated against the query result, and who is notified when it is met.

| Key                   | Type   | Description                                                                                                                                                                                                                                                                                      |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `comparison_operator` | String | The operator used for comparison in the alert evaluation. The alert is triggered when the comparison of the source value with the threshold is true. `IS_NULL` and `IS_NOT_NULL` take no threshold.                                                                                              |
| `empty_result_state`  | String | The alert state if the result is empty. If not set, an empty result sets the state to `ERROR`. Avoid setting this field to `UNKNOWN` because `UNKNOWN` state is planned to be deprecated.                                                                                                        |
| `notification`        | Map    | The user or other destination to notify when the alert is triggered. See [alert.evaluation.notification](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation-notification).                                                                                       |
| `source`              | Map    | The source column from the result to use to evaluate the alert. See [alert.evaluation.source](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation-source).                                                                                                        |
| `threshold`           | Map    | The threshold to compare the source column against, either another column or a fixed value. Not needed when `comparison_operator` is `IS_NULL` or `IS_NOT_NULL`. See [alert.evaluation.threshold](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation-threshold). |

#### <a id="alert-evaluation-notification" />alert.evaluation.notification

**`Type: Map`**

The user or other destination to notify when the alert is triggered.

| Key                 | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `notify_on_ok`      | Boolean  | Optional. Whether to notify alert subscribers when alert returns back to normal.                                                                                                                                                                                                                                                                                                                             |
| `retrigger_seconds` | Integer  | Optional. Number of seconds an alert waits after being triggered before it is allowed to send another notification. If set to `0` or omitted, the alert will not send any further notifications after the first trigger. Setting this value to `1` allows the alert to send a notification on every evaluation where the condition is met, effectively making it always retrigger for notification purposes. |
| `subscriptions`     | Sequence | Optional. Unordered list of notification subscriptions. See [alert.evaluation.notification.subscriptions](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation-notification-subscriptions).                                                                                                                                                                                    |

##### <a id="alert-evaluation-notification-subscriptions" />alert.evaluation.notification.subscriptions

**`Type: Sequence`**

An unordered list of notification subscriptions.

Each item in the list is an `AlertSubscription`:

| Key              | Type   | Description                              |
| ---------------- | ------ | ---------------------------------------- |
| `destination_id` | String | The ID of the notification destination.  |
| `user_email`     | String | The email address of the user to notify. |

#### <a id="alert-evaluation-source" />alert.evaluation.source

**`Type: Map`**

Source column from result to use to evaluate the alert.

| Key           | Type   | Description                                                                                                                                      |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `aggregation` | String | The aggregation method to apply to the source column. Valid values are `SUM`, `COUNT`, `COUNT_DISTINCT`, `AVG`, `MEDIAN`, `MIN`, `MAX`, `STDDEV` |
| `display`     | String | The display name for the source column.                                                                                                          |
| `name`        | String | The name of the source column from the query result.                                                                                             |

#### <a id="alert-evaluation-threshold" />alert.evaluation.threshold

**`Type: Map`**

Threshold to use for alert evaluation, can be a column or a value.

| Key      | Type | Description                                                                                                                                                                        |
| -------- | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `column` | Map  | Column reference to use as the threshold. See [alert.evaluation.source](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation-source).                |
| `value`  | Map  | Literal value to use as the threshold. See [alert.evaluation.threshold.value](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#alert-evaluation-threshold-value). |

##### <a id="alert-evaluation-threshold-value" />alert.evaluation.threshold.value

**`Type: Map`**

Literal value to use as the threshold. Specify one of the following value types.

| Key            | Type    | Description                                                     |
| -------------- | ------- | --------------------------------------------------------------- |
| `bool_value`   | Boolean | Optional. Boolean value for the threshold, for example, `true`. |
| `double_value` | Double  | Optional. Numeric value for the threshold, for example, `1.25`. |
| `string_value` | String  | Optional. String value for the threshold, for example, `test`.  |

### <a id="alert-parameters" />alert.parameters

**`Type: Sequence`**

(Beta) A list of parameters to pass into the alert SQL query statement containing parameter markers. Reference a parameter in the query text as `:name`. If a `type` is given, the value is checked for type correctness: a value is correct if it can be converted to the type using the [`cast` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/cast.md).

| Key     | Type   | Description                                                                                                                                                                                                          |
| ------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`  | String | Required. The name of the parameter. Reference it in the query text as `:name`. The name must be non-empty and unique across the alert's parameters.                                                                 |
| `type`  | String | The SQL data type of the parameter, for example `STRING`, `INT`, or `DECIMAL(10, 2)`. If no type is given, the type is assumed to be `STRING`. Complex types such as `ARRAY`, `MAP`, and `STRUCT` are not supported. |
| `value` | String | The value bound to the parameter, represented as a string. If omitted, the value is interpreted as `NULL`.                                                                                                           |

### <a id="alert-schedule" />alert.schedule

**`Type: Map`**

The schedule on which the alert runs its query and evaluates the condition.

| Key                    | Type   | Description                                                                                                                                                                                                                                                                                             |
| ---------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pause_status`         | String | Optional. Whether this schedule is paused. While paused, the alert is not evaluated. Valid values: `UNPAUSED`, `PAUSED`. Default: `UNPAUSED`.                                                                                                                                                           |
| `quartz_cron_schedule` | String | Required. A cron expression using quartz syntax that specifies the schedule for this alert. The quartz format is described in [quartz scheduler format](http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html).                                                  |
| `timezone_id`          | String | Required. A Java timezone id. The schedule will be resolved using this timezone. This will be combined with the `quartz_cron_schedule` to determine the schedule. See [SET TIME ZONE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.md) for details. |

#### Examples

The following example configuration defines an alert with a simple evaluation:

```yaml
resources:
  alerts:
    my_alert:
      display_name: my_alert
      evaluation:
        comparison_operator: EQUAL
        source:
          name: '1'
        threshold:
          value:
            double_value: 2
      query_text: select 2
      schedule:
        quartz_cron_schedule: '44 19 */1 * * ?'
        timezone_id: Europe/Amsterdam
      warehouse_id: 799f096837fzzzz4
```

The following example configuration defines an alert with permissions that evaluates using aggregation and sends notifications:

```yaml
resources:
  alerts:
    my_alert:
      permissions:
        - level: CAN_MANAGE
          user_name: someone@example.com
      custom_summary: 'My alert'
      display_name: 'My alert'
      evaluation:
        comparison_operator: 'EQUAL'
        notification:
          notify_on_ok: false
          retrigger_seconds: 1
        source:
          aggregation: 'MAX'
          display: '1'
          name: '1'
        threshold:
          value:
            double_value: 2
      query_text: 'select 2'
      schedule:
        pause_status: 'UNPAUSED'
        quartz_cron_schedule: '44 19 */1 * * ?'
        timezone_id: 'Europe/Amsterdam'
      warehouse_id: 799f096837fzzzz4
```

## <a id="apps" />app

**`Type: Map`**

The app resource defines a [Databricks app](https://docs.databricks.com/api/workspace/apps/create). For information about Databricks Apps, see [Databricks Apps](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/index.md).

Apps are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.apps](https://databricks.github.io/cli/python/databricks.bundles.apps.html).

To add an app, specify the settings to define the app, including the required `source_code_path`.

> [!TIP]
>
> You can initialize a bundle with a Streamlit Databricks app using the following command:
>
> ```bash
> databricks bundle init https://github.com/databricks/bundle-examples --template-dir contrib/templates/streamlit-app
> ```

*Added in Databricks CLI version 0.239.0*

```yaml
apps:
  <app-name>:
    <app-field-name>: <app-field-value>
```

| Key                             | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `budget_policy_id`              | String   | (Public Preview) The ID of the serverless budget policy that the app's compute usage is attributed to. Budget policies and usage policies are alternatives: set at most one of `budget_policy_id` and `usage_policy_id`.<br />*Added in Databricks CLI version 0.243.0*                                                                                                                                                                                                                                         |
| `compute_max_instances`         | Integer  | Maximum number of app instances the app is configured to run. Must be set together with `compute_min_instances`.<br />*Added in Databricks CLI version 1.2.0*                                                                                                                                                                                                                                                                                                                                                   |
| `compute_min_instances`         | Integer  | Minimum number of app instances the app is configured to run. Must be set together with `compute_max_instances`.<br />*Added in Databricks CLI version 1.2.0*                                                                                                                                                                                                                                                                                                                                                   |
| `compute_size`                  | String   | The size of the compute instances the app runs on. Valid values are `MEDIUM`, `LARGE`, or `XLARGE` but depend on workspace configuration. Defaults to `MEDIUM`. Larger sizes provide more CPU and memory at a higher hourly cost. See [Configure compute resources for a Databricks app](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/compute-size.md).<br />*Added in Databricks CLI version 0.273.0*                                                                                          |
| `config`                        | Map      | App configuration commands and environment variables. See [app.config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-config).<br />*Added in Databricks CLI version 0.283.0*                                                                                                                                                                                                                                                                                                            |
| `description`                   | String   | The description of the app.<br />*Added in Databricks CLI version 0.239.0*                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `git_repository`                | Map      | The Git repository configuration for app deployments. When specified, deployments can reference code from this repository by providing only the git reference (branch, tag, or commit). See [app.git\_repository](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-git_repository).<br />*Added in Databricks CLI version 0.283.0*                                                                                                                                                         |
| `git_source`                    | Map      | The Git source configuration for app deployments. Specifies which Git reference (branch, tag, or commit) to use when deploying the app. Used in conjunction with `git_repository` to deploy code directly from git. The `source_code_path` within `git_source` specifies the relative path to the app code within the repository. See [app.git\_source](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-git_source).<br />*Added in Databricks CLI version 0.290.0*                       |
| `lifecycle`                     | Map      | The behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                                                                                                                     |
| `name`                          | String   | The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It must be unique within the workspace.<br />*Added in Databricks CLI version 0.239.0*                                                                                                                                                                                                                                                                                                                           |
| `permissions`                   | Sequence | The app's permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.239.0*                                                                                                                                                                                                                                                                                                                                         |
| `resources`                     | Sequence | The Databricks resources the app depends on. Each entry grants the app's service principal the listed permission on one resource and makes that resource available to the app under the entry's name. See [app.resources](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources).<br />*Added in Databricks CLI version 0.239.0*                                                                                                                                                      |
| `source_code_path`              | String   | The `./app` local path of the Databricks app source code. On create, the app is deployed from this path. Alternative to `git_source`.<br />*Added in Databricks CLI version 0.239.0*                                                                                                                                                                                                                                                                                                                            |
| `space`                         | String   | (Beta) The name of the space this app belongs to.<br />*Added in Databricks CLI version 0.290.0*                                                                                                                                                                                                                                                                                                                                                                                                                |
| `telemetry_export_destinations` | Sequence | The destinations that receive the app's OpenTelemetry logs, metrics, and traces. Changes take effect when the app is next deployed. See [app.telemetry\_export\_destinations](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-telemetry_export_destinations).<br />*Added in Databricks CLI version 0.294.0*                                                                                                                                                                              |
| `usage_policy_id`               | String   | (Public Preview) The ID of the usage policy that the app's compute usage is attributed to. Alternative to `budget_policy_id`.<br />*Added in Databricks CLI version 0.283.0*                                                                                                                                                                                                                                                                                                                                    |
| `user_api_scopes`               | Sequence | (Public Preview) The API scopes the app requests for user authorization. The user access token that Databricks forwards to the app is limited to these scopes plus the default identity scopes, so the app can act on the user's behalf only within them. Workspace admins can restrict which scopes apps in the workspace can request. See [Configure authorization in a Databricks app](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/auth.md).<br />*Added in Databricks CLI version 0.246.0* |

### <a id="app-config" />app.config

App configuration commands and environment variables. See [Configure Databricks app execution with `app.yaml`](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/app-runtime.md).

| Key       | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `command` | Sequence | The commands to run the app, for example `["streamlit", "run", "app.py"]`                                                                                                                                                                                                                                                                                                                                                              |
| `env`     | Sequence | A list of `name` and `value` pairs that specify app environment variables to set in the app runtime environment. This will override the environment variables specified in the app.yaml file. For information about default app environment variables, see [Databricks Apps environment](https://docs.databricks.com/aws/en/dev-tools/databricks-apps/system-env.md).<br />Environment variables are not set until the app is started. |

### <a id="app-git_repository" />app.git\_repository

**`Type: Map`**

The Git repository configuration specifying the location of the repository.

| Key                    | Type    | Description                                                                                                                                                                                                                                                |
| ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `auto_deploy`          | Boolean | When true, automatically deploys the app on push events to the branch configured in the app's `git_source`.<br />*Added in Databricks CLI version 1.14.0*                                                                                                  |
| `caller_credential_id` | Integer | ID of a personal access token Git credential owned by the caller, used to grant the app's service principal access to this repository.<br />*Added in Databricks CLI version 1.14.0*                                                                       |
| `provider`             | String  | Required. Git provider. Case insensitive. Supported values: `gitHub`, `gitHubEnterprise`, `bitbucketCloud`, `bitbucketServer`, `azureDevOpsServices`, `gitLab`, `gitLabEnterpriseEdition`, `awsCodeCommit`.<br />*Added in Databricks CLI version 0.283.0* |
| `url`                  | String  | Required. URL of the Git repository.<br />*Added in Databricks CLI version 0.283.0*                                                                                                                                                                        |

### <a id="app-git_source" />app.git\_source

**`Type: Map`**

The Git source configuration for app deployments.

| Key                | Type   | Description                                                                                                           |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------- |
| `branch`           | String | The Git branch to be checked out.                                                                                     |
| `commit`           | String | The Git commit SHA to be checked out.                                                                                 |
| `source_code_path` | String | Relative path to the app source code within the Git repository. If not specified, the root of the repository is used. |
| `tag`              | String | The Git tag to be checked out.                                                                                        |

### <a id="app-resources" />app.resources

**`Type: Sequence`**

A list of compute resources for the app.

Each item in the list is an `AppResource`:

| Key                | Type   | Description                                                                                                                                                                                                                                             |
| ------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `app`              | Map    | Another app in the workspace that this app is granted access to.                                                                                                                                                                                        |
| `description`      | String | The description of the app resource.                                                                                                                                                                                                                    |
| `database`         | Map    | The Lakebase Provisioned database the app is granted access to. See [app.resources.database](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-database).                                                                 |
| `experiment`       | Map    | The MLflow experiment the app is granted access to. See [app.resources.experiment](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-experiment).                                                                         |
| `genie_space`      | Map    | The Genie Agent the app is granted access to. See [app.resources.genie\_space](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-genie_space).                                                                            |
| `job`              | Map    | The job the app is granted access to. See [app.resources.job](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-job).                                                                                                     |
| `name`             | String | The key that identifies the resource within the app. The app configuration (`app.yaml`) references the resource by this key.                                                                                                                            |
| `postgres`         | Map    | The Lakebase Autoscaling Postgres database the app is granted access to. See [app.resources.postgres](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-postgres).                                                        |
| `secret`           | Map    | The Databricks secret the app is granted access to. See [app.resources.secret](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-secret).                                                                                 |
| `serving_endpoint` | Map    | The model serving endpoint the app is granted access to. See [app.resources.serving\_endpoint](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-serving_endpoint).                                                       |
| `sql_warehouse`    | Map    | The SQL warehouse the app is granted access to. See [app.resources.sql\_warehouse](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-sql_warehouse).                                                                      |
| `uc_securable`     | Map    | The Unity Catalog securable (volume, table, function, connection, or model service) the app is granted a privilege on. See [app.resources.uc\_securable](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#app-resources-uc_securable). |

#### <a id="app-resources-database" />app.resources.database

**`Type: Map`**

The settings that identify the Lakebase database to use.

| Key             | Type   | Description                                                                       |
| --------------- | ------ | --------------------------------------------------------------------------------- |
| `database_name` | String | The name of the database.                                                         |
| `instance_name` | String | The name of the database instance.                                                |
| `permission`    | String | The permission level for the database. Valid values are `CAN_CONNECT_AND_CREATE`. |

#### <a id="app-resources-experiment" />app.resources.experiment

**`Type: Map`**

The settings that identify the MLflow experiment to use.

| Key             | Type   | Description                                                                                         |
| --------------- | ------ | --------------------------------------------------------------------------------------------------- |
| `experiment_id` | String | The ID of the MLflow experiment.                                                                    |
| `permission`    | String | The permission level for the experiment. Valid values include `CAN_READ`, `CAN_EDIT`, `CAN_MANAGE`. |

#### <a id="app-resources-genie_space" />app.resources.genie\_space

**`Type: Map`**

The settings that identify the Genie Agent to use.

| Key          | Type   | Description                                                                                               |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------- |
| `name`       | String | The name of the Genie Agent.                                                                              |
| `permission` | String | The permission level for the space. Valid values include `CAN_VIEW`, `CAN_EDIT`, `CAN_MANAGE`, `CAN_RUN`. |
| `space_id`   | String | The ID of the Genie Agent, for example `550e8400-e29b-41d4-a716-999955440000`.                            |

#### <a id="app-resources-job" />app.resources.job

**`Type: Map`**

The settings that identify the job resource to use.

| Key          | Type   | Description                                                                                                    |
| ------------ | ------ | -------------------------------------------------------------------------------------------------------------- |
| `id`         | String | The ID of the job.                                                                                             |
| `permission` | String | The permission level for the job. Valid values include `CAN_VIEW`, `CAN_MANAGE_RUN`, `CAN_MANAGE`, `IS_OWNER`. |

#### <a id="app-resources-postgres" />app.resources.postgres

**`Type: Map`**

The settings that identify the Lakebase Autoscaling database to use.

| Key          | Type   | Description                                                                                                     |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------------- |
| `branch`     | String | The name of the branch, for example, `projects/proj-abc123/branches/branch-xyz789`.                             |
| `database`   | String | The name of the database instance, for example, `projects/proj-abc123/branches/branch-xyz789/databases/db-456`. |
| `permission` | String | The permission level for the database. Valid values are `CAN_CONNECT_AND_CREATE`.                               |

#### <a id="app-resources-secret" />app.resources.secret

**`Type: Map`**

The settings that identify the Databricks secret resource to use.

| Key          | Type   | Description                                                                          |
| ------------ | ------ | ------------------------------------------------------------------------------------ |
| `key`        | String | The key of the secret to grant permission.                                           |
| `permission` | String | The permission level for the secret. Valid values include `READ`, `WRITE`, `MANAGE`. |
| `scope`      | String | The name of the secret scope.                                                        |

#### <a id="app-resources-serving_endpoint" />app.resources.serving\_endpoint

**`Type: Map`**

The settings that identify the model serving endpoint resource to use.

| Key          | Type   | Description                                                                                                |
| ------------ | ------ | ---------------------------------------------------------------------------------------------------------- |
| `name`       | String | The name of the serving endpoint.                                                                          |
| `permission` | String | The permission level for the serving endpoint. Valid values include `CAN_QUERY`, `CAN_MANAGE`, `CAN_VIEW`. |

#### <a id="app-resources-sql_warehouse" />app.resources.sql\_warehouse

**`Type: Map`**

The settings that identify the SQL warehouse to use.

| Key          | Type   | Description                                                                                           |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------- |
| `id`         | String | The ID of the SQL warehouse.                                                                          |
| `permission` | String | The permission level for the SQL warehouse. Valid values include `CAN_USE`, `CAN_MANAGE`, `IS_OWNER`. |

#### <a id="app-resources-uc_securable" />app.resources.uc\_securable

**`Type: Map`**

The settings that identify the Unity Catalog securable to use. Apps support volumes, tables, functions, connections, and model services as securable resources.

| Key                   | Type   | Description                                                                                                                                                                                                                                                                                                   |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `permission`          | String | The permission level for the Unity Catalog securable. Valid values depend on the `securable_type`:<br /><ul><li>`VOLUME`: `READ_VOLUME`, `WRITE_VOLUME`</li><li>`TABLE`: `SELECT`, `MODIFY`</li><li>`FUNCTION`: `EXECUTE`</li><li>`CONNECTION`: `USE_CONNECTION`</li><li>`MODEL_SERVICE`: `EXECUTE`</li></ul> |
| `securable_full_name` | String | The full name of the Unity Catalog securable, in the format `catalog.schema.name`. For a connection, use the connection name.                                                                                                                                                                                 |
| `securable_type`      | String | The type of the Unity Catalog securable. Valid values are `VOLUME`, `TABLE`, `FUNCTION`, `CONNECTION`, and `MODEL_SERVICE`.                                                                                                                                                                                   |

> [!NOTE]
>
> For volumes, tables, and functions, the app's service principal also needs `USE CATALOG` and `USE SCHEMA` privileges on the parent catalog and schema. Databricks grants these privileges automatically when you add the securable as an app resource.

### <a id="app-telemetry_export_destinations" />app.telemetry\_export\_destinations

**`Type: Sequence`**

A list of telemetry export destinations for the app.

*Added in Databricks CLI version 0.294.0*

Each item in the list is an `AppTelemetryExportDestination`:

| Key             | Type | Description                                                                                         |
| --------------- | ---- | --------------------------------------------------------------------------------------------------- |
| `unity_catalog` | Map  | The Unity Catalog tables that receive the telemetry.<br />*Added in Databricks CLI version 0.294.0* |

#### Examples

For a tutorial that walks through creating a bundle that defines an app, see [Manage Databricks apps using Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/apps-tutorial.md).

The following example defines a basic app:

```yaml
resources:
  apps:
    hello_world_app:
      name: 'hello-world-app'
      source_code_path: . # This assumes the app source code is at the root of the project.
      description: 'A Databricks app'
```

The following example creates an app named `my_app` that manages a job created by the bundle. For the complete example, see the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/databricks_app).

```yaml
resources:
  jobs:
    # Define a job in the bundle
    hello_world:
      name: hello_world
      tasks:
        - task_key: task
          spark_python_task:
            python_file: ../src/main.py
          environment_key: default

      environments:
        - environment_key: default
          spec:
            environment_version: '2'

  # Define an app that manages the job in the bundle
  apps:
    job_manager:
      name: 'job_manager_app'
      description: 'An app which manages a job created by this bundle'

      # The location of the source code for the app
      source_code_path: ../src/app

      # The resources in the bundle which this app has access to. This binds the resource in the app with the bundle resource.
      resources:
        - name: 'app-job'
          job:
            id: ${resources.jobs.hello_world.id}
            permission: 'CAN_MANAGE_RUN'
```

The corresponding `app.yaml` defines the configuration for running the app:

```yaml
command:
  - flask
  - --app
  - app
  - run
  - --debug
env:
  - name: JOB_ID
    valueFrom: 'app-job'
```

The following example creates an app that has access to an MLflow experiment created by the bundle:

```yaml
resources:
  experiments:
    # Define an MLflow experiment in the bundle
    my_experiment:
      name: /Users/${workspace.current_user.userName}/my-app-experiment

  apps:
    my_ml_app:
      name: 'my-ml-app'
      description: 'An app with access to an MLflow experiment'
      source_code_path: ./app

      # Grant the app access to the MLflow experiment
      resources:
        - name: 'app-experiment'
          experiment:
            experiment_id: ${resources.experiments.my_experiment.id}
            permission: 'CAN_MANAGE'
```

Alternatively, the following example defines an app with custom configuration defined in the bundle configuration:

```yaml
resources:
  apps:
    my_app:
      name: my_app
      description: my_app_description
      source_code_path: ./app
      config:
        command: ['flask', '--app', 'app', 'run']
        env:
          - name: MY_ENV_VAR
            value: test_value
          - name: ANOTHER_VAR
            value: another_value
```

The following example defines an app with a Lakebase Autoscaling resource:

```yaml
resources:
  apps:
    my_app:
      name: my-app
      source_code_path: .
      resources:
        - name: lakebase-db
          postgres:
            branch: projects/my-app/branches/production
            database: projects/my-app/branches/production/databases/db-xxxx-yyyyyyyy
            permission: CAN_CONNECT_AND_CREATE
```

## <a id="catalogs" />catalogs

**`Type: Map`**

The catalog resource allows you to define catalogs (Unity Catalog) in a bundle.

Catalogs are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.catalogs](https://databricks.github.io/cli/python/databricks.bundles.catalogs.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define catalogs is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 0.287.0*

```yaml
catalogs:
  <catalog-name>:
    <catalog-field-name>: <catalog-field-value>
```

| Key                           | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                        |
| ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `comment`                     | String   | A user-provided free-form text description of the catalog.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                                                          |
| `connection_name`             | String   | The name of a connection to an external data source. Naming a connection creates a foreign catalog that mirrors a database in that source, which requires ownership of or the `CREATE FOREIGN CATALOG` privilege on the connection. Connection-specific settings, such as the database to mirror, go in `options`. The connection cannot be changed after creation.<br />*Added in Databricks CLI version 0.287.0* |
| `custom_max_retention_hours`  | Integer  | (Public Preview) The number of hours that dropped objects in the catalog remain recoverable before they are permanently purged. The value applies to standard catalogs only, must be `0` or within the range allowed for the metastore, and is inherited by schemas and tables that do not set their own value.<br />*Added in Databricks CLI version 1.5.0*                                                       |
| `grants`                      | Sequence | The grants associated with the catalog. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                      |
| `isolation_mode`              | String   | Whether the catalog is accessible from all workspaces (`OPEN`) or only from the workspaces it is bound to (`ISOLATED`). Workspace bindings are not managed by the bundle. When omitted, the catalog keeps its current isolation mode.<br />*Added in Databricks CLI version 1.27.0*                                                                                                                                |
| `lifecycle`                   | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                            |
| `managed_encryption_settings` | Map      | The customer-managed key (CMK) settings that control the encryption at rest of the catalog's managed data. See [catalog.managed\_encryption\_settings](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#catalog-managed_encryption_settings).<br />*Added in Databricks CLI version 0.298.0*                                                                                                      |
| `name`                        | String   | Required. The name of the catalog. The name is stored in lowercase, can be at most 255 characters long, and cannot contain periods, spaces, forward slashes, or control characters.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                 |
| `options`                     | Object   | A map of key-value properties attached to the securable.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                                                            |
| `properties`                  | Object   | A map of key-value properties attached to the securable.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                                                            |
| `provider_name`               | String   | The name of the OpenSharing provider that owns the share. Set it together with `share_name` to create an OpenSharing catalog that exposes the data of the share on a remote sharing server. The provider cannot be changed after creation. See [What is OpenSharing?](https://docs.databricks.com/aws/en/opensharing/index.md).<br />*Added in Databricks CLI version 0.287.0*                                     |
| `share_name`                  | String   | The name of the share under the share provider. Set it together with `provider_name` to create an OpenSharing catalog. The share cannot be changed after creation.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                  |
| `storage_root`                | String   | The storage root URL under which managed tables and volumes in the catalog are stored. The path must be inside an external location on which the caller has the `CREATE MANAGED STORAGE` privilege. If omitted, managed data is stored under the metastore's root storage location, which must then be configured. OpenSharing catalogs cannot have a storage root.<br />*Added in Databricks CLI version 0.287.0* |

#### Example

```yaml
# databricks.yml
bundle:
  name: catalogs-example
  engine: direct # catalogs require the direct deployment engine

resources:
  catalogs:
    my_catalog:
      name: my_catalog
      comment: 'Catalog created by Declarative Automation Bundles'
      properties:
        purpose: 'Testing'
      grants:
        - principal: someone@example.com
          privileges:
            - USE_CATALOG
            - CREATE_SCHEMA

  schemas:
    my_schema:
      name: my_schema
      catalog_name: ${resources.catalogs.my_catalog.name}
      comment: 'Schema in custom catalog'
```

### <a id="catalog-managed_encryption_settings" />catalog.managed\_encryption\_settings

**`Type: Map`**

Encryption settings for managed catalog data. Used to configure a customer-managed key (CMK).

*Added in Databricks CLI version 0.298.0*

| Key                         | Type   | Description                                                                                                     |
| --------------------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| `azure_encryption_settings` | Map    | Optional Azure settings — only required if an Azure CMK is used.<br />*Added in Databricks CLI version 0.298.0* |
| `azure_key_vault_key_id`    | String | The AKV URL in Azure, null otherwise.<br />*Added in Databricks CLI version 0.298.0*                            |
| `customer_managed_key_id`   | String | The CMK UUID in AWS and GCP, null otherwise.<br />*Added in Databricks CLI version 0.298.0*                     |

## <a id="clusters" />cluster

**`Type: Map`**

The cluster resource defines a [cluster](https://docs.databricks.com/api/workspace/clusters/create).

Clusters are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.clusters](https://databricks.github.io/cli/python/databricks.bundles.clusters.html).

```yaml
clusters:
  <cluster-name>:
    <cluster-field-name>: <cluster-field-value>
```

| Key                              | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apply_policy_default_values`    | Boolean  | When set to true, fixed and default values from the policy will be used for fields that are omitted. When set to false, only fixed values from the policy will be applied.                                                                                                                                                                                                                                           |
| `autoscale`                      | Map      | Parameters needed in order to automatically scale clusters up and down based on load. See [autoscale](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-autoscale).                                                                                                                                                                                                                          |
| `autotermination_minutes`        | Integer  | Automatically terminates the cluster after it is inactive for this time in minutes. If not set, this cluster will not be automatically terminated. If specified, the threshold must be between 10 and 43200 minutes (30 days). Users can also set this value to 0 to explicitly disable automatic termination.                                                                                                       |
| `aws_attributes`                 | Map      | Attributes related to clusters running on Amazon Web Services. If not specified at cluster creation, a set of default values will be used. See [aws\_attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-aws_attributes).                                                                                                                                                          |
| `azure_attributes`               | Map      | Attributes related to clusters running on Microsoft Azure. If not specified at cluster creation, a set of default values will be used. See [azure\_attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-azure_attributes).                                                                                                                                                          |
| `cluster_log_conf`               | Map      | The configuration for delivering spark logs to a long-term storage destination. See [cluster\_log\_conf](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-cluster_log_conf).                                                                                                                                                                                                                |
| `cluster_name`                   | String   | Cluster name requested by the user. This doesn't have to be unique. If not specified at creation, the cluster name will be an empty string.                                                                                                                                                                                                                                                                          |
| `custom_tags`                    | Map      | Additional tags for cluster resources. Databricks will tag all cluster resources (e.g., AWS instances and EBS volumes) with these tags in addition to `default_tags`.                                                                                                                                                                                                                                                |
| `data_security_mode`             | String   | The data governance model to use when accessing data from a cluster. Valid values include `DATA_SECURITY_MODE_AUTO`, `DATA_SECURITY_MODE_STANDARD`, `DATA_SECURITY_MODE_DEDICATED`, and `NONE`. `USER_ISOLATION` and `SINGLE_USER` are legacy aliases for `DATA_SECURITY_MODE_STANDARD` and `DATA_SECURITY_MODE_DEDICATED`, respectively. The `LEGACY_*` modes are deprecated starting with Databricks Runtime 15.0. |
| `dependency_mode`                | String   | (Beta) Controls the dependency configuration for the cluster. Valid values are `DEPENDENCY_MODE_ENVIRONMENTS`, `DEPENDENCY_MODE_CLUSTER_LIBRARIES`, and `DEPENDENCY_MODE_AUTO`.<br />*Added in Databricks CLI version 1.10.0*                                                                                                                                                                                        |
| `docker_image`                   | Map      | The custom Docker image for the cluster's nodes, used with [Databricks Container Services](https://docs.databricks.com/aws/en/compute/custom-containers.md). See [docker\_image](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-docker_image).                                                                                                                                            |
| `driver_instance_pool_id`        | String   | The optional ID of the instance pool for the driver of the cluster belongs. The pool cluster uses the instance pool with id (instance\*pool\_id) if the driver pool is not assigned.                                                                                                                                                                                                                                 |
| `driver_node_type_flexibility`   | Map      | Flexible node type configuration for the driver node. See [cluster.driver\_node\_type\_flexibility](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-driver_node_type_flexibility).<br />*Added in Databricks CLI version 0.285.0*                                                                                                                                                          |
| `driver_node_type_id`            | String   | The node type of the Spark driver. This field is optional. If unset, the driver node type is set to the value of `node_type_id`.                                                                                                                                                                                                                                                                                     |
| `enable_elastic_disk`            | Boolean  | Autoscaling Local Storage: when enabled, this cluster will dynamically acquire additional disk space when its Spark workers are running low on disk space. This feature requires specific AWS permissions to function correctly - refer to the User Guide for more details.                                                                                                                                          |
| `enable_local_disk_encryption`   | Boolean  | Whether to enable LUKS on cluster VMs' local disks.                                                                                                                                                                                                                                                                                                                                                                  |
| `gcp_attributes`                 | Map      | Attributes related to clusters running on Google Cloud Platform. If not specified at cluster creation, a set of default values will be used. See [gcp\_attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-gcp_attributes).                                                                                                                                                        |
| `init_scripts`                   | Sequence | The configuration for storing init scripts. Any number of destinations can be specified. The scripts are executed sequentially in the order provided. See [init\_scripts](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts).                                                                                                                                                   |
| `instance_pool_id`               | String   | The optional ID of the instance pool to which the cluster belongs.                                                                                                                                                                                                                                                                                                                                                   |
| `is_single_node`                 | Boolean  | This field can only be used when `kind = CLASSIC_PREVIEW`. When set to true, Databricks will automatically set single node related `custom_tags`, `spark_conf`, and `num_workers`.<br />*Added in Databricks CLI version 0.237.0*                                                                                                                                                                                    |
| `kind`                           | String   | The kind of compute described by this compute specification.<br />*Added in Databricks CLI version 0.237.0*                                                                                                                                                                                                                                                                                                          |
| `libraries`                      | Sequence | A list of libraries to install on the cluster. Installed via the Libraries API after the cluster is created. See [cluster.libraries](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-libraries).<br />*Added in Databricks CLI version 1.19.0*                                                                                                                                             |
| `lifecycle`                      | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                              |
| `node_type_id`                   | String   | This field encodes, through a single value, the resources available to each of the Spark nodes in this cluster. For example, the Spark nodes can be provisioned and optimized for memory or compute intensive workloads. A list of available node types can be retrieved by using the [List node types API](https://docs.databricks.com/api/workspace/clusters/listnodetypes).                                       |
| `num_workers`                    | Integer  | Number of worker nodes that this cluster should have. A cluster has one Spark Driver and `num_workers` Executors for a total of `num_workers` + 1 Spark nodes.                                                                                                                                                                                                                                                       |
| `permissions`                    | Sequence | The cluster permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).                                                                                                                                                                                                                                                                                           |
| `policy_id`                      | String   | The ID of the cluster policy used to create the cluster if applicable.                                                                                                                                                                                                                                                                                                                                               |
| `remote_disk_throughput`         | Integer  | Remote disk throughput in bytes per second.<br />*Added in Databricks CLI version 0.257.0*                                                                                                                                                                                                                                                                                                                           |
| `runtime_engine`                 | String   | Determines the cluster's runtime engine, either `STANDARD` or `PHOTON`.                                                                                                                                                                                                                                                                                                                                              |
| `single_user_name`               | String   | Single user name if data\*security\_mode is `SINGLE_USER`.                                                                                                                                                                                                                                                                                                                                                           |
| `spark_conf`                     | Map      | An object containing a set of optional, user-specified Spark configuration key-value pairs. Users can also pass in a string of extra JVM options to the driver and the executors via `spark.driver.extraJavaOptions` and `spark.executor.extraJavaOptions` respectively.                                                                                                                                             |
| `spark_env_vars`                 | Map      | An object containing a set of optional, user-specified environment variable key-value pairs.                                                                                                                                                                                                                                                                                                                         |
| `spark_version`                  | String   | The Spark version of the cluster, e.g. `3.3.x-scala2.11`. A list of available Spark versions can be retrieved by using the [List available Spark versions API](https://docs.databricks.com/api/workspace/clusters/sparkversions).                                                                                                                                                                                    |
| `ssh_public_keys`                | Sequence | SSH public key contents that will be added to each Spark node in this cluster. The corresponding private keys can be used to login with the user name `ubuntu` on port `2200`. Up to 10 keys can be specified.                                                                                                                                                                                                       |
| `total_initial_remote_disk_size` | Integer  | If set, what the total initial volume size (in GB) of the remote disks should be. Supported for GCP.<br />*Added in Databricks CLI version 0.257.0*                                                                                                                                                                                                                                                                  |
| `use_ml_runtime`                 | Boolean  | This field can only be used when `kind = CLASSIC_PREVIEW`. `effective_spark_version` is determined by `spark_version` (Databricks Runtime release), this field `use_ml_runtime`, and whether `node_type_id` is gpu node or not.<br />*Added in Databricks CLI version 0.237.0*                                                                                                                                       |
| `worker_node_type_flexibility`   | Map      | Flexible node type configuration for worker nodes. See [cluster.worker\_node\_type\_flexibility](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-worker_node_type_flexibility).<br />*Added in Databricks CLI version 0.285.0*                                                                                                                                                             |
| `workload_type`                  | Map      | The types of workloads that can use the cluster, such as notebooks or jobs. If omitted, the cluster can be used for both notebooks and jobs. See [workload\_type](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-workload_type).                                                                                                                                                          |

### <a id="cluster-libraries" />cluster.libraries

**`Type: Sequence`**

A list of libraries to install on the cluster. Installed via the Libraries API after the cluster is created.

*Added in Databricks CLI version 1.19.0*

Each item in the list is a `Library`:

| Key            | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cran`         | Map    | Specification of a CRAN library to be installed.<br />*Added in Databricks CLI version 0.229.0*                                                                                                                                                                                                                                                                                                                                                                              |
| `jar`          | String | URI of the JAR library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "jar": "/Workspace/path/to/library.jar" }`, `{ "jar" : "/Volumes/path/to/library.jar" }`, or `{ "jar": "s3://my-bucket/library.jar" }`. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an IAM role to access the S3 URI.<br />*Added in Databricks CLI version 0.229.0*   |
| `maven`        | Map    | Specification of a Maven library to be installed. For example: `{ "coordinates": "org.jsoup:jsoup:1.7.2" }`.<br />*Added in Databricks CLI version 0.229.0*                                                                                                                                                                                                                                                                                                                  |
| `pypi`         | Map    | Specification of a PyPI library to be installed. For example: `{ "package": "simplejson" }`.<br />*Added in Databricks CLI version 0.229.0*                                                                                                                                                                                                                                                                                                                                  |
| `requirements` | String | URI of the requirements.txt file to install. Only Workspace paths and Unity Catalog Volumes paths are supported. For example: `{ "requirements": "/Workspace/path/to/requirements.txt" }` or `{ "requirements" : "/Volumes/path/to/requirements.txt" }`. Installing a requirements file requires Databricks Runtime 15.0 or above.<br />*Added in Databricks CLI version 0.229.0*                                                                                            |
| `whl`          | String | URI of the wheel library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "whl": "/Workspace/path/to/library.whl" }`, `{ "whl" : "/Volumes/path/to/library.whl" }`, or `{ "whl": "s3://my-bucket/library.whl" }`. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an IAM role to access the S3 URI.<br />*Added in Databricks CLI version 0.229.0* |

### <a id="cluster-autoscale" />cluster.autoscale

**`Type: Map`**

Parameters for automatically scaling clusters up and down based on load.

| Key           | Type    | Description                                                                                                                                                          |
| ------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `min_workers` | Integer | The minimum number of workers to which the cluster can scale down when underutilized. It is also the initial number of workers the cluster will have after creation. |
| `max_workers` | Integer | The maximum number of workers to which the cluster can scale up when overloaded. `max_workers` must be strictly greater than `min_workers`.                          |

### <a id="cluster-aws_attributes" />cluster.aws\_attributes

**`Type: Map`**

Attributes related to clusters running on Amazon Web Services.

| Key                      | Type    | Description                                                                                                                                                                                                                       |
| ------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `zone_id`                | String  | Identifier for the availability zone/datacenter in which the cluster resides. This string will be of a form like `us-west-2a`.                                                                                                    |
| `availability`           | String  | Availability type used for all subsequent nodes past the `first_on_demand` ones. Valid values are `SPOT`, `ON_DEMAND`, `SPOT_WITH_FALLBACK`. If `first_on_demand` is zero, this availability type is used for the entire cluster. |
| `spot_bid_price_percent` | Integer | The max price for AWS spot instances, as a percentage of the corresponding instance type's on-demand price.                                                                                                                       |
| `instance_profile_arn`   | String  | Nodes for this cluster will only be placed on AWS instances with this instance profile.                                                                                                                                           |
| `first_on_demand`        | Integer | The first `first_on_demand` nodes of the cluster will be placed on on-demand instances. This value should be greater than `0`, to make sure the cluster driver node is placed on an on-demand instance.                           |
| `ebs_volume_type`        | String  | The type of EBS volumes that will be launched with this cluster. Valid values are `GENERAL_PURPOSE_SSD` or `THROUGHPUT_OPTIMIZED_HDD`.                                                                                            |
| `ebs_volume_count`       | Integer | The number of volumes launched for each instance.                                                                                                                                                                                 |
| `ebs_volume_size`        | Integer | The size of each EBS volume (in GiB) launched for each instance.                                                                                                                                                                  |
| `ebs_volume_iops`        | Integer | The number of IOPS per EBS gp3 volume.                                                                                                                                                                                            |
| `ebs_volume_throughput`  | Integer | The throughput per EBS gp3 volume, in MiB per second.                                                                                                                                                                             |

### <a id="cluster-azure_attributes" />cluster.azure\_attributes

**`Type: Map`**

Attributes related to clusters running on Microsoft Azure.

| Key                          | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `first_on_demand`            | Integer | The first `first_on_demand` nodes of the cluster will be placed on on-demand instances.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `availability`               | String  | Availability type used for all subsequent nodes past the `first_on_demand` ones. Valid values are `SPOT_AZURE`, `ON_DEMAND_AZURE`, `SPOT_WITH_FALLBACK_AZURE`. If `first_on_demand` is zero, this availability type is used for the entire cluster.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `spot_bid_max_price`         | Number  | The max price for Azure spot instances. Use `-1` to specify lowest price.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `capacity_reservation_group` | String  | The Azure capacity reservation group resource ID to use for launching VMs, in the format `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}`. When specified, VMs are launched using the provided capacity reservation.<br />Capacity reservations can only be specified when the workspace uses an injected VNet (a customer-defined VNet not managed by Databricks). The `databricks-login-prod` Enterprise Application must be granted the following four permissions: `Microsoft.Compute/capacityReservationGroups/read`, `Microsoft.Compute/capacityReservationGroups/deploy/action`, `Microsoft.Compute/capacityReservationGroups/capacityReservations/read`, and `Microsoft.Compute/capacityReservationGroups/capacityReservations/deploy/action`.<br />*Added in Databricks CLI version 1.5.0* |
| `log_analytics_info`         | Map     | The configuration for Azure Log Analytics agent. Both `log_analytics_workspace_id` and `log_analytics_primary_key` must be set, or neither. See [log\_analytics\_info](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-azure_attributes-log_analytics_info).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

### <a id="cluster-azure_attributes-log_analytics_info" />cluster.azure\_attributes.log\_analytics\_info

**`Type: Map`**

The configuration for Azure Log Analytics agent. Both `log_analytics_workspace_id` and `log_analytics_primary_key` must be set, or neither.

| Key                          | Type   | Description                                            |
| ---------------------------- | ------ | ------------------------------------------------------ |
| `log_analytics_workspace_id` | String | The ID of the Azure Log Analytics workspace.           |
| `log_analytics_primary_key`  | String | The primary key for the Azure Log Analytics workspace. |

### <a id="cluster-gcp_attributes" />cluster.gcp\_attributes

**`Type: Map`**

Attributes related to clusters running on Google Cloud Platform.

| Key                         | Type    | Description                                                                                                                                                                                                                                                                                                |
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `use_preemptible_executors` | Boolean | Whether to use preemptible executors. Preemptible executors are preemptible GCE instances that may be reclaimed by GCE at any time.                                                                                                                                                                        |
| `google_service_account`    | String  | The Google service account to be used by the Databricks cluster VM instances.                                                                                                                                                                                                                              |
| `local_ssd_count`           | Integer | The number of local SSDs to attach to each node in the cluster. The default value is `0`.                                                                                                                                                                                                                  |
| `zone_id`                   | String  | Identifier for the availability zone/datacenter in which the cluster resides.                                                                                                                                                                                                                              |
| `availability`              | String  | Determines whether the Spark executors are scheduled to run on preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. Valid values are `PREEMPTIBLE_GCP`, `ON_DEMAND_GCP`, `PREEMPTIBLE_WITH_FALLBACK_GCP`.                                     |
| `boot_disk_size`            | Integer | The size of the boot disk in GB. Values typically range from 100 to 1000.                                                                                                                                                                                                                                  |
| `confidential_compute_type` | String  | (Beta) The confidential computing technology for the cluster's instances. Only `SEV_SNP` is supported, and only on N2D instance types. Valid values are `CONFIDENTIAL_COMPUTE_TYPE_NONE` and `SEV_SNP`. When not set, no confidential computing is applied.<br />*Added in Databricks CLI version 0.299.2* |

### <a id="cluster-cluster_log_conf" />cluster.cluster\_log\_conf

The configuration for delivering Spark logs to a long-term storage destination.

| Key       | Type | Description                                                                                                                                                   |
| --------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dbfs`    | Map  | DBFS location for cluster log delivery. See [dbfs](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-cluster_log_conf-dbfs).          |
| `s3`      | Map  | S3 location for cluster log delivery. See [s3](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-cluster_log_conf-s3).                |
| `volumes` | Map  | Volumes location for cluster log delivery. See [volumes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-cluster_log_conf-volumes). |

#### <a id="cluster-cluster_log_conf-dbfs" />cluster.cluster\_log\_conf.dbfs

**`Type: Map`**

DBFS location for cluster log delivery.

| Key           | Type   | Description                                                                 |
| ------------- | ------ | --------------------------------------------------------------------------- |
| `destination` | String | The DBFS path for cluster log delivery (for example, `dbfs:/cluster-logs`). |

#### <a id="cluster-cluster_log_conf-s3" />cluster.cluster\_log\_conf.s3

**`Type: Map`**

S3 location for cluster log delivery.

| Key                 | Type    | Description                                                                       |
| ------------------- | ------- | --------------------------------------------------------------------------------- |
| `destination`       | String  | The S3 URI for cluster log delivery (for example, `s3://my-bucket/cluster-logs`). |
| `region`            | String  | The AWS region of the S3 bucket.                                                  |
| `endpoint`          | String  | The S3 endpoint URL (optional).                                                   |
| `enable_encryption` | Boolean | Whether to enable encryption for cluster logs.                                    |
| `encryption_type`   | String  | The encryption type. Valid values include `SSE_S3`, `SSE_KMS`.                    |
| `kms_key`           | String  | The KMS key ARN for encryption (when using `SSE_KMS`).                            |
| `canned_acl`        | String  | The canned ACL to apply to cluster logs.                                          |

#### <a id="cluster-cluster_log_conf-volumes" />cluster.cluster\_log\_conf.volumes

**`Type: Map`**

Volumes location for cluster log delivery.

| Key           | Type   | Description                                                                                           |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------- |
| `destination` | String | The volume path for cluster log delivery (for example, `/Volumes/catalog/schema/volume/cluster_log`). |

### <a id="cluster-docker_image" />cluster.docker\_image

**`Type: Map`**

The custom Docker image for the cluster's nodes, used with [Databricks Container Services](https://docs.databricks.com/aws/en/compute/custom-containers.md).

| Key          | Type   | Description                                                                                                                                                       |
| ------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`        | String | URL of the Docker image.                                                                                                                                          |
| `basic_auth` | Map    | Basic authentication for Docker repository. See [basic\_auth](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-docker_image-basic_auth). |

#### <a id="cluster-docker_image-basic_auth" />cluster.docker\_image.basic\_auth

**`Type: Map`**

Basic authentication for Docker repository.

| Key        | Type   | Description                                      |
| ---------- | ------ | ------------------------------------------------ |
| `username` | String | The username for Docker registry authentication. |
| `password` | String | The password for Docker registry authentication. |

### <a id="cluster-init_scripts" />cluster.init\_scripts

**`Type: Map`**

The configuration for storing init scripts. At least one location type must be specified.

| Key         | Type | Description                                                                                                                                                   |
| ----------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dbfs`      | Map  | DBFS location of init script. See [dbfs](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts-dbfs).                        |
| `workspace` | Map  | Workspace location of init script. See [workspace](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts-workspace).         |
| `s3`        | Map  | S3 location of init script. See [s3](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts-s3).                              |
| `abfss`     | Map  | ABFSS location of init script. See [abfss](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts-abfss).                     |
| `gcs`       | Map  | GCS location of init script. See [gcs](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts-gcs).                           |
| `volumes`   | Map  | Unity Catalog Volumes location of init script. See [volumes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-init_scripts-volumes). |

#### <a id="cluster-init_scripts-dbfs" />cluster.init\_scripts.dbfs

**`Type: Map`**

DBFS location of init script.

| Key           | Type   | Description                       |
| ------------- | ------ | --------------------------------- |
| `destination` | String | The DBFS path of the init script. |

#### <a id="cluster-init_scripts-workspace" />cluster.init\_scripts.workspace

**`Type: Map`**

Workspace location of init script.

| Key           | Type   | Description                            |
| ------------- | ------ | -------------------------------------- |
| `destination` | String | The workspace path of the init script. |

#### <a id="cluster-init_scripts-s3" />cluster.init\_scripts.s3

**`Type: Map`**

S3 location of init script.

| Key           | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| `destination` | String | The S3 URI of the init script.   |
| `region`      | String | The AWS region of the S3 bucket. |
| `endpoint`    | String | The S3 endpoint URL (optional).  |

#### <a id="cluster-init_scripts-abfss" />cluster.init\_scripts.abfss

**`Type: Map`**

ABFSS location of init script.

| Key           | Type   | Description                        |
| ------------- | ------ | ---------------------------------- |
| `destination` | String | The ABFSS path of the init script. |

#### <a id="cluster-init_scripts-gcs" />cluster.init\_scripts.gcs

**`Type: Map`**

GCS location of init script.

| Key           | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| `destination` | String | The GCS path of the init script. |

#### <a id="cluster-init_scripts-volumes" />cluster.init\_scripts.volumes

**`Type: Map`**

Volumes location of init script.

| Key           | Type   | Description                                        |
| ------------- | ------ | -------------------------------------------------- |
| `destination` | String | The Unity Catalog Volumes path of the init script. |

### <a id="cluster-driver_node_type_flexibility" />cluster.driver\_node\_type\_flexibility

**`Type: Map`**

Flexible node type configuration for the driver node.

*Added in Databricks CLI version 0.285.0*

| Key                       | Type     | Description                                                                                                                                                               |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `alternate_node_type_ids` | Sequence | A list of node type IDs to use as fallbacks when the primary node type is unavailable.<br />*Added in Databricks CLI version 0.285.0*                                     |
| `aws_context_id`          | String   | The AWS Context ID for EC2 Fleet. When set (non-empty), the value is passed to AWS CreateFleet API to create the EC2 Fleet.<br />*Added in Databricks CLI version 1.16.0* |

### <a id="cluster-worker_node_type_flexibility" />cluster.worker\_node\_type\_flexibility

**`Type: Map`**

Flexible node type configuration for worker nodes.

*Added in Databricks CLI version 0.285.0*

| Key                       | Type     | Description                                                                                                                                                               |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `alternate_node_type_ids` | Sequence | A list of node type IDs to use as fallbacks when the primary node type is unavailable.<br />*Added in Databricks CLI version 0.285.0*                                     |
| `aws_context_id`          | String   | The AWS Context ID for EC2 Fleet. When set (non-empty), the value is passed to AWS CreateFleet API to create the EC2 Fleet.<br />*Added in Databricks CLI version 1.16.0* |

### <a id="cluster-workload_type" />cluster.workload\_type

**`Type: Map`**

The types of workloads that can use the cluster, such as notebooks or jobs. If omitted, the cluster can be used for both notebooks and jobs.

| Key       | Type | Description                                                                                                                                                       |
| --------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clients` | Map  | Defines what type of clients can use the cluster. See [clients](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster-workload_type-clients). |

#### <a id="cluster-workload_type-clients" />cluster.workload\_type.clients

**`Type: Map`**

The type of clients for this compute workload.

| Key         | Type    | Description                            |
| ----------- | ------- | -------------------------------------- |
| `jobs`      | Boolean | Whether the cluster can run jobs.      |
| `notebooks` | Boolean | Whether the cluster can run notebooks. |

#### Examples

The following example creates a dedicated (single-user) cluster for the current user with Databricks Runtime 15.4 LTS and a cluster policy:

```yaml
resources:
  clusters:
    my_cluster:
      num_workers: 0
      node_type_id: 'i3.xlarge'
      driver_node_type_id: 'i3.xlarge'
      spark_version: '15.4.x-scala2.12'
      spark_conf:
        'spark.executor.memory': '2g'
      autotermination_minutes: 60
      enable_elastic_disk: true
      single_user_name: ${workspace.current_user.userName}
      policy_id: '000128DB309672CA'
      enable_local_disk_encryption: false
      data_security_mode: SINGLE_USER
      runtime_engine: STANDARD
```

This example creates a simple cluster `my_cluster` and sets that as the cluster to use to run the notebook in `my_job`:

```yaml
bundle:
  name: clusters

resources:
  clusters:
    my_cluster:
      num_workers: 2
      node_type_id: 'i3.xlarge'
      autoscale:
        min_workers: 2
        max_workers: 7
      spark_version: '13.3.x-scala2.12'
      spark_conf:
        'spark.executor.memory': '2g'

  jobs:
    my_job:
      tasks:
        - task_key: test_task
          notebook_task:
            notebook_path: './src/my_notebook.py'
          existing_cluster_id: ${resources.clusters.my_cluster.id}
```

## <a id="cluster_policies" />cluster\_policy

**`Type: Map`**

The cluster policy resource defines a [cluster policy](https://docs.databricks.com/api/workspace/clusterpolicies/create) that limits the ability to configure clusters based on a set of rules.

Cluster policies are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.cluster\_policies](https://databricks.github.io/cli/python/databricks.bundles.cluster_policies.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define cluster policies is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.14.0*

```yaml
cluster_policies:
  <cluster_policy-name>:
    <cluster_policy-field-name>: <cluster_policy-field-value>
```

| Key                                  | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `definition`                         | String   | Policy definition document expressed in [Databricks Cluster Policy Definition Language](https://docs.databricks.com/administration-guide/clusters/policy-definition.html).<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                                                                                           |
| `description`                        | String   | Additional human-readable description of the cluster policy.<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                                                                                                                                                                                                         |
| `libraries`                          | Sequence | A list of libraries to be installed on the next cluster restart that uses this policy. The maximum number of libraries is 500. See [cluster\_policy.libraries](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster_policy-libraries).<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                          |
| `lifecycle`                          | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                                             |
| `max_clusters_per_user`              | Integer  | Max number of clusters per user that can be active using this policy. If not present, there is no max limit.<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                                                                                                                                                         |
| `name`                               | String   | Cluster policy name requested by the user. This has to be unique. Length must be between 1 and 100 characters.<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                                                                                                                                                       |
| `permissions`                        | Sequence | The cluster policy permissions. Cluster policies only support the `CAN_USE` permission level. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                                                                      |
| `policy_family_definition_overrides` | String   | Policy definition JSON document expressed in [Databricks Policy Definition Language](https://docs.databricks.com/administration-guide/clusters/policy-definition.html). The JSON document must be passed as a string and cannot be embedded in the requests.<br />You can use this to customize the policy definition inherited from the policy family. Policy rules specified here are merged into the inherited policy definition.<br />*Added in Databricks CLI version 1.14.0* |
| `policy_family_id`                   | String   | ID of the policy family. The cluster policy's policy definition inherits the policy family's policy definition. Cannot be used with `definition`. Use `policy_family_definition_overrides` instead to customize the policy definition.<br />*Added in Databricks CLI version 1.14.0*                                                                                                                                                                                               |

### <a id="cluster_policy-libraries" />cluster\_policy.libraries

**`Type: Sequence`**

A list of libraries to be installed on the next cluster restart that uses this policy. The maximum number of libraries is 500.

Each item in the list is a `Library`:

| Key            | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cran`         | Map    | Specification of a CRAN library to be installed.<br />*Added in Databricks CLI version 0.229.0*                                                                                                                                                                                                                                                                                                                                                                              |
| `jar`          | String | URI of the JAR library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "jar": "/Workspace/path/to/library.jar" }`, `{ "jar" : "/Volumes/path/to/library.jar" }`, or `{ "jar": "s3://my-bucket/library.jar" }`. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an IAM role to access the S3 URI.<br />*Added in Databricks CLI version 0.229.0*   |
| `maven`        | Map    | Specification of a Maven library to be installed. For example: `{ "coordinates": "org.jsoup:jsoup:1.7.2" }`.<br />*Added in Databricks CLI version 0.229.0*                                                                                                                                                                                                                                                                                                                  |
| `pypi`         | Map    | Specification of a PyPI library to be installed. For example: `{ "package": "simplejson" }`.<br />*Added in Databricks CLI version 0.229.0*                                                                                                                                                                                                                                                                                                                                  |
| `requirements` | String | URI of the requirements.txt file to install. Only Workspace paths and Unity Catalog Volumes paths are supported. For example: `{ "requirements": "/Workspace/path/to/requirements.txt" }` or `{ "requirements" : "/Volumes/path/to/requirements.txt" }`. Installing a requirements file requires Databricks Runtime 15.0 or above.<br />*Added in Databricks CLI version 0.229.0*                                                                                            |
| `whl`          | String | URI of the wheel library to install. Supported URIs include Workspace paths, Unity Catalog Volumes paths, and S3 URIs. For example: `{ "whl": "/Workspace/path/to/library.whl" }`, `{ "whl" : "/Volumes/path/to/library.whl" }`, or `{ "whl": "s3://my-bucket/library.whl" }`. If S3 is used, make sure the cluster has read access on the library. You may need to launch the cluster with an IAM role to access the S3 URI.<br />*Added in Databricks CLI version 0.229.0* |

#### Example

The following example defines a cluster policy and grants a group permission to use it:

```yaml
# databricks.yml
bundle:
  name: cluster-policies-example
  engine: direct # Cluster policies require the direct deployment engine

resources:
  cluster_policies:
    my_policy:
      name: my-cluster-policy
      description: Standard policy for team clusters
      max_clusters_per_user: 5
      definition: |
        {
          "spark_version": {
            "type": "fixed",
            "value": "15.4.x-scala2.12"
          },
          "autotermination_minutes": {
            "type": "range",
            "maxValue": 120
          }
        }
      permissions:
        - level: CAN_USE
          group_name: data-engineers
```

## <a id="dashboards" />dashboard

**`Type: Map`**

The dashboard resource allows you to manage [AI/BI dashboards](https://docs.databricks.com/api/workspace/lakeview/create) in a bundle. For information about AI/BI dashboards, see [Dashboards](https://docs.databricks.com/aws/en/dashboards/index.md).

Dashboards are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.dashboards](https://databricks.github.io/cli/python/databricks.bundles.dashboards.html).

If you deployed a bundle that contains a dashboard from your local environment and then use the UI to modify that dashboard, modifications made through the UI are not applied to the dashboard JSON file in the local bundle unless you explicitly update it using `bundle generate`. You can use the `--watch` option to continuously poll and retrieve changes to the dashboard. See [databricks bundle generate](https://docs.databricks.com/aws/en/dev-tools/cli/bundle-commands.md#generate).

In addition, if you attempt to deploy a bundle from your local environment that contains a dashboard JSON file that is different than the one in the remote workspace, an error will occur. To force the deploy and overwrite the dashboard in the remote workspace with the local one, use the `--force` option. See [databricks bundle deploy](https://docs.databricks.com/aws/en/dev-tools/cli/bundle-commands.md#deploy).

*Added in Databricks CLI version 0.232.0*

> [!NOTE]
>
> When using Declarative Automation Bundles with [dashboard Git support](https://docs.databricks.com/aws/en/dashboards/automate/git-support.md), prevent duplicate dashboards from being generated by adding the [sync mapping](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#sync) to exclude the dashboards from synchronizing as files:
>
> ```yaml
> sync:
>   exclude:
>     - src/*.lvdash.json
> ```

```yaml
dashboards:
  <dashboard-name>:
    <dashboard-field-name>: <dashboard-field-value>
```

| Key                    | Type     | Description                                                                                                                                                                                                                                                                                                                                      |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `dataset_catalog`      | String   | The default catalog value used by all datasets in the dashboard if not otherwise specified in the query. For example configuration that sets this field, see [Dashboard catalog and schema parameterization](https://docs.databricks.com/aws/en/dev-tools/bundles/examples.md#dashboard-dataset).<br />*Added in Databricks CLI version 0.283.0* |
| `dataset_schema`       | String   | The default schema value used by all datasets in the dashboard if not otherwise specified in the query. For example configuration that sets this field, see [Dashboard catalog and schema parameterization](https://docs.databricks.com/aws/en/dev-tools/bundles/examples.md#dashboard-dataset).<br />*Added in Databricks CLI version 0.283.0*  |
| `display_name`         | String   | The display name of the dashboard.<br />*Added in Databricks CLI version 0.232.0*                                                                                                                                                                                                                                                                |
| `embed_credentials`    | Boolean  | Whether the bundle deployment identity credentials are used to execute queries for all dashboard viewers. If it is set to `false`, a viewer's credentials are used. The default value is `false`.<br />*Added in Databricks CLI version 0.232.0*                                                                                                 |
| `etag`                 | String   | The etag for the dashboard. Can be optionally provided on updates to ensure that the dashboard has not been modified since the last read.<br />*Added in Databricks CLI version 0.234.0*                                                                                                                                                         |
| `file_path`            | String   | The local path of the dashboard asset, including the file name. Exported dashboards always have the file extension `.lvdash.json`.<br />*Added in Databricks CLI version 0.232.0*                                                                                                                                                                |
| `lifecycle`            | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).                                                                                                                         |
| `parent_path`          | String   | The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash.<br />*Added in Databricks CLI version 0.232.0*                                                                                                                                                                                          |
| `path`                 | String   | The workspace path of the dashboard asset, including the asset name.<br />*Added in Databricks CLI version 0.234.0*                                                                                                                                                                                                                              |
| `permissions`          | Sequence | The dashboard permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.232.0*                                                                                                                                                                      |
| `serialized_dashboard` | Any      | The contents of the dashboard in serialized string form.<br />*Added in Databricks CLI version 0.232.0*                                                                                                                                                                                                                                          |
| `warehouse_id`         | String   | The warehouse ID used to run the dashboard.<br />*Added in Databricks CLI version 0.232.0*                                                                                                                                                                                                                                                       |

#### Example

The following example includes and deploys the sample **NYC Taxi Trip Analysis** dashboard to the Databricks workspace.

```yaml
resources:
  dashboards:
    nyc_taxi_trip_analysis:
      display_name: 'NYC Taxi Trip Analysis'
      file_path: ../src/nyc_taxi_trip_analysis.lvdash.json
      warehouse_id: ${var.warehouse_id}
```

## <a id="data_quality_monitors" />data\_quality\_monitor (Unity Catalog)

**`Type: Map`**

The data\_quality\_monitor resource allows you to define [data quality monitors](https://docs.databricks.com/api/workspace/dataquality/createmonitor) for Unity Catalog schemas and tables in a bundle. A schema monitor runs [anomaly detection](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/anomaly-detection/index.md) on the tables in the schema. A table monitor runs [data profiling](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/data-profiling/index.md) on the table.

Data quality monitors are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.data\_quality\_monitors](https://databricks.github.io/cli/python/databricks.bundles.data_quality_monitors.html).

> [!NOTE]
>
> This resource requires the direct deployment engine. See [Resource compatibility](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md#resource-compatibility).

*Added in Databricks CLI version 1.24.0*

```yaml
data_quality_monitors:
  <data_quality_monitor-name>:
    <data_quality_monitor-field-name>: <data_quality_monitor-field-value>
```

| Key                        | Type   | Description                                                                                                                                                                                                                                                                                                                                                       |
| -------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `anomaly_detection_config` | Map    | The anomaly detection configuration. Applicable only when `object_type` is `schema`. See [data\_quality\_monitor.anomaly\_detection\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-anomaly_detection_config).<br />*Added in Databricks CLI version 1.24.0*                                                      |
| `data_profiling_config`    | Map    | The data profiling configuration. Applicable only when `object_type` is `table`. See [data\_quality\_monitor.data\_profiling\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-data_profiling_config).<br />*Added in Databricks CLI version 1.24.0*                                                                |
| `lifecycle`                | Map    | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.24.0*                                                                                            |
| `object_id`                | String | Required. The UUID of the monitored object: the `schema_id` of a schema, or the `table_id` of a table. For a schema defined in the same bundle, use a reference such as `${resources.schemas.<schema-name>.schema_id}`. You can also find the ID on the **Details** tab of the schema or table in Catalog Explorer.<br />*Added in Databricks CLI version 1.24.0* |
| `object_type`              | String | Required. The type of the monitored object. Valid values are `schema` and `table`.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                  |

### <a id="data_quality_monitor-anomaly_detection_config" />data\_quality\_monitor.anomaly\_detection\_config

**`Type: Map`**

The anomaly detection configuration for a schema monitor.

| Key                         | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `excluded_table_full_names` | Sequence | (Beta) A list of fully qualified names of tables to exclude from anomaly detection.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `notification_settings`     | Map      | Who to alert when anomaly detection finds unhealthy tables in the schema. This is the same schema alert that you manage from **Manage alerts** in the Data Quality Monitoring UI, so a change made in either place shows in both. Set the recipients in `on_unhealthy_table`, using only `destination_ids` and `destination_user_ids`. `on_failure` is not supported. Omitting this field, or leaving both recipient lists empty, removes the alert. See [data\_quality\_monitor.notification\_settings](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-notification_settings).<br />*Added in Databricks CLI version 1.24.0* |

### <a id="data_quality_monitor-data_profiling_config" />data\_quality\_monitor.data\_profiling\_config

**`Type: Map`**

The data profiling configuration for a table monitor. Exactly one of `inference_log`, `snapshot`, or `time_series` must be set.

| Key                      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assets_dir`             | String   | The absolute path to a custom directory to store data monitoring assets, such as the dashboard.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                       |
| `baseline_table_name`    | String   | The name of the baseline table. Baseline data is used to compute drift from the data in the monitored table. The baseline table and the monitored table must have the same schema.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                    |
| `custom_metrics`         | Sequence | Custom metrics to compute on the monitored table. See [data\_quality\_monitor.data\_profiling\_config.custom\_metrics](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-custom_metrics).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                        |
| `inference_log`          | Map      | The analysis configuration for monitoring inference log tables. See [data\_quality\_monitor.data\_profiling\_config.inference\_log](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-inference_log).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                            |
| `notification_settings`  | Map      | The notification settings for the monitor. For table monitors, only `on_failure` with `email_addresses` is supported. See [data\_quality\_monitor.notification\_settings](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-notification_settings).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                              |
| `output_schema_id`       | String   | Required. The ID of the schema where output tables are created.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                                                       |
| `schedule`               | Map      | The schedule for automatically refreshing the metric tables. See [data\_quality\_monitor.data\_profiling\_config.schedule](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-schedule).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                          |
| `skip_builtin_dashboard` | Boolean  | Whether to skip creating a default dashboard summarizing data quality metrics.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                                        |
| `slicing_exprs`          | Sequence | A list of column expressions to slice data with for targeted analysis. The data is grouped by each expression independently, resulting in a separate slice for each predicate and its complements. For example, `slicing_exprs: ["col_1", "col_2 > 10"]` generates two slices for `col_2 > 10` (true and false) and one slice per unique value in `col_1`. For high-cardinality columns, only the top 100 unique values by frequency generate slices.<br />*Added in Databricks CLI version 1.24.0* |
| `snapshot`               | Map      | The analysis configuration for monitoring snapshot tables. This configuration has no keys, so set it to `{}`.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                         |
| `time_series`            | Map      | The analysis configuration for monitoring time series tables. See [data\_quality\_monitor.data\_profiling\_config.time\_series](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-time_series).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                  |
| `warehouse_id`           | String   | The ID of the warehouse to use for dashboard creation. If not specified, the first running warehouse is used.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                         |

### <a id="data_quality_monitor-custom_metrics" />data\_quality\_monitor.data\_profiling\_config.custom\_metrics

**`Type: Sequence`**

A list of custom metric definitions.

| Key                | Type     | Description                                                                                                                                                                                                                                                        |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `definition`       | String   | Required. A Jinja template for a SQL expression that specifies how to compute the metric. See [create metric definition](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/data-profiling/custom-metrics.md#custom-metric). |
| `input_columns`    | Sequence | Required. A list of column names in the input table to compute the metric for. Use `:table` to indicate that the metric needs information from multiple columns.                                                                                                   |
| `name`             | String   | Required. The name of the metric in the output tables.                                                                                                                                                                                                             |
| `output_data_type` | String   | Required. The output type of the custom metric.                                                                                                                                                                                                                    |
| `type`             | String   | Required. The type of the custom metric. Valid values are `DATA_PROFILING_CUSTOM_METRIC_TYPE_AGGREGATE`, `DATA_PROFILING_CUSTOM_METRIC_TYPE_DERIVED`, and `DATA_PROFILING_CUSTOM_METRIC_TYPE_DRIFT`.                                                               |

### <a id="data_quality_monitor-inference_log" />data\_quality\_monitor.data\_profiling\_config.inference\_log

**`Type: Map`**

The analysis configuration for monitoring inference log tables.

| Key                 | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `granularities`     | Sequence | Required. The granularities to use when aggregating data into time windows based on their timestamp. Valid values are `AGGREGATION_GRANULARITY_5_MINUTES`, `AGGREGATION_GRANULARITY_30_MINUTES`, `AGGREGATION_GRANULARITY_1_HOUR`, `AGGREGATION_GRANULARITY_1_DAY`, `AGGREGATION_GRANULARITY_1_WEEK`, `AGGREGATION_GRANULARITY_2_WEEKS`, `AGGREGATION_GRANULARITY_3_WEEKS`, `AGGREGATION_GRANULARITY_4_WEEKS`, `AGGREGATION_GRANULARITY_1_MONTH`, and `AGGREGATION_GRANULARITY_1_YEAR`. |
| `label_column`      | String   | The column that contains the label.                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `model_id_column`   | String   | Required. The column that contains the model identifier.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `prediction_column` | String   | Required. The column that contains the prediction.                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `problem_type`      | String   | Required. The problem type the model aims to solve. Valid values are `INFERENCE_PROBLEM_TYPE_CLASSIFICATION` and `INFERENCE_PROBLEM_TYPE_REGRESSION`.                                                                                                                                                                                                                                                                                                                                   |
| `timestamp_column`  | String   | Required. The column that contains the timestamp.                                                                                                                                                                                                                                                                                                                                                                                                                                       |

### <a id="data_quality_monitor-notification_settings" />data\_quality\_monitor.notification\_settings

**`Type: Map`**

The notification settings for a data quality monitor. Each key is a [notification destination](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-notification_destination).

| Key                  | Type | Description                                                                                                                                                                                             |
| -------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `on_failure`         | Map  | The destinations to notify when a refresh fails or times out. Supported only in `data_profiling_config`.                                                                                                |
| `on_unhealthy_table` | Map  | The recipients to notify when anomaly detection finds unhealthy tables in the schema. Each recipient gets one notification per important unhealthy table. Supported only in `anomaly_detection_config`. |

#### <a id="data_quality_monitor-notification_destination" />Notification destination

| Key                    | Type     | Description                                                                                                                                                                                                                                                                                                                                       |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `destination_ids`      | Sequence | The IDs of the [notification destinations](https://docs.databricks.com/aws/en/admin/workspace-settings/notification-destinations.md) (such as Slack, Microsoft Teams, or webhook destinations) to notify. The destinations must already exist in the workspace. A maximum of 25 destination IDs is supported. Supported only for schema monitors. |
| `destination_user_ids` | Sequence | The IDs of the workspace users to notify by email. A maximum of 25 user IDs is supported. Supported only for schema monitors.                                                                                                                                                                                                                     |
| `email_addresses`      | Sequence | The email addresses to notify. A maximum of 5 email addresses is supported.                                                                                                                                                                                                                                                                       |

### <a id="data_quality_monitor-schedule" />data\_quality\_monitor.data\_profiling\_config.schedule

**`Type: Map`**

The schedule for automatically refreshing the metric tables.

| Key                      | Type   | Description                                                                                                                                                           |
| ------------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `quartz_cron_expression` | String | Required. A [Quartz cron expression](https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) that determines when to run the monitor. |
| `timezone_id`            | String | Required. The Java timezone ID in which to evaluate the cron expression, for example `America/Los_Angeles`.                                                           |

### <a id="data_quality_monitor-time_series" />data\_quality\_monitor.data\_profiling\_config.time\_series

**`Type: Map`**

The analysis configuration for monitoring time series tables.

| Key                | Type     | Description                                                                                                                                                                                                                                                                                                                  |
| ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `granularities`    | Sequence | Required. The granularities to use when aggregating data into time windows based on their timestamp. For valid values, see the `granularities` key of [data\_quality\_monitor.data\_profiling\_config.inference\_log](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#data_quality_monitor-inference_log). |
| `timestamp_column` | String   | Required. The column that contains the timestamp.                                                                                                                                                                                                                                                                            |

#### Examples

The following example defines a schema and a data quality monitor that runs anomaly detection on the tables in it:

```yaml
resources:
  schemas:
    my_schema:
      catalog_name: main
      name: my_schema

  data_quality_monitors:
    schema_monitor:
      object_type: schema
      object_id: ${resources.schemas.my_schema.schema_id}
      anomaly_detection_config:
        excluded_table_full_names:
          - main.my_schema.staging_table
```

The following example defines a data quality monitor that profiles a snapshot table every day at noon UTC:

```yaml
resources:
  data_quality_monitors:
    table_monitor:
      object_type: table
      object_id: 11111111-2222-3333-4444-555555555555
      data_profiling_config:
        output_schema_id: 66666666-7777-8888-9999-000000000000
        snapshot: {}
        schedule:
          quartz_cron_expression: 0 0 12 * * ?
          timezone_id: UTC
```

## <a id="database_catalogs" />database\_catalog

**`Type: Map`**

The database catalog resource allows you to define [database catalogs](https://docs.databricks.com/api/workspace/database/createdatabasecatalog) that correspond to database instances in a bundle. A database catalog is a Lakebase database that is registered as a Unity Catalog catalog.

For new workloads, Databricks recommends the [`postgres_catalogs`](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_catalogs) resource.

Database catalogs are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.database\_catalogs](https://databricks.github.io/cli/python/databricks.bundles.database_catalogs.html).

For information about database catalogs, see [Register a database](https://docs.databricks.com/aws/en/oltp/projects/register-uc.md#register-a-database).

*Added in Databricks CLI version 0.265.0*

```yaml
database_catalogs:
  <database_catalog-name>:
    <database_catalog-field-name>: <database_catalog-field-value>
```

| Key                             | Type    | Description                                                                                                                                                                                                                                                                                                             |
| ------------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create_database_if_not_exists` | Boolean | Whether to create the database named in `database_name` in the instance if it does not already exist, with the calling user as its owner. Defaults to `false`.<br />*Added in Databricks CLI version 0.265.0*                                                                                                           |
| `database_instance_name`        | String  | The name of the instance housing the database.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                                                           |
| `database_name`                 | String  | The name of the Postgres database in the instance that the catalog registers. The database must already exist unless `create_database_if_not_exists` is `true`. The system databases `postgres`, `databricks_system`, `template0`, and `template1` cannot be registered.<br />*Added in Databricks CLI version 0.265.0* |
| `lifecycle`                     | Map     | Contains the lifecycle settings for a resource, including the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.265.0*                                                   |
| `name`                          | String  | The name of the catalog in Unity Catalog.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                                                                |

#### Example

The following example defines a [database instance](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_instances) with a corresponding database catalog:

```yaml
resources:
  database_instances:
    my_instance:
      name: my-instance
      capacity: CU_1
  database_catalogs:
    my_catalog:
      database_instance_name: ${resources.database_instances.my_instance.name}
      name: example_catalog
      database_name: my_database
      create_database_if_not_exists: true
```

## <a id="database_instances" />database\_instance

**`Type: Map`**

The database instance resource allows you to define [database instances](https://docs.databricks.com/api/workspace/database/createdatabaseinstance) in a bundle. A Lakebase database instance manages storage and compute resources and provides the endpoints that users connect to.

Database instances are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.database\_instances](https://databricks.github.io/cli/python/databricks.bundles.database_instances.html).

> [!NOTE]
>
> New database instances created by the `database_instances` resource are now created as Lakebase Autoscaling projects. See [Autoscaling by default](https://docs.databricks.com/aws/en/oltp/upgrade-to-autoscaling.md) for details. For new Lakebase work, Databricks recommends the [`postgres_projects`](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_projects) resource.

> [!IMPORTANT]
>
> When you deploy a bundle with a database instance, the instance immediately starts running and is subject to pricing. See [Lakebase pricing](https://www.databricks.com/product/pricing/lakebase).

For information about database instances, see [Lakebase Provisioned](https://docs.databricks.com/aws/en/oltp/instances/index.md).

*Added in Databricks CLI version 0.265.0*

```yaml
database_instances:
  <database_instance-name>:
    <database_instance-field-name>: <database_instance-field-value>
```

| Key                           | Type     | Description                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `capacity`                    | String   | The sku of the instance. Valid values are `CU_1`, `CU_2`, `CU_4`, `CU_8`. Must be set when creating an instance.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                                                     |
| `custom_tags`                 | Sequence | A list of key-value pairs that specify custom tags associated with the instance. An instance can have at most 10 tags, and keys must be unique ignoring case.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                                        |
| `enable_pg_native_login`      | Boolean  | Whether the instance has PG native password login enabled. Defaults to `true`.<br />*Added in Databricks CLI version 0.267.0*                                                                                                                                                                                                                                                       |
| `enable_readable_secondaries` | Boolean  | Whether to enable secondaries to serve read-only traffic. Defaults to `false`. Requires a `node_count` greater than 1.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                                               |
| `lifecycle`                   | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                             |
| `name`                        | String   | The name of the instance. This is the unique identifier for the instance. Must be 1 to 63 characters long, contain only letters, digits, and hyphens, start with a letter, and not contain consecutive hyphens.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                      |
| `node_count`                  | Integer  | The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to 1 primary and 0 secondaries.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                                       |
| `parent_instance_ref`         | Map      | The reference of the parent instance. This is only available if the instance is a child instance. A child instance inherits `custom_tags` and `usage_policy_id` from its parent and cannot set them. See [parent instance](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_instance-parent_instance_ref).<br />*Added in Databricks CLI version 0.265.0* |
| `permissions`                 | Sequence | The database instance's permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                               |
| `retention_window_in_days`    | Integer  | The retention window for the instance. This is the time window in days for which the historical data is retained. The default value is 7 days. Valid values are 2 to 35 days.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                        |
| `stopped`                     | Boolean  | Whether to stop the instance. An instance cannot be created in the stopped state. Set this field on update to stop or start the instance.<br />*Added in Databricks CLI version 0.265.0*                                                                                                                                                                                            |
| `usage_policy_id`             | String   | The desired serverless usage policy to associate with the instance.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                                                                                                                                  |

### <a id="database_instance-parent_instance_ref" />database\_instance.parent\_instance\_ref

**`Type: Map`**

The reference of the parent instance. This is only available if the instance is
child instance.

| Key           | Type   | Description                                                                                                                                                                                                                                                               |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch_time` | String | Branch time of the ref database instance. For a parent ref instance, this is the point in time on the parent instance from which the instance was created. For a child ref instance, this is the point in time on the instance from which the child instance was created. |
| `lsn`         | String | User-specified WAL LSN of the ref database instance.                                                                                                                                                                                                                      |
| `name`        | String | Name of the ref database instance.                                                                                                                                                                                                                                        |

#### Example

The following example defines a database instance with a corresponding [database catalog](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_catalogs):

```yaml
resources:
  database_instances:
    my_instance:
      name: my-instance
      capacity: CU_1
  database_catalogs:
    my_catalog:
      database_instance_name: ${resources.database_instances.my_instance.name}
      name: example_catalog
      database_name: my_database
      create_database_if_not_exists: true
```

For an example bundle that demonstrates how to define a database instance and corresponding database catalog, see the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/database_with_catalog).

## <a id="experiments" />experiment

**`Type: Map`**

The experiment resource allows you to define [MLflow experiments](https://docs.databricks.com/api/workspace/experiments/createexperiment) in a bundle. For information about MLflow experiments, see [Organize training runs with MLflow experiments](https://docs.databricks.com/aws/en/mlflow/experiments.md).

Experiments are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.experiments](https://databricks.github.io/cli/python/databricks.bundles.experiments.html).

```yaml
experiments:
  <experiment-name>:
    <experiment-field-name>: <experiment-field-value>
```

| Key                 | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `artifact_location` | String   | The URI of the location where the artifacts of the experiment's runs are stored. The URI must have a scheme other than `file`, such as `dbfs:` or `s3:`, and must not point under the MLflow-managed prefix `dbfs:/databricks/mlflow-tracking`. If omitted, artifacts are stored in MLflow-managed storage. To store artifacts in a Unity Catalog volume (recommended, requires MLflow 2.15.0 or above), use a path of the form `dbfs:/Volumes/<catalog>/<schema>/<volume>/<path>`. See [Create experiment from the workspace](https://docs.databricks.com/aws/en/mlflow/experiments.md#create-expt-from-workspace). |
| `lifecycle`         | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                                                                                                                                                              |
| `name`              | String   | The friendly name that identifies the experiment. An experiment name must be an absolute path in the Databricks workspace, for example `/Workspace/Users/someone@example.com/my_experiment`. Experiments cannot be created under `/Repos`.                                                                                                                                                                                                                                                                                                                                                                           |
| `permissions`       | Sequence | The experiment's permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `tags`              | Sequence | Additional metadata key-value pairs. At most 100 tags are supported. Keys are at most 255 characters long, and values are at most 65535 characters long. See [tags](https://docs.databricks.com/api/workspace/experiments/createexperiment#tags). To set a description for the experiment, use the `mlflow.note.content` tag. To attach a serverless budget policy, use the `mlflow.workload_creation_policy_id` tag. See [Attribute usage with serverless usage policies](https://docs.databricks.com/aws/en/admin/usage/budget-policies.md).                                                                       |

#### Example

The following example defines an experiment that all users can view:

```yaml
resources:
  experiments:
    experiment:
      name: /Workspace/Users/someone@example.com/my_experiment
      permissions:
        - level: CAN_READ
          group_name: users
      tags:
        - key: mlflow.note.content
          value: MLflow experiment used to track runs
```

## <a id="external_locations" />external\_location (Unity Catalog)

**`Type: Map`**

The external location resource allows you to define [external locations](https://docs.databricks.com/api/workspace/externallocations/create) (Unity Catalog) in a bundle.

External locations are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.external\_locations](https://databricks.github.io/cli/python/databricks.bundles.external_locations.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define external locations is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 0.289.0*

```yaml
external_locations:
  <external-location-name>:
    <external-location-field-name>: <external-location-field-value>
```

| Key                  | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                      |
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `comment`            | String   | A user-provided free-form text description of the external location.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                                                                                                              |
| `credential_name`    | String   | Required. The name of the storage credential used with this location.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                                                                                                             |
| `enable_file_events` | Boolean  | Whether to enable file events on this external location. Defaults to `true`. The actual applied value may differ due to server-side defaults. Check `effective_enable_file_events` for the effective state.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                       |
| `encryption_details` | Map      | Encryption options that apply to clients connecting to cloud storage. See [external\_location.encryption\_details](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#external_location-encryption_details).<br />*Added in Databricks CLI version 0.289.0*                                                                                                                       |
| `fallback`           | Boolean  | Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled, the access to the location falls back to cluster credentials if Unity Catalog credentials are not sufficient.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                               |
| `file_event_queue`   | Map      | File event queue settings for this external location. When `enable_file_events` is `true`, exactly one of the queue options must be set. Must be omitted when `enable_file_events` is `false`. See [external\_location.file\_event\_queue](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#external_location-file_event_queue).<br />*Added in Databricks CLI version 0.289.0* |
| `grants`             | Sequence | The grants associated with the external location. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                                          |
| `lifecycle`          | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.289.0*                                                                                                                          |
| `name`               | String   | Required. The name of the external location.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                                                                                                                                      |
| `read_only`          | Boolean  | Indicates whether the external location is read-only.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                                                                                                                             |
| `skip_validation`    | Boolean  | Skips validation of the storage credential associated with the external location.<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                                                                                                 |
| `url`                | String   | Required. The URL of the cloud storage path that the external location points to, including the scheme (for example `s3://`, `abfss://`, or `gs://`).<br />*Added in Databricks CLI version 0.289.0*                                                                                                                                                                                             |

### <a id="external_location-encryption_details" />external\_location.encryption\_details

**`Type: Map`**

Encryption options that apply to clients connecting to cloud storage.

| Key                      | Type | Description                                                                 |
| ------------------------ | ---- | --------------------------------------------------------------------------- |
| `sse_encryption_details` | Map  | Server-side encryption properties for clients communicating with Amazon S3. |

### <a id="external_location-file_event_queue" />external\_location.file\_event\_queue

**`Type: Map`**

File event queue settings for this external location. When `enable_file_events` is `true`, exactly one of the queue options must be set. Must be omitted when `enable_file_events` is `false`.

| Key               | Type | Description                                  |
| ----------------- | ---- | -------------------------------------------- |
| `managed_aqs`     | Map  | Managed Azure Queue Storage settings.        |
| `managed_pubsub`  | Map  | Managed Google Cloud Pub/Sub settings.       |
| `managed_sqs`     | Map  | Managed Amazon SQS settings.                 |
| `provided_aqs`    | Map  | User-provided Azure Queue Storage settings.  |
| `provided_pubsub` | Map  | User-provided Google Cloud Pub/Sub settings. |
| `provided_sqs`    | Map  | User-provided Amazon SQS settings.           |

#### Example

```yaml
# databricks.yml
bundle:
  name: external-locations-example
  engine: direct # External locations require the direct deployment engine

resources:
  external_locations:
    my_external_location:
      name: my_external_location
      url: 's3://my-bucket/my-path'
      credential_name: my_storage_credential
      comment: 'External location created by Declarative Automation Bundles'
      grants:
        - principal: someone@example.com
          privileges:
            - CREATE_EXTERNAL_TABLE
            - READ_FILES
```

## <a id="features" />feature

**`Type: Map`**

The feature resource allows you to define Feature Views in a bundle. A Feature View declares how a feature is computed from a data source. For information about Feature Views, see [Feature Views](https://docs.databricks.com/aws/en/machine-learning/feature-store/feature-views.md).

A Feature View is only a definition. It computes nothing until a [materialization\_set](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_sets) names it. For a tutorial that defines Feature Views and materializes them, see [Manage Feature Views using Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/feature-store-tutorial.md).

Features are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.features](https://databricks.github.io/cli/python/databricks.bundles.features.html).

> [!NOTE]
>
> This resource requires the direct deployment engine. See [Resource compatibility](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md#resource-compatibility).

*Added in Databricks CLI version 1.22.0*

```yaml
features:
  <feature-name>:
    <feature-field-name>: <feature-field-value>
```

| Key                 | Type     | Description                                                                                                                                                                                                                                                                                                                         |
| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `description`       | String   | A description of the Feature View. This is the only field that can be changed without recreating the Feature View.<br />*Added in Databricks CLI version 1.22.0*                                                                                                                                                                    |
| `entities`          | Sequence | The entity columns the feature is keyed on. Feature values are produced for each distinct combination of these columns. Not set for a Feature View on a `request_source`. See [feature.entities](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-entities).<br />*Added in Databricks CLI version 1.22.0* |
| `full_name`         | String   | Required. The three-level Unity Catalog name of the Feature View, in the form `<catalog-name>.<schema-name>.<feature-name>`.<br />*Added in Databricks CLI version 1.22.0*                                                                                                                                                          |
| `function`          | Map      | Required. The computation that produces the feature value. See [feature.function](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-function).<br />*Added in Databricks CLI version 1.22.0*                                                                                                                |
| `lifecycle`         | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.22.0*                                                              |
| `lineage_context`   | Map      | Context recorded against the Feature View for lineage. Accepted on write and not returned on read.<br />*Added in Databricks CLI version 1.22.0*                                                                                                                                                                                    |
| `source`            | Map      | Required. The data the feature is computed from. See [feature.source](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-source).<br />*Added in Databricks CLI version 1.22.0*                                                                                                                              |
| `timeseries_column` | Map      | The source column that orders rows in time. Required for time-windowed aggregations, and not set for a Feature View on a `request_source`. See [feature.timeseries\_column](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-timeseries_column).<br />*Added in Databricks CLI version 1.22.0*             |

### <a id="feature-entities" />feature.entities

**`Type: Sequence`**

The entity columns the feature is keyed on.

*Added in Databricks CLI version 1.22.0*

Each item in the list has the following key:

| Key    | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | Required. The name of the entity column. For a Kafka or Stream source, address a field in the record's key or value with dot notation, such as `value.user_id` or `key.partition_key`. For a nested field, the materialized tables hold the leaf name, such as `user_id` for `value.trip_details.user_id`, and that is the name to use at query time. Colon notation, such as `value:user_id`, is supported for backward compatibility but is deprecated. Use dot notation instead.<br />*Added in Databricks CLI version 1.22.0* |

### <a id="feature-function" />feature.function

**`Type: Map`**

The computation that produces the feature value. Set exactly one function type.

*Added in Databricks CLI version 1.22.0*

| Key                    | Type | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aggregation_function` | Map  | An aggregation over a time window. Takes one of `approx_count_distinct`, `approx_percentile`, `avg`, `count_function`, `first`, `last`, `max`, `min`, `stddev_pop`, `stddev_samp`, `sum`, `var_pop`, or `var_samp`, together with a `time_window` of `sliding`, `tumbling`, `rolling`, or `sawtooth`. For the window's durations, see [Specifying a duration for a window, source, or function](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-durations).<br />*Added in Databricks CLI version 1.22.0* |
| `column_selection`     | Map  | The latest value of a single source column per entity key, with no aggregation. Takes the required `column`, the name of the source column. A `column_selection` feature materializes to online stores only. See [ ColumnSelection materialization](https://docs.databricks.com/aws/en/machine-learning/feature-store/materialized-features.md#columnselection-materialization).<br />*Added in Databricks CLI version 1.22.0*                                                                                                      |
| `custom_udf`           | Map  | (Private Preview) A Unity Catalog user-defined function. A `custom_udf` feature cannot be materialized.<br />*Added in Databricks CLI version 1.22.0*                                                                                                                                                                                                                                                                                                                                                                               |

### <a id="feature-source" />feature.source

**`Type: Map`**

The data a Feature View is computed from. Set exactly one source type, and optionally `lateness`.

*Added in Databricks CLI version 1.22.0*

| Key                   | Type | Description                                                                                                                                                                                                                                                                                                                                                                             |
| --------------------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `delta_table_source`  | Map  | A Delta table in Unity Catalog, identified by `full_name`. Optionally takes `filter_condition`, `transformation_sql`, and `dataframe_schema`. `dataframe_schema` is required whenever `transformation_sql` is set. Declare the key and time columns on the Feature View's own `entities` and `timeseries_column`.<br />*Added in Databricks CLI version 1.22.0*                         |
| `feature_view_source` | Map  | (Private Preview) Other Feature Views, listed under `feature_references`. A feature on this source cannot be materialized.<br />*Added in Databricks CLI version 1.22.0*                                                                                                                                                                                                                |
| `kafka_source`        | Map  | A Kafka source, identified by `name`, which names the Kafka configuration to read from and can differ from the topic name. Optionally takes `filter_condition`. Declare the key and time columns on the Feature View's own `entities` and `timeseries_column`, addressing fields in the record with dot notation such as `value.user_id`.<br />*Added in Databricks CLI version 1.22.0* |
| `lateness`            | Map  | How long to wait for out-of-order source rows, as a `settling_delay`. Not supported for a Feature View with a `sawtooth` window. See [Specifying a duration for a window, source, or function](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-durations).<br />*Added in Databricks CLI version 1.22.0*                                                      |
| `request_source`      | Map  | Data supplied in the request at serving time rather than read from storage, described by a `flat_schema` of scalar-typed fields. A feature on this source cannot be materialized.<br />*Added in Databricks CLI version 1.22.0*                                                                                                                                                         |
| `stream_source`       | Map  | A Stream registered in Unity Catalog, identified by `full_name`. Optionally takes `filter_condition`. A Stream is not a bundle resource. Create it first and reference it by name. See [Set up a Stream](https://docs.databricks.com/aws/en/machine-learning/feature-store/streams.md).<br />*Added in Databricks CLI version 1.22.0*                                                   |

### <a id="feature-timeseries_column" />feature.timeseries\_column

**`Type: Map`**

The source column that orders rows in time, used for point-in-time joins, backfills, and aggregations.

*Added in Databricks CLI version 1.22.0*

| Key    | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name` | String | Required. The name of the timeseries column. For a Kafka or Stream source, address a field in the record with dot notation, such as `value.event_timestamp`. For a nested field, the materialized tables hold the leaf name, such as `event_timestamp` for `value.event_details.event_timestamp`, and that is the name to use at query time. Colon notation, such as `value:event_timestamp`, is supported for backward compatibility but is deprecated. Use dot notation instead.<br />*Added in Databricks CLI version 1.22.0* |

### <a id="feature-durations" />Specifying a duration for a window, source, or function

**`Type: String`**

A field in a Feature View that takes a duration is specified as a count of seconds with an `s` suffix, as in `604800s` for seven days. This covers `window_duration`, `slide_duration`, `delay`, and `offset` on a `time_window`, and `settling_delay` on [feature.source](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature-source). A `sawtooth` window does not support `delay`, and a Feature View with a `sawtooth` window does not support `lateness`.

### <a id="feature-replacement" />Changing a Feature View

`description` is the only key the API can change in place. A change to any other key replaces the Feature View. The bundle deletes it and creates a new one, and `databricks bundle plan` reports the action as `recreate`. `databricks bundle deploy` asks for confirmation before it replaces or deletes a Feature View, and does not proceed without your approval or `--auto-approve`.

A Feature View that a materialization set still materializes cannot be replaced, because its delete is rejected while it has materialized features. To change it, remove its materialized features from the set and deploy, then change the Feature View, add the materialized features back, and deploy again. Adding them back replaces the set, so every materialized feature in the set is recomputed.

#### Example

The following example defines a Feature View that counts transactions per user over a trailing seven days, recomputed daily.

##### YAML

```yaml
resources:
  features:
    transaction_count:
      full_name: ${var.catalog}.${var.schema}.transaction_count_7d
      description: Transactions per user over a trailing seven days
      source:
        delta_table_source:
          full_name: ${var.source_table}
      function:
        aggregation_function:
          count_function:
            input: transaction_id
          time_window:
            sliding:
              window_duration: 604800s
              slide_duration: 86400s
      entities:
        - name: user_id
      timeseries_column:
        name: transaction_time
```

##### Python

```python
def load_resources(bundle: Bundle) -> Resources:
    resources = Resources()

    resources.add_feature(
        'transaction_count',
        Feature(
            full_name='${var.catalog}.${var.schema}.transaction_count_7d',
            description='Transactions per user over a trailing seven days',
            source=DataSource(
                delta_table_source=DeltaTableSource(full_name='${var.source_table}')
            ),
            function=Function(
                aggregation_function=AggregationFunction(
                    count_function=CountFunction(input='transaction_id'),
                    time_window=TimeWindow(
                        sliding=SlidingWindow(window_duration='604800s', slide_duration='86400s')
                    ),
                )
            ),
            entities=[EntityColumn(name='user_id')],
            timeseries_column=TimeseriesColumn(name='transaction_time'),
        ),
    )

    return resources
```

## <a id="feature_specs" />feature\_spec

> [!NOTE]
> **Preview**
>
> This feature is in [Private Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md). To try it, reach out to your Databricks contact.

**`Type: Map`**

The feature\_spec resource allows you to define `FeatureSpec`s in a bundle. A `FeatureSpec` is a Unity Catalog function that lists the features to serve with a Feature Serving endpoint or to use in model training. For information about `FeatureSpec`s, see [Serve feature tables](https://docs.databricks.com/aws/en/machine-learning/feature-store/feature-function-serving.md).

To serve a `FeatureSpec`, declare a [model\_serving\_endpoint](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoints) whose `served_entities` entry sets `entity_name` to the spec's `name`. For a tutorial that declares both, see [Serve Feature Views using Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/feature-store-serving-tutorial.md).

FeatureSpecs are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.feature\_specs](https://databricks.github.io/cli/python/databricks.bundles.feature_specs.html).

> [!NOTE]
>
> This resource requires the direct deployment engine. See [Resource compatibility](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md#resource-compatibility).

*Added in Databricks CLI version 1.26.0*

```yaml
feature_specs:
  <feature_spec-name>:
    <feature_spec-field-name>: <feature_spec-field-value>
```

| Key                      | Type     | Description                                                                                                                                                                                                                                                                                  |
| ------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `exclude_columns`        | Sequence | The output names of columns to leave out of the `FeatureSpec`. Order is not significant.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                                       |
| `extra_pip_requirements` | Map      | Extra pip requirements to install in the serving container. See [feature\_spec.extra\_pip\_requirements](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature_spec-extra_pip_requirements).<br />*Added in Databricks CLI version 1.26.0*                               |
| `features`               | Sequence | Required. The features that the `FeatureSpec` serves. See [feature\_spec.features](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature_spec-features).<br />*Added in Databricks CLI version 1.26.0*                                                                   |
| `grants`                 | Sequence | The grants associated with the `FeatureSpec`. A `FeatureSpec` is a Unity Catalog function, so the privileges are function privileges such as `EXECUTE`. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 1.26.0* |
| `lifecycle`              | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.26.0*                       |
| `name`                   | String   | Required. The three-level Unity Catalog name of the `FeatureSpec`, in the form `<catalog-name>.<schema-name>.<feature-spec-name>`.<br />*Added in Databricks CLI version 1.26.0*                                                                                                             |

### <a id="feature_spec-features" />feature\_spec.features

**`Type: Sequence`**

The features that the `FeatureSpec` serves. Each entry sets exactly one of the following keys.

| Key                   | Type | Description                                                                                                                                                                                                                                                                      |
| --------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `declarative_feature` | Map  | A Feature View to serve. Its one key, `feature`, is required and holds the three-level name of the Feature View, such as `${resources.features.<feature-name>.full_name}`.<br />*Added in Databricks CLI version 1.26.0*                                                         |
| `feature_function`    | Map  | A feature that a Python user-defined function (UDF) computes from other features. See [feature\_spec.features.feature\_function](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature_spec-feature_function).<br />*Added in Databricks CLI version 1.26.0* |
| `feature_lookup`      | Map  | A lookup of features from a feature table. See [feature\_spec.features.feature\_lookup](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#feature_spec-feature_lookup).<br />*Added in Databricks CLI version 1.26.0*                                            |

### <a id="feature_spec-feature_lookup" />feature\_spec.features.feature\_lookup

**`Type: Map`**

A lookup of features from a feature table.

| Key                     | Type     | Description                                                                                                                                                                                                                                                                     |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `default_values`        | Sequence | Default values for features. Each item has a required `feature` key, which names the feature by its output name if it is renamed or its name in the feature table otherwise, and a `default_value` key. Order is not significant.<br />*Added in Databricks CLI version 1.26.0* |
| `feature_names`         | Sequence | The names of the features to look up. If empty, every feature in the table is looked up.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                          |
| `lookback_window`       | String   | The lookback window for a point-in-time lookup, as a duration in seconds such as `86400s`. Requires `timestamp_lookup_keys`.<br />*Added in Databricks CLI version 1.26.0*                                                                                                      |
| `lookup_keys`           | Sequence | Required. The keys to join with the feature table.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                                                                |
| `rename_outputs`        | Sequence | Output names for features, in place of their names in the feature table. Each item has a required `feature` key and a required `output` key. Order is not significant.<br />*Added in Databricks CLI version 1.26.0*                                                            |
| `table`                 | String   | Required. The three-level name of the feature table.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                                                              |
| `timestamp_lookup_keys` | Sequence | The keys to use for a point-in-time lookup.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                                                                       |

### <a id="feature_spec-feature_function" />feature\_spec.features.feature\_function

**`Type: Map`**

A feature that a Python UDF computes from other features.

| Key              | Type     | Description                                                                                                                                                                                                                                                             |
| ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input_bindings` | Sequence | Bindings of the UDF's parameters to features. Each item has a required `parameter` key, which names the UDF parameter, and a required `bound_feature` key, which names the feature bound to it. Order is not significant.<br />*Added in Databricks CLI version 1.26.0* |
| `output`         | String   | The output name of the feature that the UDF computes.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                                                     |
| `udf`            | String   | Required. The three-level name of the Python UDF.<br />*Added in Databricks CLI version 1.26.0*                                                                                                                                                                         |

### <a id="feature_spec-extra_pip_requirements" />feature\_spec.extra\_pip\_requirements

**`Type: Map`**

Extra pip requirements to install in the serving container, in addition to the defaults and to those resolved from the features.

| Key            | Type     | Description                                                                                                                                                                                                                             |
| -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `requirements` | Sequence | Required. Each item is a [PEP 508](https://peps.python.org/pep-0508/) package specifier or the path of a wheel file in a Unity Catalog volume (`/Volumes/...`). Order is not significant.<br />*Added in Databricks CLI version 1.26.0* |

### <a id="feature_spec-rules" />Rules a FeatureSpec must satisfy

A create request is rejected unless all of the following hold:

* `features` has at least one entry, and each entry sets exactly one of `declarative_feature`, `feature_lookup`, or `feature_function`.
* A `FeatureSpec` with `declarative_feature` entries in `features` has no `feature_lookup` or `feature_function` entries and does not set `exclude_columns`.
* Each Feature View that a `declarative_feature` entry names has an online materialized feature. Otherwise the create fails with `No online materialized feature found for features: <names>`.
* The materialization set that materializes each of those Feature Views is created before the `FeatureSpec`. A `${resources.features...}` reference orders the `FeatureSpec` only after the Feature View, so when the set is in the same bundle, add a `lifecycle.depends_on` entry for it. The bundle then creates the `FeatureSpec` after the set and deletes it before the set. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).
* No two items in `rename_outputs`, `default_values`, or `input_bindings` name the same feature or parameter, no `rename_outputs` item keeps a feature's own name, and no column appears twice in `exclude_columns`.
* `extra_pip_requirements.requirements`, when set, has at least one item.

When a Feature View is materialized in batch mode, its online table exists only after the materialization set's first run. A Feature Serving endpoint that serves the `FeatureSpec` and is deployed before that run fails. Run `databricks bundle deploy` again after the first run, and the deploy re-creates the failed endpoint.

### <a id="feature_spec-updates" />Changing a FeatureSpec

A change to any key replaces the `FeatureSpec`. The bundle deletes it and creates a new one, and `databricks bundle plan` reports the action as `recreate`. `databricks bundle deploy` asks for confirmation first, and grants on the `FeatureSpec` that the bundle does not declare are lost. Reordering `exclude_columns`, `extra_pip_requirements.requirements`, or an entry's `rename_outputs`, `default_values`, or `input_bindings` is not a change. Reordering `features`, or a `feature_lookup` entry's `feature_names`, `lookup_keys`, or `timestamp_lookup_keys`, is.

A running Feature Serving endpoint keeps serving the features it was built with when its `FeatureSpec` is replaced but keeps its name. To change what an endpoint serves, give the `FeatureSpec` a new `name`. An endpoint whose `entity_name` references the `FeatureSpec`'s `name` is updated in the same deploy. For a worked example, see [Rename the FeatureSpec](https://docs.databricks.com/aws/en/dev-tools/bundles/feature-store-serving-tutorial.md#rename-the-featurespec).

Deleting a Feature View that a `FeatureSpec` names is not blocked, and it leaves the `FeatureSpec` stale.

#### Examples

The following example defines a `FeatureSpec` that serves two Feature Views and a Feature Serving endpoint that serves the `FeatureSpec`. The `FeatureSpec` `event_features` depends on the materialization set `serving_online`, which materializes both Feature Views, `events_90m` and `amount_sum_90m`, to an online store.

##### YAML

```yaml
resources:
  feature_specs:
    event_features:
      name: ${var.catalog}.${var.schema}.event_features
      features:
        - declarative_feature:
            feature: ${resources.features.events_90m.full_name}
        - declarative_feature:
            feature: ${resources.features.amount_sum_90m.full_name}
      lifecycle:
        depends_on:
          - resource: materialization_sets.serving_online

  model_serving_endpoints:
    event_endpoint:
      name: event-features
      config:
        served_entities:
          - entity_name: ${resources.feature_specs.event_features.name}
            workload_size: Small
            scale_to_zero_enabled: true
```

##### Python

```python
def load_resources(bundle: Bundle) -> Resources:
    resources = Resources()

    resources.add_feature_spec(
        'event_features',
        FeatureSpec(
            name='${var.catalog}.${var.schema}.event_features',
            features=[
                Features(
                    declarative_feature=DeclarativeFeature(
                        feature='${resources.features.events_90m.full_name}'
                    )
                ),
                Features(
                    declarative_feature=DeclarativeFeature(
                        feature='${resources.features.amount_sum_90m.full_name}'
                    )
                ),
            ],
            lifecycle=Lifecycle(
                depends_on=[DependsOn(resource='materialization_sets.serving_online')]
            ),
        ),
    )

    resources.add_model_serving_endpoint(
        'event_endpoint',
        ModelServingEndpoint(
            name='event-features',
            config=EndpointCoreConfigInput(
                served_entities=[
                    ServedEntityInput(
                        entity_name='${resources.feature_specs.event_features.name}',
                        workload_size='Small',
                        scale_to_zero_enabled=True,
                    )
                ]
            ),
        ),
    )

    return resources
```

The following example defines a `FeatureSpec` that looks up two features from a feature table and computes a third with a Python UDF. The feature table and the UDF are not bundle resources, so create them outside the bundle before you deploy the bundle. See [Create a `FeatureSpec`](https://docs.databricks.com/aws/en/machine-learning/feature-store/feature-function-serving.md#create-a-featurespec).

##### YAML

```yaml
resources:
  feature_specs:
    user_features_spec:
      name: ${var.catalog}.${var.schema}.user_features_spec
      features:
        - feature_lookup:
            table: ${var.catalog}.${var.schema}.user_features
            lookup_keys: [user_id]
            feature_names: [age, country]
        - feature_function:
            udf: ${var.catalog}.${var.schema}.age_score
            input_bindings:
              - parameter: age
                bound_feature: age
            output: age_score
```

##### Python

```python
def load_resources(bundle: Bundle) -> Resources:
    resources = Resources()

    resources.add_feature_spec(
        'user_features_spec',
        FeatureSpec(
            name='${var.catalog}.${var.schema}.user_features_spec',
            features=[
                Features(
                    feature_lookup=FeatureLookup(
                        table='${var.catalog}.${var.schema}.user_features',
                        lookup_keys=['user_id'],
                        feature_names=['age', 'country'],
                    )
                ),
                Features(
                    feature_function=FeatureFunction(
                        udf='${var.catalog}.${var.schema}.age_score',
                        input_bindings=[
                            FeatureFunctionInputBinding(parameter='age', bound_feature='age')
                        ],
                        output='age_score',
                    )
                ),
            ],
        ),
    )

    return resources
```

## <a id="genie_spaces" />genie\_space

**`Type: Map`**

The Genie agent resource allows you to define [Genie agents](https://docs.databricks.com/api/workspace/genie/createspace) in a bundle. For more information about Genie agents, see [Genie Agents](https://docs.databricks.com/aws/en/genie-agents/index.md).

Genie spaces are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.genie\_spaces](https://databricks.github.io/cli/python/databricks.bundles.genie_spaces.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define Genie agents is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.3.0*

```yaml
genie_spaces:
  <genie_space-name>:
    <genie_space-field-name>: <genie_space-field-value>
```

| Key                | Type     | Description                                                                                                                                                                                                                                                                                         |
| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `description`      | String   | The Genie agent description.<br />*Added in Databricks CLI version 1.3.0*                                                                                                                                                                                                                           |
| `file_path`        | String   | The path to a local file (for example, `sales_analytics.geniespace.json`) that will be used instead of the `serialized_space` entry.                                                                                                                                                                |
| `lifecycle`        | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.3.0*                               |
| `parent_path`      | String   | The parent folder path where the Genie agent will be registered.<br />*Added in Databricks CLI version 1.3.0*                                                                                                                                                                                       |
| `permissions`      | Sequence | The Genie agent permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 1.3.0*                                                                                                                         |
| `serialized_space` | String   | Required. The contents of the Genie Agent in serialized string form. This field provides the structure of the JSON string that represents the space's layout and components. If `file_path` is specified, it takes precedence over `serialized_space`.<br />*Added in Databricks CLI version 1.3.0* |
| `title`            | String   | An optional title override for the Genie agent.<br />*Added in Databricks CLI version 1.3.0*                                                                                                                                                                                                        |
| `warehouse_id`     | String   | Required. The ID of the SQL warehouse to associate with the new space.<br />*Added in Databricks CLI version 1.3.0*                                                                                                                                                                                 |

#### Examples

The following example defines a Genie agent resource:

```yaml
# databricks.yml
bundle:
  name: nyc-taxi-genie
  engine: direct # genie_spaces require the direct deployment engine

resources:
  genie_spaces:
    nyc_taxi_genie:
      title: 'NYC Taxi Trip Analysis'
      description: 'Ask questions about NYC taxi trip data in natural language'
      warehouse_id: <warehouse-id>
      file_path: ./nyc_taxi_genie.geniespace.json
      permissions:
        - level: CAN_RUN
          group_name: users
```

The corresponding `nyc_taxi_genie.geniespace.json` file holds the serialized definition of the space, including its data sources, instructions, and sample questions. It can also be specified in YAML in the `serialized_space` key instead.

```json
// nyc_taxi_genie.geniespace.json
{
  "version": 2,
  "config": {
    "sample_questions": [
      {
        "id": "11111111111111111111111111111111",
        "question": ["What is the average fare per trip?"]
      }
    ]
  },
  "data_sources": {
    "tables": [
      {
        "identifier": "samples.nyctaxi.trips",
        "column_configs": [
          { "column_name": "fare_amount" },
          { "column_name": "pickup_zip" },
          { "column_name": "tpep_pickup_datetime" },
          { "column_name": "trip_distance" }
        ]
      }
    ]
  },
  "instructions": {
    "text_instructions": [
      {
        "id": "22222222222222222222222222222222",
        "content": ["Fare amounts are in USD. When asked about revenue, use SUM(fare_amount)."]
      }
    ]
  }
}
```

## <a id="instance_pools" />instance\_pool

**`Type: Map`**

The instance\_pool resource allows you to define [instance pools](https://docs.databricks.com/api/workspace/instancepools/create) in a bundle. An instance pool keeps a set of idle, ready-to-use cloud instances so that clusters attached to the pool start and scale faster. For information about instance pools, see [Connect to pools](https://docs.databricks.com/aws/en/compute/pool-index.md).

Instance pools are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.instance\_pools](https://databricks.github.io/cli/python/databricks.bundles.instance_pools.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define instance pools is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.9.0*

```yaml
instance_pools:
  <instance_pool-name>:
    <instance_pool-field-name>: <instance_pool-field-value>
```

| Key                                     | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| --------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aws_attributes`                        | Map      | Attributes related to instance pools running on Amazon Web Services. If not specified at pool creation, a set of default values is used. See [instance\_pool.aws\_attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pool-aws_attributes).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                         |
| `azure_attributes`                      | Map      | Attributes related to instance pools running on Azure. If not specified at pool creation, a set of default values is used. See [instance\_pool.azure\_attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pool-azure_attributes).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                   |
| `custom_tags`                           | Map      | Additional tags for pool resources. Databricks tags all pool resources (for example, AWS instances and EBS volumes) with these tags in addition to `default_tags`. Databricks allows at most 45 custom tags.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                           |
| `disk_spec`                             | Map      | The specification of the disks to attach to all Spark containers. See [instance\_pool.disk\_spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pool-disk_spec).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                          |
| `enable_elastic_disk`                   | Boolean  | Autoscaling local storage: when enabled, instances in this pool dynamically acquire additional disk space when their Spark workers are running low on disk space. In AWS, this feature requires specific AWS permissions to function correctly.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                        |
| `gcp_attributes`                        | Map      | Attributes related to instance pools running on Google Cloud Platform. If not specified at pool creation, a set of default values is used. See [instance\_pool.gcp\_attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pool-gcp_attributes).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                       |
| `idle_instance_autotermination_minutes` | Integer  | Automatically terminates the extra instances in the pool cache after they are inactive for this time in minutes, if the `min_idle_instances` requirement is already met. If not set, the extra pool instances are automatically terminated after a default timeout. If specified, the threshold must be between `0` and `10000` minutes. Set this value to `0` to instantly remove idle instances from the cache if the minimum cache size can still be held.<br />*Added in Databricks CLI version 1.9.0*          |
| `instance_pool_name`                    | String   | Required. The pool name. The pool name must be unique, and its length must be between 1 and 100 characters.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                            |
| `lifecycle`                             | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                               |
| `max_capacity`                          | Integer  | The maximum number of outstanding instances to keep in the pool, including both instances used by clusters and idle instances. Clusters that require further instance provisioning fail during upsize requests.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                        |
| `min_idle_instances`                    | Integer  | The minimum number of idle instances to keep in the instance pool.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                     |
| `node_type_flexibility`                 | Map      | Flexible node type configuration for the pool. See [instance\_pool.node\_type\_flexibility](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pool-node_type_flexibility).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                    |
| `node_type_id`                          | String   | Required. This field encodes, through a single value, the resources available to each of the Spark nodes in the clusters that use this pool. For example, the Spark nodes can be provisioned and optimized for memory or compute intensive workloads. A list of available node types can be retrieved by using the [List node types API](https://docs.databricks.com/api/workspace/clusters/listnodetypes). The node type cannot be changed after the pool is created.<br />*Added in Databricks CLI version 1.9.0* |
| `permissions`                           | Sequence | The instance pool permissions. Allowed levels are `CAN_MANAGE` and `CAN_ATTACH_TO`. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                  |
| `preloaded_docker_images`               | Sequence | The custom Docker images to preload on the pool instances. See [instance\_pool.preloaded\_docker\_images](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#instance_pool-preloaded_docker_images).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                    |
| `preloaded_spark_versions`              | Sequence | A list containing at most one preloaded Spark image version for the pool. Pool-backed clusters started with the preloaded Spark version start faster. A list of available Spark versions can be retrieved by using the [List available Spark versions API](https://docs.databricks.com/api/workspace/clusters/sparkversions).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                          |
| `remote_disk_throughput`                | Integer  | The configurable throughput, in MB per second, for the remote disk. Currently only supported for GCP `HYPERDISK_BALANCED` types.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                       |
| `total_initial_remote_disk_size`        | Integer  | The total initial volume size, in GB, of the remote disks. Currently only supported for GCP `HYPERDISK_BALANCED` types.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                |

### <a id="instance_pool-aws_attributes" />instance\_pool.aws\_attributes

**`Type: Map`**

Attributes related to instance pools running on Amazon Web Services. If not specified at pool creation, a set of default values is used.

*Added in Databricks CLI version 1.9.0*

| Key                      | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `availability`           | String  | The availability type used for the spot nodes. Valid values are `SPOT` and `ON_DEMAND`.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `instance_profile_arn`   | String  | (Beta) All AWS instances belonging to the instance pool have this instance profile. If omitted, instances are initially launched with the workspace's default instance profile. If defined, clusters that use the pool inherit the instance profile and must not specify their own instance profile on cluster creation or update. If the pool does not specify an instance profile, clusters using the pool can specify any instance profile. The instance profile must have previously been added to the Databricks environment by an account administrator. This feature may only be available to certain customer plans.<br />*Added in Databricks CLI version 1.9.0* |
| `spot_bid_price_percent` | Integer | Calculates the bid price for AWS spot instances, as a percentage of the corresponding instance type's on-demand price. For example, if this field is set to `50` and the pool needs a new `r3.xlarge` spot instance, then the bid price is half the price of an on-demand `r3.xlarge` instance. If not specified, the default value is `100`. This field must be no more than `10000`.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                       |
| `zone_id`                | String  | Identifier for the availability zone/datacenter in which the pool resides, for example `us-west-2a`. The provided availability zone must be in the same region as the Databricks deployment. This is an optional field, and if not specified, a default zone is used. The list of available zones as well as the default value can be found by using the [List zones API](https://docs.databricks.com/api/workspace/clusters/listzones).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                     |

### <a id="instance_pool-azure_attributes" />instance\_pool.azure\_attributes

**`Type: Map`**

Attributes related to instance pools running on Azure. If not specified at pool creation, a set of default values is used.

*Added in Databricks CLI version 1.9.0*

| Key                          | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `availability`               | String | The availability type used for the spot nodes. Valid values are `SPOT_AZURE` and `ON_DEMAND_AZURE`.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `capacity_reservation_group` | String | The Azure capacity reservation group resource ID to use for launching VMs in this pool. When specified, VMs are launched using the provided capacity reservation. Omitting this field clears any existing configured capacity reservation group on the pool.<br />Capacity reservations can only be specified when the workspace uses an injected VNet (a customer-defined VNet not managed by Databricks). The `databricks-login-prod` Enterprise Application must be granted the following four permissions:<br /><ul><li>`Microsoft.Compute/capacityReservationGroups/read`</li><li>`Microsoft.Compute/capacityReservationGroups/deploy/action`</li><li>`Microsoft.Compute/capacityReservationGroups/capacityReservations/read`</li><li>`Microsoft.Compute/capacityReservationGroups/capacityReservations/deploy/action`</li></ul><br />Use the format `/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}`.<br />*Added in Databricks CLI version 1.9.0* |
| `spot_bid_max_price`         | Number | The maximum price for Azure spot instances, in US dollars (USD). For example, the value `2` sets a max price of $2.00 USD per hour. Set the max price to `-1` so that the VM isn't evicted based on price. The price for the VM is the current price for spot or the price for a standard VM, whichever is less, as long as there is capacity and quota available.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

### <a id="instance_pool-disk_spec" />instance\_pool.disk\_spec

**`Type: Map`**

The specification of the disks to attach to all Spark containers.

*Added in Databricks CLI version 1.9.0*

| Key               | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `disk_count`      | Integer | The number of disks launched for each instance. This feature is only enabled for supported node types, and you can choose up to the limit of the disks supported by the node type. For node types with no OS disk, at least one disk must be specified, otherwise cluster creation fails.<br />If disks are attached, Databricks configures Spark to use only the disks for scratch storage, because heterogenously sized scratch devices can lead to inefficient disk utilization. If no disks are attached, Databricks configures Spark to use instance store disks. If disks are specified, then the Spark configuration `spark.local.dir` is overridden.<br />Disks are mounted at `/ebs0`, `/ebs1`, and so on for AWS, and at `/remote_volume0`, `/remote_volume1`, and so on for Azure.<br />*Added in Databricks CLI version 1.9.0* |
| `disk_iops`       | Integer | The number of IOPS to provision for each attached disk.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `disk_size`       | Integer | The size of each disk, in GiB, launched for each instance. Values must fall into the supported range for a particular instance type. For AWS, general purpose SSD is 100–4096 GiB and throughput optimized HDD is 500–4096 GiB. For Azure, Premium LRS (SSD) is 1–1023 GiB and Standard LRS (HDD) is 1–1023 GiB.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `disk_throughput` | Integer | The disk throughput to provision for each attached disk, in MB per second.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `disk_type`       | Map     | The type of disks to launch with the pool instances. Set either `azure_disk_volume_type` (valid values are `PREMIUM_LRS` and `STANDARD_LRS`) or `ebs_volume_type` (valid values are `GENERAL_PURPOSE_SSD` and `THROUGHPUT_OPTIMIZED_HDD`).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

### <a id="instance_pool-gcp_attributes" />instance\_pool.gcp\_attributes

**`Type: Map`**

Attributes related to instance pools running on Google Cloud Platform. If not specified at pool creation, a set of default values is used.

*Added in Databricks CLI version 1.9.0*

| Key                | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gcp_availability` | String  | Determines whether the instance pool contains preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. Valid values are `PREEMPTIBLE_GCP`, `ON_DEMAND_GCP`, and `PREEMPTIBLE_WITH_FALLBACK_GCP`.<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                                                        |
| `local_ssd_count`  | Integer | If provided, each node in the instance pool has this number of local SSDs attached. Each local SSD is 375 GB in size. For the supported number of local SSDs for each instance type, see the [GCP documentation](https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds).<br />*Added in Databricks CLI version 1.9.0*                                                                                                                                                                                                                                                                                |
| `zone_id`          | String  | Identifier for the availability zone/datacenter in which the pool resides, for example `us-west1-a`. The provided availability zone must be in the same region as the Databricks workspace. This is an optional field, and if not specified, a default zone is used. Set this field to `HA` for high availability, which spreads nodes across availability zones for the Databricks deployment region, or to one of the [available zones](https://cloud.google.com/compute/docs/regions-zones) for the machine type and region. If empty, Databricks picks an availability zone.<br />*Added in Databricks CLI version 1.9.0* |

### <a id="instance_pool-node_type_flexibility" />instance\_pool.node\_type\_flexibility

**`Type: Map`**

Flexible node type configuration for the pool.

*Added in Databricks CLI version 1.9.0*

| Key                       | Type     | Description                                                                                                                                                               |
| ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `alternate_node_type_ids` | Sequence | A list of node type IDs to use as fallbacks when the primary node type is unavailable.<br />*Added in Databricks CLI version 1.9.0*                                       |
| `aws_context_id`          | String   | The AWS Context ID for EC2 Fleet. When set (non-empty), the value is passed to AWS CreateFleet API to create the EC2 Fleet.<br />*Added in Databricks CLI version 1.16.0* |

### <a id="instance_pool-preloaded_docker_images" />instance\_pool.preloaded\_docker\_images

**`Type: Sequence`**

The custom Docker images to preload on the pool instances.

*Added in Databricks CLI version 1.9.0*

| Key          | Type   | Description                                                                                                                 |
| ------------ | ------ | --------------------------------------------------------------------------------------------------------------------------- |
| `basic_auth` | Map    | Basic authentication for the Docker repository. Set `username` and `password`.<br />*Added in Databricks CLI version 1.9.0* |
| `url`        | String | The URL of the Docker image.<br />*Added in Databricks CLI version 1.9.0*                                                   |

#### Example

The following example defines an instance pool and a cluster that uses it:

```yaml
resources:
  instance_pools:
    my_pool:
      instance_pool_name: my-pool
      node_type_id: i3.xlarge
      min_idle_instances: 2
      max_capacity: 10
      idle_instance_autotermination_minutes: 15
      preloaded_spark_versions:
        - '15.4.x-scala2.12'

  clusters:
    my_cluster:
      cluster_name: my-cluster
      instance_pool_id: ${resources.instance_pools.my_pool.id}
      spark_version: '15.4.x-scala2.12'
      num_workers: 2
```

## <a id="jobs" />job

**`Type: Map`**

The job resource allows you to define [jobs and their corresponding tasks](https://docs.databricks.com/api/workspace/jobs/create) in your bundle.

Jobs are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.jobs](https://databricks.github.io/cli/python/databricks.bundles.jobs.html).

For information about jobs, see [Lakeflow Jobs](https://docs.databricks.com/aws/en/jobs/index.md). For a tutorial that uses a Declarative Automation Bundles template to create a job, see [Develop a job with Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/jobs-tutorial.md).

```yaml
jobs:
  <job-name>:
    <job-field-name>: <job-field-value>
```

| Key                     | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `budget_policy_id`      | String   | The id of the user-specified budget policy to use for this job. If not specified, a default budget policy may be applied when creating or modifying the job. See `effective_budget_policy_id` for the budget policy used by this workload.<br />*Added in Databricks CLI version 0.231.0*                                                                                                                                                                                                                                                                                                                                                                                   |
| `continuous`            | Map      | An optional continuous property for this job. The continuous property will ensure that there is always one run executing. Only one of `schedule` and `continuous` can be used. Pipelines started by a continuous job also run continuously, regardless of their own pipeline mode setting. See [continuous](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-continuous).                                                                                                                                                                                                                                                                              |
| `deployment`            | Map      | Deployment information for jobs managed by external sources. See [deployment](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-deployment).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `description`           | String   | An optional description for the job. The maximum length is 27700 characters in UTF-8 encoding.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `email_notifications`   | Map      | An optional set of email addresses that is notified when runs of this job begin or complete as well as when this job is deleted. See [email\_notifications](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-email_notifications).                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `environment_variables` | Sequence | (Beta) Named environment-variable entries that tasks can reference by key. Each entry's `spec` holds inline variables and optional `.env` files. A maximum of 10 entries can be specified per job, and a task can reference at most one entry. See [environment\_variables](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-environment_variables).<br />*Added in Databricks CLI version 1.20.0*                                                                                                                                                                                                                                                     |
| `environments`          | Sequence | A list of task execution environment specifications that can be referenced by serverless tasks of this job. An environment is required to be present for serverless tasks. For serverless notebook tasks, the environment is accessible in the notebook environment panel. For other serverless tasks, the task environment is required to be specified using environment\_key in the task settings. See [environments](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-environments).                                                                                                                                                                |
| `format`                | String   | Deprecated. The format of the job.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `git_source`            | Map      | An optional specification for a remote Git repository containing the source code used by tasks. See [job.git\_source](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-git_source).<br />**Important:** The `git_source` field and task `source` field set to `GIT` are not recommended for bundles, because local relative paths may not point to the same content in the Git repository, and bundles expect that a deployed job has the same content as the local copy from where it was deployed.<br />Instead, clone the repository locally and set up your bundle project within this repository, so that the source for tasks are the workspace. |
| `health`                | Map      | An optional set of health rules that can be defined for this job. See [health](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-health).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `job_clusters`          | Sequence | A list of job cluster specifications that can be shared and reused by tasks of this job. See [job\_clusters](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-job_clusters).                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `lifecycle`             | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                                                                                                                                                                                                                     |
| `max_concurrent_runs`   | Integer  | An optional maximum allowed number of concurrent runs of the job. Set this value if you want to be able to execute multiple runs of the same job concurrently.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `name`                  | String   | An optional name for the job. The maximum length is 4096 bytes in UTF-8 encoding.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `notification_settings` | Map      | Optional notification settings that are used when sending notifications to each of the `email_notifications` and `webhook_notifications` for this job. See [notification\_settings](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-notification_settings).                                                                                                                                                                                                                                                                                                                                                                                           |
| `parameters`            | Sequence | Job-level parameter definitions. See [job.parameters](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-parameters).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `performance_target`    | String   | Defines how performant or cost efficient the execution of the run on serverless should be.<br />*Added in Databricks CLI version 0.241.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `permissions`           | Sequence | The job's permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `queue`                 | Map      | The queue settings of the job. See [queue](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-queue).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `run_as`                | Map      | The identity that the job runs as. This field indicates the explicit configuration of `run_as` for the job. If not specified, the job runs as the user who created the job. Specify exactly one of `user_name`, `service_principal_name`, or `group_name`. If more than one is specified, an error is thrown. See [Set Run as to a group](https://docs.databricks.com/aws/en/jobs/privileges.md#run-as-group).                                                                                                                                                                                                                                                              |
| `schedule`              | Map      | An optional periodic schedule for this job. The default behavior is that the job only runs when triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`. See [schedule](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-schedule).                                                                                                                                                                                                                                                                                                                                                                                       |
| `tags`                  | Map      | A map of tags associated with the job. These are forwarded to the cluster as cluster tags for jobs clusters, and are subject to the same limitations as cluster tags. A maximum of 25 tags can be added to the job.                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `tasks`                 | Sequence | A list of task specifications to be executed by this job. See [Add tasks to jobs in Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/job-task-types.md).<br />*Added in Databricks CLI version 0.237.0*                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `timeout_seconds`       | Integer  | An optional timeout applied to each run of this job. A value of `0` means no timeout.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `trigger`               | Map      | A configuration to trigger a run when certain conditions are met. See [trigger](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-trigger).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `triggers`              | Sequence | (Beta) A list of triggers attached to this job. A run starts when any active trigger evaluates to true. Cannot be set in the same request as the legacy `schedule`, `trigger`, or `continuous` fields. Gated behind the "Multiple Triggers" feature preview. See [job.triggers](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-triggers).<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                                                                                                                                              |
| `usage_policy_id`       | String   | The ID of the serverless usage policy to use for this job.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `webhook_notifications` | Map      | A collection of system notification IDs to notify when runs of this job begin or complete. See [webhook\_notifications](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-webhook_notifications).                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

### <a id="job-continuous" />job.continuous

**`Type: Map`**

Configuration for continuous job execution.

| Key                  | Type   | Description                                                                                                                                                      |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `maintenance_window` | Map    | Defines when platform-initiated maintenance may run for this job. If unspecified, maintenance may run at any time.<br />*Added in Databricks CLI version 1.16.0* |
| `pause_status`       | String | Whether the continuous job is paused or not. Valid values: `PAUSED`, `UNPAUSED`.                                                                                 |
| `task_retry_mode`    | String | Indicate how the continuous job is applying task level retries. Valid values are `NEVER` and `ON_FAILURE`. Defaults to `NEVER`.                                  |

### <a id="job-deployment" />job.deployment

**`Type: Map`**

Deployment information for jobs managed by external sources.

| Key                  | Type   | Description                                       |
| -------------------- | ------ | ------------------------------------------------- |
| `kind`               | String | The kind of deployment. For example, `BUNDLE`.    |
| `metadata_file_path` | String | The path to the metadata file for the deployment. |

### <a id="job-email_notifications" />job.email\_notifications

**`Type: Map`**

Email notification settings for job runs.

| Key                                      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ---------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `on_start`                               | Sequence | A list of email addresses to notify when a run starts.                                                                                                                                                                                                                                                                                                                                                                                              |
| `on_success`                             | Sequence | A list of email addresses to notify when a run succeeds.                                                                                                                                                                                                                                                                                                                                                                                            |
| `on_failure`                             | Sequence | A list of email addresses to notify when a run fails.                                                                                                                                                                                                                                                                                                                                                                                               |
| `on_duration_warning_threshold_exceeded` | Sequence | A list of email addresses to notify when a run duration exceeds the warning threshold.                                                                                                                                                                                                                                                                                                                                                              |
| `no_alert_for_skipped_runs`              | Boolean  | Whether to skip sending alerts for skipped runs.                                                                                                                                                                                                                                                                                                                                                                                                    |
| `on_streaming_backlog_exceeded`          | Sequence | A list of email addresses to notify when any streaming backlog thresholds are exceeded for any stream. Streaming backlog thresholds can be set in the `health` field using the following metrics: `STREAMING_BACKLOG_BYTES`, `STREAMING_BACKLOG_RECORDS`, `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is based on the 10-minute average of these metrics. If the issue persists, notifications are resent every 30 minutes. |
| `on_maintenance_start`                   | Sequence | A list of email addresses to notify when platform-initiated maintenance starts for a continuous job.<br />*Added in Databricks CLI version 1.20.0*                                                                                                                                                                                                                                                                                                  |
| `on_maintenance_complete`                | Sequence | A list of email addresses to notify when platform-initiated maintenance completes for a continuous job.<br />*Added in Databricks CLI version 1.20.0*                                                                                                                                                                                                                                                                                               |

### <a id="job-environment_variables" />job.environment\_variables

**`Type: Sequence`**

(Beta) Named environment-variable entries that tasks can reference by key from `environment_variables_key`. A maximum of 10 entries can be specified per job, and a task can reference at most one entry.

*Added in Databricks CLI version 1.20.0*

Each item in the list is a `JobEnvironmentVariables`:

| Key                         | Type   | Description                                                                                                                                                                                               |
| --------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `environment_variables_key` | String | Required. Identifier for this entry. Must be unique within the job's `environment_variables`. Tasks reference it from the task `environment_variables_key`.<br />*Added in Databricks CLI version 1.20.0* |
| `spec`                      | Map    | The environment variable specification.<br />*Added in Databricks CLI version 1.20.0*                                                                                                                     |

### <a id="job-environments" />job.environments

**`Type: Sequence`**

A list of task execution environment specifications that can be referenced by serverless tasks of a job.

Each item in the list is a `JobEnvironment`:

| Key               | Type   | Description                                                                                                                                                                                                                                |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `environment_key` | String | The key of an environment. It has to be unique within a job.                                                                                                                                                                               |
| `spec`            | Map    | The environment specification, including the environment version and the dependencies to install before a task runs. See [job.environments.spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-environments-spec). |

#### <a id="job-environments-spec" />job.environments.spec

**`Type: Map`**

The environment specification, including the environment version and the dependencies to install before a task runs.

| Key                   | Type     | Description                                                                                                                                                                               |
| --------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `client`              | String   | Deprecated. The client version.                                                                                                                                                           |
| `dependencies`        | Sequence | List of pip dependencies, as supported by the version of pip in this environment.                                                                                                         |
| `environment_version` | String   | Required. Environment version used by the environment. Each version comes with a specific Python version and a set of Python packages. The version is a string, consisting of an integer. |

### <a id="job-git_source" />job.git\_source

**`Type: Map`**

Git repository configuration for job source code.

| Key               | Type   | Description                                                                                                                                                                                                                                      |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `git_branch`      | String | The name of the branch to be checked out and used by this job. This field cannot be specified in conjunction with `git_tag` or `git_commit`.                                                                                                     |
| `git_commit`      | String | Commit to be checked out and used by this job. This field cannot be specified in conjunction with `git_branch` or `git_tag`.                                                                                                                     |
| `git_provider`    | String | Unique identifier of the service used to host the Git repository. The value is case insensitive. Valid values are `gitHub`, `bitbucketCloud`, `gitLab`, `azureDevOpsServices`, `gitHubEnterprise`, `bitbucketServer`, `gitLabEnterpriseEdition`. |
| `git_snapshot`    | Map    | Read-only state of the remote repository at the time the job was run. This field is only included on job runs. See [git\_snapshot](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-git_source-git_snapshot).               |
| `git_tag`         | String | Name of the tag to be checked out and used by this job. This field cannot be specified in conjunction with `git_branch` or `git_commit`.                                                                                                         |
| `git_url`         | String | URL of the repository to be cloned by this job.                                                                                                                                                                                                  |
| `sparse_checkout` | Map    | Sparse checkout configuration for the Git repository. See [job.git\_source.sparse\_checkout](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-git_source-sparse_checkout).<br />*Added in Databricks CLI version 0.290.0*   |

#### <a id="job-git_source-sparse_checkout" />job.git\_source.sparse\_checkout

**`Type: Map`**

Sparse checkout configuration for the Git repository. When set, only the directories listed in `patterns` are checked out.

*Added in Databricks CLI version 0.290.0*

| Key        | Type     | Description                                                                                     |
| ---------- | -------- | ----------------------------------------------------------------------------------------------- |
| `patterns` | Sequence | List of patterns to include for sparse checkout.<br />*Added in Databricks CLI version 0.290.0* |

#### <a id="job-git_source-git_snapshot" />job.git\_source.git\_snapshot

**`Type: Map`**

Read-only commit information snapshot.

| Key           | Type   | Description                                                                                                                                                                                                    |
| ------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `used_commit` | String | Commit that was used to execute the run. If `git_branch` was specified, this points to the HEAD of the branch at the time of the run; if `git_tag` was specified, this points to the commit the tag points to. |

### <a id="job-health" />job.health

**`Type: Map`**

Health monitoring configuration for the job.

| Key     | Type     | Description                                                                                                                                                                                            |
| ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `rules` | Sequence | A list of job health rules. Each rule contains a `metric` and `op` (operator) and `value`. See [job.health.rules](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-health-rules). |

#### <a id="job-health-rules" />job.health.rules

**`Type: Sequence`**

The health rules to evaluate for each run.

Each item in the list is a `JobHealthRule`:

| Key      | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `metric` | String  | Specifies the health metric that is being evaluated for a particular health rule.<br /><ul><li>`RUN_DURATION_SECONDS`: Expected total time for a run in seconds.</li><li>`STREAMING_BACKLOG_BYTES`: An estimate of the maximum bytes of data waiting to be consumed across all streams.</li><li>`STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset lag across all streams.</li><li>`STREAMING_BACKLOG_SECONDS`: An estimate of the maximum consumer delay across all streams.</li><li>`STREAMING_BACKLOG_FILES`: An estimate of the maximum number of outstanding files across all streams.</li></ul> |
| `op`     | String  | Specifies the operator used to compare the health metric value with the specified threshold.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `value`  | Integer | Specifies the threshold value that the health metric should obey to satisfy the health rule.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

### <a id="job-job_clusters" />job.job\_clusters

**`Type: Sequence`**

A list of job cluster specifications that can be shared and reused by tasks of this job. Libraries cannot be declared in a shared job cluster. You must declare dependent libraries in task settings.

Each item in the list is a `JobCluster`:

| Key                  | Type   | Description                                                                                                                                                                                                                                                                                                                                        |
| -------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `job_cluster_key`    | String | A unique name for the job cluster. This field is required and must be unique within the job. `JobTaskSettings` may refer to this field to determine which cluster to launch for the task execution.                                                                                                                                                |
| `new_cluster`        | Map    | If new\_cluster, a description of a cluster that is created for each task. See [cluster](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#cluster).                                                                                                                                                                               |
| `serverless_compute` | Map    | (Beta) Serverless compute settings for this cluster. Its one key, `policy_id`, is the ID of the serverless compute policy to apply to the cluster. At most one job cluster per job can set this key. The rate limit defined on the referenced policy applies across all tasks bound to this cluster.<br />*Added in Databricks CLI version 1.24.0* |

### <a id="job-notification_settings" />job.notification\_settings

**`Type: Map`**

Notification settings that apply to all notifications for the job.

| Key                          | Type    | Description                                       |
| ---------------------------- | ------- | ------------------------------------------------- |
| `no_alert_for_skipped_runs`  | Boolean | Whether to skip sending alerts for skipped runs.  |
| `no_alert_for_canceled_runs` | Boolean | Whether to skip sending alerts for canceled runs. |

### <a id="job-parameters" />job.parameters

**`Type: Sequence`**

A list of job parameter definitions.

Each item in the list is a `JobParameter`:

| Key       | Type   | Description                                                                                                                              |
| --------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `default` | String | Required. Default value of the parameter, for example, "users".                                                                          |
| `name`    | String | Required. The name of the defined parameter, for example, "table". Valid values only contain alphanumeric characters, `_`, `-`, and `.`. |

### <a id="job-queue" />job.queue

**`Type: Map`**

Queue settings for the job.

| Key       | Type    | Description                             |
| --------- | ------- | --------------------------------------- |
| `enabled` | Boolean | Whether to enable queueing for the job. |

### <a id="job-schedule" />job.schedule

**`Type: Map`**

Schedule configuration for periodic job execution.

| Key                      | Type   | Description                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `quartz_cron_expression` | String | A Cron expression using Quartz syntax that specifies when the job runs. For example, `0 0 9 * * ?` runs the job every day at 9:00 AM UTC.                                                                                                                                                                                                                     |
| `timezone_id`            | String | The timezone for the schedule. For example, `America/Los_Angeles` or `UTC`.                                                                                                                                                                                                                                                                                   |
| `pause_status`           | String | Whether the schedule is paused or not. Valid values: `PAUSED`, `UNPAUSED`.                                                                                                                                                                                                                                                                                    |
| `sql_condition`          | Map    | (Beta) A SQL condition that must be satisfied before a scheduled run is triggered. The condition is evaluated after the cron expression fires and must return a truthy result for the run to proceed. See [sql\_condition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-sql_condition).<br />*Added in Databricks CLI version 1.7.0* |

### <a id="job-trigger" />job.trigger

**`Type: Map`**

Trigger configuration for event-driven job execution.

| Key              | Type   | Description                                                                                                                                                                                                                                                                                                                                                    |
| ---------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `file_arrival`   | Map    | Trigger based on file arrival. See [file\_arrival](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-trigger-file_arrival).                                                                                                                                                                                                                |
| `job_completion` | Map    | (Beta) Trigger based on the completion of upstream jobs. See [job\_completion](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-job_completion).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                            |
| `table`          | Map    | Trigger based on a table. See [table](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-trigger-table).                                                                                                                                                                                                                                    |
| `table_update`   | Map    | Trigger based on table updates. See [table\_update](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-trigger-table_update).                                                                                                                                                                                                               |
| `periodic`       | Map    | Periodic trigger. See [periodic](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-trigger-periodic).                                                                                                                                                                                                                                      |
| `pause_status`   | String | Whether the trigger is paused or not. Valid values: `PAUSED`, `UNPAUSED`.                                                                                                                                                                                                                                                                                      |
| `sql_condition`  | Map    | (Beta) A SQL condition that must be satisfied for the trigger to fire. It can be used in combination with other trigger types, and runs after the conditions of the other trigger types are evaluated. See [sql\_condition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-sql_condition).<br />*Added in Databricks CLI version 1.7.0* |

#### <a id="job-trigger-file_arrival" />job.trigger.file\_arrival

**`Type: Map`**

Trigger configuration based on file arrival.

| Key                                 | Type    | Description                                                        |
| ----------------------------------- | ------- | ------------------------------------------------------------------ |
| `url`                               | String  | The file path to monitor for new files.                            |
| `min_time_between_triggers_seconds` | Integer | Minimum time in seconds between trigger events.                    |
| `wait_after_last_change_seconds`    | Integer | Wait time in seconds after the last file change before triggering. |

#### <a id="job-trigger-table" />job.trigger.table

**`Type: Map`**

Trigger configuration based on a table.

| Key           | Type     | Description                                            |
| ------------- | -------- | ------------------------------------------------------ |
| `table_names` | Sequence | A list of table names to monitor.                      |
| `condition`   | String   | The SQL condition that must be met to trigger the job. |

#### <a id="job-trigger-table_update" />job.trigger.table\_update

**`Type: Map`**

Trigger configuration based on table updates.

| Key                              | Type     | Description                                                         |
| -------------------------------- | -------- | ------------------------------------------------------------------- |
| `table_names`                    | Sequence | A list of table names to monitor for updates.                       |
| `condition`                      | String   | The SQL condition that must be met to trigger the job.              |
| `wait_after_last_change_seconds` | Integer  | Wait time in seconds after the last table update before triggering. |

#### <a id="job-trigger-periodic" />job.trigger.periodic

**`Type: Map`**

Periodic trigger configuration.

| Key        | Type    | Description                                                                |
| ---------- | ------- | -------------------------------------------------------------------------- |
| `interval` | Integer | The interval value for the periodic trigger.                               |
| `unit`     | String  | The unit of time for the interval. Valid values: `HOURS`, `DAYS`, `WEEKS`. |

#### <a id="job-sql_condition" />job.trigger.sql\_condition

**`Type: Map`**

(Beta) A SQL condition that gates a job trigger or schedule. The condition is evaluated by running a SQL query on a SQL warehouse. The same keys are available in `schedule.sql_condition`, `trigger.sql_condition`, and `triggers.sql_condition`.

*Added in Databricks CLI version 1.7.0*

| Key            | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sql_query_id` | String | The ID of the SQL query to evaluate as the condition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `trigger_mode` | String | How the query result is interpreted to decide whether the condition is met. Set this key explicitly for new configurations. Valid values are:<br /><ul><li>`QUERY_RETURNS_ROWS`: The condition is met whenever the result set has at least one row.</li><li>`RESULT_VALUE_CHANGES`: The condition is met whenever the query's single result value differs from the previous evaluation. The first evaluation stores the result as a baseline and does not fire. The query must return exactly one row and one column.</li></ul> |
| `warehouse_id` | String | Required. The ID of the SQL warehouse to run the condition query on.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |

#### <a id="job-job_completion" />job.trigger.job\_completion

**`Type: Map`**

(Beta) A trigger that starts a run after every upstream job completes with a configured status. The same keys are available in `trigger.job_completion` and `triggers.job_completion`.

*Added in Databricks CLI version 1.24.0*

| Key         | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                   |
| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `if_status` | String   | The status that all upstream jobs must have before the trigger fires. Valid values are `SUCCESS`, `FAILED`, and `DONE`. Defaults to `SUCCESS`.                                                                                                                                                                                                                                                |
| `jobs`      | Sequence | Required. The upstream jobs to monitor. Each item has a required `job_id` key with the ID of the upstream job and a required `workspace_id` key with the ID of the workspace that contains it. Each job must be in a workspace attached to the same Unity Catalog metastore as the downstream job, and the user must have `CAN VIEW` permission on it. A maximum of 10 jobs can be monitored. |

### <a id="job-triggers" />job.triggers

**`Type: Sequence`**

A list of triggers attached to this job. A run starts when any active trigger evaluates to true. Exactly one trigger type must be set on each item. Cannot be set in the same request as the legacy `schedule`, `trigger`, or `continuous` fields.

*Added in Databricks CLI version 1.13.0*

Each item in the list is a trigger:

| Key              | Type   | Description                                                                                                                                                                                                                      |
| ---------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `continuous`     | Map    | (Beta) Continuous trigger configuration.<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                           |
| `file_arrival`   | Map    | (Beta) File arrival trigger configuration.<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                         |
| `job_completion` | Map    | (Beta) Job completion trigger configuration. See [job\_completion](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-job_completion).<br />*Added in Databricks CLI version 1.24.0*                          |
| `pause_status`   | String | (Beta) Whether this trigger is paused. Defaults to `UNPAUSED` when unset. Valid values are `UNPAUSED` and `PAUSED`.<br />*Added in Databricks CLI version 1.13.0*                                                                |
| `periodic`       | Map    | (Beta) Periodic trigger configuration.<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                             |
| `schedule`       | Map    | (Beta) Cron schedule trigger configuration.<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                        |
| `sql_condition`  | Map    | (Beta) An optional SQL condition that gates whether this trigger fires. See [sql\_condition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job-sql_condition).<br />*Added in Databricks CLI version 1.13.0* |
| `table_update`   | Map    | (Beta) Table update trigger configuration.<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                         |

### <a id="job-webhook_notifications" />job.webhook\_notifications

**`Type: Map`**

Webhook notification settings for job runs.

| Key                                      | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `on_start`                               | Sequence | A list of webhook notification IDs to notify when a run starts.                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `on_success`                             | Sequence | A list of webhook notification IDs to notify when a run succeeds.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `on_failure`                             | Sequence | A list of webhook notification IDs to notify when a run fails.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `on_duration_warning_threshold_exceeded` | Sequence | A list of webhook notification IDs to notify when a run duration exceeds the warning threshold.                                                                                                                                                                                                                                                                                                                                                                                                         |
| `on_streaming_backlog_exceeded`          | Sequence | A list of system notification IDs to call when any streaming backlog thresholds are exceeded for any stream. Streaming backlog thresholds can be set in the `health` field using the following metrics: `STREAMING_BACKLOG_BYTES`, `STREAMING_BACKLOG_RECORDS`, `STREAMING_BACKLOG_SECONDS`, or `STREAMING_BACKLOG_FILES`. Alerting is based on the 10-minute average of these metrics. If the issue persists, notifications are resent every 30 minutes. A maximum of 3 destinations can be specified. |
| `on_maintenance_start`                   | Sequence | An optional list of system notification IDs to call when platform-initiated maintenance starts for a continuous job. A maximum of 3 destinations can be specified for the `on_maintenance_start` property.<br />*Added in Databricks CLI version 1.20.0*                                                                                                                                                                                                                                                |
| `on_maintenance_complete`                | Sequence | An optional list of system notification IDs to call when platform-initiated maintenance completes for a continuous job. A maximum of 3 destinations can be specified for the `on_maintenance_complete` property.<br />*Added in Databricks CLI version 1.20.0*                                                                                                                                                                                                                                          |

#### Examples

The following example defines a job with the resource key `hello-job` with one notebook task:

```yaml
resources:
  jobs:
    hello-job:
      name: hello-job
      tasks:
        - task_key: hello-task
          notebook_task:
            notebook_path: ./hello.py
```

The following example defines a job with a SQL notebook:

```yaml
resources:
  jobs:
    job_with_sql_notebook:
      name: 'Job to demonstrate using a SQL notebook with a SQL warehouse'
      tasks:
        - task_key: notebook
          notebook_task:
            notebook_path: ./select.sql
            warehouse_id: 799f096837fzzzz4
```

For additional job configuration examples, see [Job configuration](https://docs.databricks.com/aws/en/dev-tools/bundles/examples.md#job).

For information about defining job tasks and overriding job settings, see:

* [Add tasks to jobs in Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/job-task-types.md)
* [Job task settings override](https://docs.databricks.com/aws/en/dev-tools/bundles/overrides.md#job-task)

## <a id="job_runs" />job\_run

**`Type: Map`**

The job\_run resource triggers a run of an existing job as part of bundle deployment. Unlike a [job](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#jobs), which defines a job, a job run references an existing job by ID.

Job runs are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.job\_runs](https://databricks.github.io/cli/python/databricks.bundles.job_runs.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define job runs is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.7.0*

```yaml
job_runs:
  <job_run-name>:
    <job_run-field-name>: <job_run-field-value>
```

| Key                  | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `job_id`             | Integer  | Required. The ID of the job to run.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                                                                                                                                                                                                               |
| `job_parameters`     | Map      | The job-level parameters used in the run, for example `param: overriding_val`.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                                                                                                                                                                    |
| `lifecycle`          | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                          |
| `only`               | Sequence | A list of task keys to run inside of the job. If this field is not provided, all tasks in the job are run.<br />Prefix a task key with `+` to also run its upstream tasks, or suffix it with `+` to also run its downstream tasks. For example, `+my_task` runs `my_task` and everything upstream of it, `my_task+` runs `my_task` and everything downstream of it, and `+my_task+` runs both. A task key with no `+` runs only that task.<br />*Added in Databricks CLI version 1.7.0*        |
| `performance_target` | String   | The performance mode on a serverless job. The performance target determines the level of compute performance or cost-efficiency for the run, and overrides the performance target defined at the job level. Valid values are `STANDARD`, which enables cost-efficient execution of serverless workloads, and `PERFORMANCE_OPTIMIZED`, which prioritizes fast startup and execution times through rapid scaling and optimized cluster performance.<br />*Added in Databricks CLI version 1.7.0* |
| `pipeline_params`    | Map      | The refresh settings for a pipeline task in the run. See [job\_run.pipeline\_params](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#job_run-pipeline_params).<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                                                                  |
| `queue`              | Map      | The queue settings of the run. Set `enabled` to `true` to enable queueing for the run.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                                                                                                                                                            |

### <a id="job_run-pipeline_params" />job\_run.pipeline\_params

**`Type: Map`**

The refresh settings for a pipeline task in the run.

*Added in Databricks CLI version 1.7.0*

| Key                          | Type     | Description                                                                                                                                                                                                                                        |
| ---------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `full_refresh`               | Boolean  | Whether to trigger a full refresh on the Spark declarative pipeline.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                  |
| `full_refresh_selection`     | Sequence | A list of tables to update with a full refresh.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                       |
| `refresh_flow_selection`     | Sequence | The flow names to selectively refresh. These are combined with the other selective refresh options, `refresh_selection` and `full_refresh_selection`, to determine the final set of flows to refresh.<br />*Added in Databricks CLI version 1.7.0* |
| `refresh_selection`          | Sequence | A list of tables to update without a full refresh.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                    |
| `reset_checkpoint_selection` | Sequence | A list of streaming flows for which to reset checkpoints without clearing data.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                       |

#### Example

The following example triggers a run of an existing job, overriding one job parameter and limiting the run to a single task and its upstream tasks:

```yaml
resources:
  job_runs:
    my_job_run:
      job_id: 123456789
      job_parameters:
        catalog: main
      only:
        - +my_task
```

## <a id="materialization_sets" />materialization\_set

> [!NOTE]
> **Preview**
>
> This feature is in [Private Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md). To try it, reach out to your Databricks contact.

**`Type: Map`**

The materialization\_set resource allows you to define materialization sets in a bundle. A materialization set produces feature data. It lists the [Feature Views](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#features) to materialize and, for each one, the offline or online store to write to. Databricks creates and manages the Lakeflow pipelines that populate those stores. For information about materializing features, see [Materialize Feature Views](https://docs.databricks.com/aws/en/machine-learning/feature-store/materialized-features.md).

Each entry in `materialized_features` is one materialized feature member of the set. A Feature View contributes one member per destination, so a Feature View materialized to both offline and online is declared as two materialized features. A Feature View with a `sawtooth` window contributes three. See [Rules a materialization set must satisfy](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_set-rules). Grouping members in one set tells Databricks that they can be computed together, so it packs them into the fewest tables and Lakeflow pipelines that hold them. For a tutorial, see [Manage Feature Views using Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/feature-store-tutorial.md).

Materialization sets are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.materialization\_sets](https://databricks.github.io/cli/python/databricks.bundles.materialization_sets.html).

> [!NOTE]
>
> This resource requires the direct deployment engine. See [Resource compatibility](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md#resource-compatibility).

*Added in Databricks CLI version 1.24.0*

```yaml
materialization_sets:
  <materialization_set-name>:
    materialized_features:
      - <materialized_feature-field-name>: <materialized_feature-field-value>
```

| Key                     | Type     | Description                                                                                                                                                                                                                                                                           |
| ----------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lifecycle`             | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.24.0*                |
| `materialized_features` | Sequence | Required. The members of the set, one per Feature View and destination. See [materialization\_set.materialized\_features](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_set-materialized_features).<br />*Added in Databricks CLI version 1.24.0* |

### <a id="materialization_set-materialized_features" />materialization\_set.materialized\_features

**`Type: Sequence`**

One member of the set: the Feature View it materializes, the store its data is written to, and how it is refreshed. Set exactly one of `offline_store_config` or `online_store_config`, and at most one trigger.

*Added in Databricks CLI version 1.24.0*

| Key                     | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ----------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `budget_policy_id`      | String | The budget policy the materialization pipeline is billed against. See [Attribute usage with serverless usage policies](https://docs.databricks.com/aws/en/admin/usage/budget-policies.md).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                             |
| `cron_schedule_trigger` | Map    | Refresh the member on a schedule. See [materialization\_set.materialized\_features.cron\_schedule\_trigger](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_set-cron_schedule_trigger).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                              |
| `feature_name`          | String | Required. The three-level Unity Catalog name of the Feature View to materialize. Use a reference to a Feature View declared in the same bundle, such as `${resources.features.<feature-name>.full_name}`, so that the bundle creates the Feature View before the set that materializes it.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                             |
| `offline_store_config`  | Map    | Write the feature data to Unity Catalog tables for training and batch scoring. See [materialization\_set.materialized\_features.offline\_store\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_set-offline_store_config).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                   |
| `online_store_config`   | Map    | Write the feature data to an online store for low-latency serving. See [materialization\_set.materialized\_features.online\_store\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_set-online_store_config).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                 |
| `streaming_mode`        | Map    | Refresh the member continuously from a streaming source. See [materialization\_set.materialized\_features.streaming\_mode](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#materialization_set-streaming_mode).<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                      |
| `table_trigger`         | Map    | Refresh the member when its source table changes.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `tags`                  | Map    | Custom tags to associate with this materialization. They are applied to the materialization job (for batch features) or pipeline (for streaming features) and forwarded to the underlying compute as cluster tags, so materialization cost can be attributed in the billing system tables. These tags are not applied to the Unity Catalog Feature itself. A maximum of 25 tags is supported, and keys and values are subject to the same limitations as cluster tags.<br />*Added in Databricks CLI version 1.24.0* |

### <a id="materialization_set-offline_store_config" />materialization\_set.materialized\_features.offline\_store\_config

**`Type: Map`**

The Unity Catalog location the offline feature tables are written to. These keys are accepted on write and not returned on read.

*Added in Databricks CLI version 1.24.0*

| Key                 | Type   | Description                                                                                                                                                                                                           |
| ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `catalog_name`      | String | Required. The catalog to write the offline tables to.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                   |
| `schema_name`       | String | Required. The schema to write the offline tables to.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                    |
| `table_name_prefix` | String | Required. The prefix of the generated table names. Databricks appends a suffix, so the table is named `<table_name_prefix>_<suffix>` rather than `<table_name_prefix>`.<br />*Added in Databricks CLI version 1.24.0* |

### <a id="materialization_set-online_store_config" />materialization\_set.materialized\_features.online\_store\_config

**`Type: Map`**

The online store the feature data is published to. For information about online stores, see [Databricks Online Feature Stores](https://docs.databricks.com/aws/en/machine-learning/feature-store/online-feature-store.md).

*Added in Databricks CLI version 1.24.0*

| Key                 | Type   | Description                                                                                                                                                                               |
| ------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `catalog_name`      | String | Required. The catalog of the online table. Accepted on write and not returned on read.<br />*Added in Databricks CLI version 1.24.0*                                                      |
| `online_store_name` | String | Required. The name of the online store to publish to.<br />*Added in Databricks CLI version 1.24.0*                                                                                       |
| `schema_name`       | String | Required. The schema of the online table. Accepted on write and not returned on read.<br />*Added in Databricks CLI version 1.24.0*                                                       |
| `table_name_prefix` | String | Required. The prefix of the generated online table names, to which Databricks appends a suffix. Accepted on write and not returned on read.<br />*Added in Databricks CLI version 1.24.0* |

### <a id="materialization_set-cron_schedule_trigger" />materialization\_set.materialized\_features.cron\_schedule\_trigger

**`Type: Map`**

Refreshes the member on a schedule.

*Added in Databricks CLI version 1.24.0*

| Key               | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ----------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cron_expression` | String | A Quartz cron expression, such as `0 0 * * * ?`. Required when `mode` is `MANUAL`, and must not be set when `mode` is `DERIVED`.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                      |
| `mode`            | String | Valid values are `MANUAL`, which uses the `cron_expression` you supply, and `DERIVED`, where Databricks chooses a schedule from the feature definition. Databricks recommends `DERIVED`, which runs the pipeline after the data each window needs is expected to have arrived. `DERIVED` is not supported for a `column_selection` feature on an `sdp_source`, or for a `last` aggregation over a `rolling` window that materializes only to an online store. Those require `MANUAL`.<br />*Added in Databricks CLI version 1.24.0* |
| `timezone_id`     | String | The timezone the schedule is evaluated in. Defaults to UTC. When `mode` is `DERIVED`, `timezone_id` must be UTC if set.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                                                                                                                                                                                                                                                               |

### <a id="materialization_set-streaming_mode" />materialization\_set.materialized\_features.streaming\_mode

**`Type: Map`**

Refreshes the member continuously from a streaming source. A member with `streaming_mode` set takes no `cron_schedule_trigger`.

*Added in Databricks CLI version 1.24.0*

| Key                | Type   | Description                                                                                                                                                                                                                                                    |
| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `freshness_target` | String | How stale the materialized data is allowed to become, as a duration such as `60s`.<br />*Added in Databricks CLI version 1.24.0*                                                                                                                               |
| `mode`             | String | Valid values are `STREAMING_MODE_TYPE_RTM` for real-time materialization and `STREAMING_MODE_TYPE_MBM` for micro-batch materialization.<br />`STREAMING_MODE_TYPE_MBM` requires an Amazon Kinesis stream source.<br />*Added in Databricks CLI version 1.24.0* |

### <a id="materialization_set-rules" />Rules a materialization set must satisfy

A create request is rejected unless all of the following hold:

* Every Feature View in the set specifies the same offline destination and the same online destination. A set writes to one offline destination and, optionally, one online destination, so Feature Views with different offline or online destinations belong in separate sets.
* The set does not mix Feature Views materialized in batch with Feature Views materialized in streaming mode. A streaming Feature View with a `sawtooth` window is the exception. Its batch and streaming materialized features belong in the same set.
* A Feature View's offline and online destination configs differ in at least one of `catalog_name`, `schema_name`, or `table_name_prefix`.
* A Feature View whose aggregation uses a `sawtooth` window contributes exactly three materialized feature members: an offline materialized feature, an online materialized feature, and an online streaming materialized feature. The `cron_schedule_trigger` of the batch offline and batch online materialized features must be set to `DERIVED`, and the batch online and streaming online materialized features must use the same online destination config. Declaring a subset of the three materialized features is rejected.

Because the Feature Views in a bundle are created before the materialization set that materializes them, a set rejected for one of these reasons leaves its Feature Views in place. Run `databricks bundle destroy` to remove them, or correct the set and deploy again.

### <a id="materialization_set-updates" />Changing a materialization set

The API resolves and applies the change made in the supplied materialization set. The following table describes what each kind of configuration change does on `databricks bundle deploy`, which asks for confirmation before it replaces or deletes a set, and does not proceed without your approval or `--auto-approve`.

| Change                                                                                                | Result                                                                                                                                                                                       |
| ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Remove all materialized feature members belonging to the same Feature View in a set                   | Applied in place. The remaining materialized features in the materialization set keep their identity and their materialized data.                                                            |
| Remove some but not all materialized feature members of a Feature View in a set                       | Rejected. Deleting a Feature View's offline materialized feature cascades to its online materialized features, so all of that Feature View's materialized features must be removed together. |
| Add a materialized feature member to an existing set                                                  | Replaces the set. Every materialized feature in it is destroyed and recomputed, including members whose configuration did not change.                                                        |
| Change any key of any materialized feature member, including a trigger, `tags`, or `budget_policy_id` | Replaces the set. Every materialized feature in it is destroyed and recomputed, including members whose configuration did not change.                                                        |
| Redeploy with no configuration change                                                                 | No action.                                                                                                                                                                                   |

#### Example

The following example materializes one Feature View both offline and online. The `feature_name` references the Feature View declared in the same bundle, which makes the bundle create the Feature View first. The two destinations use different prefixes, which the server requires.

##### YAML

```yaml
resources:
  materialization_sets:
    transactions:
      materialized_features:
        - feature_name: ${resources.features.transaction_count.full_name}
          offline_store_config:
            catalog_name: ${var.catalog}
            schema_name: ${var.schema}
            table_name_prefix: transaction_count_offline
          cron_schedule_trigger:
            mode: DERIVED
        - feature_name: ${resources.features.transaction_count.full_name}
          online_store_config:
            online_store_name: ${var.online_store}
            catalog_name: ${var.catalog}
            schema_name: ${var.schema}
            table_name_prefix: transaction_count_online
          cron_schedule_trigger:
            mode: DERIVED
```

##### Python

```python
def load_resources(bundle: Bundle) -> Resources:
    resources = Resources()

    resources.add_materialization_set(
        'transactions',
        MaterializationSet(
            materialized_features=[
                MaterializedFeature(
                    feature_name='${resources.features.transaction_count.full_name}',
                    offline_store_config=OfflineStoreConfig(
                        catalog_name='${var.catalog}',
                        schema_name='${var.schema}',
                        table_name_prefix='transaction_count_offline',
                    ),
                    cron_schedule_trigger=CronSchedule(mode=CronScheduleMode.DERIVED),
                ),
                MaterializedFeature(
                    feature_name='${resources.features.transaction_count.full_name}',
                    online_store_config=OnlineStoreConfig(
                        online_store_name='${var.online_store}',
                        catalog_name='${var.catalog}',
                        schema_name='${var.schema}',
                        table_name_prefix='transaction_count_online',
                    ),
                    cron_schedule_trigger=CronSchedule(mode=CronScheduleMode.DERIVED),
                ),
            ]
        ),
    )

    return resources
```

## <a id="mcp_services" />mcp\_service

**`Type: Map`**

The MCP service resource allows you to define [MCP services](https://docs.databricks.com/api/ai-gateway/v1/mcp-service) in a bundle. An MCP service registers an external Model Context Protocol (MCP) server through a Unity Catalog connection and exposes its tools through Unity Gateway.

MCP services are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.mcp\_services](https://databricks.github.io/cli/python/databricks.bundles.mcp_services.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define MCP services is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.17.0*

```yaml
mcp_services:
  <mcp_service-name>:
    <mcp_service-field-name>: <mcp_service-field-value>
```

| Key              | Type     | Description                                                                                                                                                                                                                                                                                                                                |
| ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `comment`        | String   | A comment or description for the MCP service.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                |
| `config`         | Map      | Operational configuration for an MCP service. Groups the source reference, tool selectors, and rate limits, which configure how the MCP service behaves at invocation time. See [mcp\_service.config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#mcp_service-config).<br />*Added in Databricks CLI version 1.17.0* |
| `grants`         | Sequence | The grants associated with the MCP service. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                           |
| `lifecycle`      | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.17.0*                                                                     |
| `mcp_service_id` | String   | Required. The ID to use for the MCP service. This becomes the final component of the service's resource name.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                |
| `parent`         | String   | Required. The Unity Catalog schema in which to create the MCP service, in the format `schemas/{catalog}.{schema}`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                           |

### <a id="mcp_service-config" />mcp\_service.config

**`Type: Map`**

Operational configuration for an MCP service. Groups the source reference, tool selectors, and rate limits, which configure how the MCP service behaves at invocation time.

*Added in Databricks CLI version 1.17.0*

| Key                      | Type     | Description                                                                                                                                                                                                                                                                                      |
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `include_tool_selectors` | Sequence | Tool names or prefix patterns to expose from the MCP server. Use exact tool names or prefix patterns such as `read_*`. An empty list exposes all tools. At most 1,024 selectors are allowed, and each selector can contain at most 256 characters.<br />*Added in Databricks CLI version 1.17.0* |
| `rate_limits`            | Sequence | Rate limits for tool invocations. Supported scopes are user, group, service principal, the service as a whole, and each user by default. Request and token limits are supported. Empty when no rate limit is configured.<br />*Added in Databricks CLI version 1.17.0*                           |
| `source_connection`      | Map      | Unity Catalog connection referencing the MCP server. Required on create.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                           |

#### Example

```yaml
resources:
  mcp_services:
    my_mcp:
      parent: schemas/main.default
      mcp_service_id: test_mcp_1
      comment: 'Points at a Unity Catalog connection hosting an MCP server'
      config:
        source_connection:
          name: connections/main.default.mcp_conn_1
```

## <a id="models" />model (legacy)

**`Type: Map`**

The model resource allows you to define [legacy models](https://docs.databricks.com/api/workspace/modelregistry/createmodel) in bundles. Databricks recommends you use Unity Catalog [registered models](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#registered_models) instead.

## <a id="model_provider_services" />model\_provider\_service

**`Type: Map`**

The model provider service resource allows you to define [model provider services](https://docs.databricks.com/api/ai-gateway/v1/model-provider-service) in a bundle. A model provider service configures authentication and routing to an external model provider, such as OpenAI, Azure OpenAI, Anthropic, or Amazon Bedrock, through Unity Gateway.

Model provider services are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.model\_provider\_services](https://databricks.github.io/cli/python/databricks.bundles.model_provider_services.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define model provider services is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.17.0*

```yaml
model_provider_services:
  <model_provider_service-name>:
    <model_provider_service-field-name>: <model_provider_service-field-value>
```

| Key                         | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| --------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `comment`                   | String   | A comment or description for the model provider service.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `config`                    | Map      | Behavioral configuration for the model provider service: provider authentication and provider-specific fields, the catalog of models this provider service can route to, and the passthrough policy that governs how request headers, query parameters, and unmanaged subpaths cross the trust boundary to the upstream provider. See [model\_provider\_service.config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_provider_service-config).<br />*Added in Databricks CLI version 1.17.0* |
| `grants`                    | Sequence | The grants associated with the model provider service. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                             |
| `lifecycle`                 | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                  |
| `model_provider_service_id` | String   | Required. The ID to use for the model provider service. This becomes the final component of the service's resource name.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                  |
| `parent`                    | String   | Required. The Unity Catalog schema in which to create the model provider service, in the format `schemas/{catalog}.{schema}`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                             |

### <a id="model_provider_service-config" />model\_provider\_service.config

**`Type: Map`**

Behavioral configuration for the model provider service.

*Added in Databricks CLI version 1.17.0*

| Key                        | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `allow_all_targets`        | Boolean  | When `true`, allows models from the provider's built-in model catalog in addition to explicit `targets`. When `false`, only models listed in `targets` are routable. Defaults to `false`. `CUSTOM` providers have no built-in model catalog, so they must leave this `false` and list their models in `targets`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                           |
| `amazon_bedrock`           | Map      | The configuration for Amazon Bedrock. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_AMAZON_BEDROCK`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `anthropic`                | Map      | The configuration for Anthropic. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_ANTHROPIC`. Exactly one of `direct` or `relayed` must be set on create. The two are mutually exclusive.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                |
| `azure_openai`             | Map      | The configuration for Azure OpenAI. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_AZURE_OPENAI`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `bedrock_mantle`           | Map      | The configuration for Amazon Bedrock Mantle, with the same keys as `amazon_bedrock`. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_BEDROCK_MANTLE`.<br />*Added in Databricks CLI version 1.21.0*                                                                                                                                                                                                                                                                                                                                                                                                   |
| `custom`                   | Map      | The configuration for a custom OpenAI-compatible provider. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_CUSTOM`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `forward_headers`          | Boolean  | Whether to forward incoming HTTP headers to the upstream provider. Defaults to false and is configured for the entire provider service, not per request. Upstream authentication is configured separately in the provider-specific configuration.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                          |
| `forward_query_parameters` | Boolean  | Whether to forward incoming query parameters to the upstream provider. Defaults to false and is configured for the entire provider service, not per request.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                               |
| `forward_unmanaged_paths`  | Boolean  | Whether to proxy paths that Unity Gateway does not recognize as configured provider-native API types. Defaults to false. When true, these paths are forwarded unchanged to the upstream provider. When false, only recognized API paths are served. Enabling this broadens the upstream API surface exposed through the provider service. Unity Gateway cannot evaluate service policies on opaque unmanaged requests, so unmanaged requests are rejected whenever service policies are attached to this securable.<br />*Added in Databricks CLI version 1.17.0*                                                        |
| `gemini_enterprise`        | Map      | The configuration for Google Gemini Enterprise. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_GEMINI_ENTERPRISE`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `inference_table`          | Map      | Payload logging configuration for requests sent directly to this provider service. Requests routed through a model service are captured by that model service's inference table instead.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                   |
| `microsoft_foundry`        | Map      | The configuration for Microsoft Foundry. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_MICROSOFT_FOUNDRY`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `openai`                   | Map      | The configuration for OpenAI. Set this key when `provider_type` is `EXTERNAL_MODEL_PROVIDER_TYPE_OPENAI`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `pricing`                  | Map      | Pricing configuration for this provider service. Contains `default_discount_basis_points`, a provider-wide adjustment to external-model spend estimates in basis points (for example, `2000` is 20% off and `-2000` is a 20% markup). An explicitly empty configuration is retained on create and update and applies no adjustment.<br />*Added in Databricks CLI version 1.21.0*                                                                                                                                                                                                                                        |
| `provider_type`            | String   | External model provider. Required on create and immutable thereafter. Set the matching provider-specific configuration, such as `openai`, `azure_openai`, or `amazon_bedrock`. Valid values are `EXTERNAL_MODEL_PROVIDER_TYPE_OPENAI`, `EXTERNAL_MODEL_PROVIDER_TYPE_AZURE_OPENAI`, `EXTERNAL_MODEL_PROVIDER_TYPE_ANTHROPIC`, `EXTERNAL_MODEL_PROVIDER_TYPE_AMAZON_BEDROCK`, `EXTERNAL_MODEL_PROVIDER_TYPE_CUSTOM`, `EXTERNAL_MODEL_PROVIDER_TYPE_MICROSOFT_FOUNDRY`, `EXTERNAL_MODEL_PROVIDER_TYPE_GEMINI_ENTERPRISE`, and `EXTERNAL_MODEL_PROVIDER_TYPE_BEDROCK_MANTLE`.<br />*Added in Databricks CLI version 1.17.0* |
| `rate_limits`              | Sequence | Rate limits for requests sent directly to this provider service. Requests routed through a model service use that model service's rate limits instead.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `targets`                  | Sequence | Models and provider-native API types exposed by this provider service. Each entry must include at least one `native_api_types` value. When `allow_all_targets` is false, at least one entry is required and model service destinations can reference only listed models. When `allow_all_targets` is true, models from the provider's built-in model catalog are also routable. `CUSTOM` providers must explicitly list their models here and cannot enable `allow_all_targets`.<br />*Added in Databricks CLI version 1.17.0*                                                                                           |

#### Example

```yaml
resources:
  model_provider_services:
    my_model_provider_service:
      parent: schemas/main.myschema
      model_provider_service_id: myservice
      comment: comment1
      config:
        provider_type: EXTERNAL_MODEL_PROVIDER_TYPE_CUSTOM
        targets:
          - model: gpt-4o
            native_api_types:
              - openai/v1/chat/completions
        custom:
          direct:
            base_url: https://api.example.com/v1
            api_key:
              plaintext: my-api-key
```

## <a id="model_services" />model\_service

**`Type: Map`**

The model service resource allows you to define [model services](https://docs.databricks.com/api/ai-gateway/v1/model-service) in a bundle. A model service is a governed Unity Gateway endpoint that routes requests to one or more destinations, such as a model provider service or a Databricks foundation model.

Model services are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.model\_services](https://databricks.github.io/cli/python/databricks.bundles.model_services.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define model services is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.17.0*

```yaml
model_services:
  <model_service-name>:
    <model_service-field-name>: <model_service-field-value>
```

| Key                | Type     | Description                                                                                                                                                                                                                                                            |
| ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `comment`          | String   | A comment or description for the model service.<br />*Added in Databricks CLI version 1.17.0*                                                                                                                                                                          |
| `config`           | Map      | Operational configuration wrapped around the model service resource. See [model\_service.config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_service-config).<br />*Added in Databricks CLI version 1.17.0*                                |
| `grants`           | Sequence | The grants associated with the model service. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 1.17.0*                                                                                     |
| `lifecycle`        | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.17.0* |
| `model_service_id` | String   | Required. The ID to use for the model service. This becomes the final component of the service's resource name.<br />*Added in Databricks CLI version 1.17.0*                                                                                                          |
| `parent`           | String   | Required. The Unity Catalog schema in which to create the model service, in the format `schemas/{catalog}.{schema}`.<br />*Added in Databricks CLI version 1.17.0*                                                                                                     |

### <a id="model_service-config" />model\_service.config

**`Type: Map`**

Operational configuration wrapped around the model service resource.

*Added in Databricks CLI version 1.17.0*

| Key               | Type     | Description                                                                                                                                                                                   |
| ----------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `inference_table` | Map      | The configuration for logging request and response payloads to a Unity Catalog inference table. Omit this key to leave payload logging off.<br />*Added in Databricks CLI version 1.17.0*     |
| `rate_limits`     | Sequence | Rate limits applied to requests routed through this model service.<br />*Added in Databricks CLI version 1.17.0*                                                                              |
| `routing`         | Map      | The routing configuration: the primary destinations that receive traffic, and the fallback destinations tried when a primary destination fails.<br />*Added in Databricks CLI version 1.17.0* |

#### Examples

```yaml
resources:
  model_services:
    my_model_service:
      parent: schemas/main.default
      model_service_id: test_ms_1
      comment: 'Routes chat traffic to a foundation model'
      config:
        routing:
          destinations:
            - name: primary
              destination_type: DESTINATION_TYPE_PAY_PER_TOKEN_FOUNDATION_MODEL
              pay_per_token_config:
                model: models/system.ai.databricks-gpt-5
              traffic_percentage: 100
```

## <a id="model_serving_endpoints" />model\_serving\_endpoint

**`Type: Map`**

The model\_serving\_endpoint resource allows you to define [model serving endpoints](https://docs.databricks.com/api/workspace/servingendpoints/create). See [Manage model serving endpoints](https://docs.databricks.com/aws/en/machine-learning/model-serving/manage-serving-endpoints.md).

Model serving endpoints are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.model\_serving\_endpoints](https://databricks.github.io/cli/python/databricks.bundles.model_serving_endpoints.html).

```yaml
model_serving_endpoints:
  <model_serving_endpoint-name>:
    <model_serving_endpoint-field-name>: <model_serving_endpoint-field-value>
```

| Key                   | Type     | Description                                                                                                                                                                                                                                                                                                           |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ai_gateway`          | Map      | The AI Gateway configuration for the serving endpoint. NOTE: Only external model and provisioned throughput endpoints are currently supported. See [ai\_gateway](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-ai_gateway).<br />*Added in Databricks CLI version 0.230.0* |
| `budget_policy_id`    | String   | The ID of the budget policy to use for this endpoint.<br />*Added in Databricks CLI version 0.244.0*                                                                                                                                                                                                                  |
| `config`              | Map      | The core config of the serving endpoint. See [config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-config).                                                                                                                                                               |
| `description`         | String   | A description for the serving endpoint.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                |
| `email_notifications` | Map      | Email notifications configuration for the serving endpoint. See [email\_notifications](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-email_notifications).<br />*Added in Databricks CLI version 0.264.0*                                                                  |
| `lifecycle`           | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                               |
| `name`                | String   | The name of the serving endpoint. This field is required and must be unique across a Databricks workspace. An endpoint name can consist of alphanumeric characters, dashes, and underscores.                                                                                                                          |
| `permissions`         | Sequence | The model serving endpoint's permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).                                                                                                                                                                           |
| `rate_limits`         | Sequence | Deprecated. Rate limits to be applied to the serving endpoint. Use AI Gateway to manage rate limits.                                                                                                                                                                                                                  |
| `route_optimized`     | Boolean  | Enable route optimization for the serving endpoint.                                                                                                                                                                                                                                                                   |
| `tags`                | Sequence | Tags to be attached to the serving endpoint and automatically propagated to billing logs.                                                                                                                                                                                                                             |
| `telemetry_config`    | Map      | The configuration for persisting endpoint telemetry (logs, traces, and metrics) to Unity Catalog tables. See [telemetry\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-telemetry_config).<br />*Added in Databricks CLI version 1.6.0*                             |

### <a id="model_serving_endpoint-telemetry_config" />model\_serving\_endpoint.telemetry\_config

**`Type: Map`**

The configuration for persisting endpoint telemetry (logs, traces, and metrics) to Unity Catalog tables.

*Added in Databricks CLI version 1.6.0*

| Key                          | Type     | Description                                                                                                                                                                                                                        |
| ---------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enabled_telemetry_features` | Sequence | The telemetry signals to enable for this endpoint. If empty or omitted, all signals are enabled; otherwise only the listed signals are enabled.<br />*Added in Databricks CLI version 1.14.0*                                      |
| `inference_table_config`     | Map      | The configuration for inference table payload logging, including sampling.<br />*Added in Databricks CLI version 1.6.0*                                                                                                            |
| `table_names`                | Map      | The Unity Catalog tables to which endpoint telemetry (logs, traces, and metrics) is exported. Provide this to create a new telemetry profile for the endpoint from the given tables.<br />*Added in Databricks CLI version 1.10.0* |
| `telemetry_profile_id`       | String   | The ID of an existing telemetry profile to apply to this endpoint. Provide this to reuse a telemetry profile that has already been created, instead of specifying `table_names`.<br />*Added in Databricks CLI version 1.10.0*     |

### <a id="model_serving_endpoint-email_notifications" />model\_serving\_endpoint.email\_notifications

**`Type: Map`**

Email notifications configuration for the serving endpoint.

| Key                 | Type     | Description                                                                                                |
| ------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| `on_update_failure` | Sequence | A list of email addresses to be notified when an endpoint fails to update its configuration or state.      |
| `on_update_success` | Sequence | A list of email addresses to be notified when an endpoint successfully updates its configuration or state. |

### <a id="model_serving_endpoint-ai_gateway" />model\_serving\_endpoint.ai\_gateway

**`Type: Map`**

AI Gateway configuration for the serving endpoint.

| Key                      | Type     | Description                                                                                                                                                                                                                                                                                                               |
| ------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fallback_config`        | Map      | Configuration for traffic fallback which auto fallbacks to other served entities if the request to a served entity fails with certain error codes, to increase availability. See [fallback\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-ai_gateway-fallback_config). |
| `guardrails`             | Map      | Guardrail configuration. See [guardrails](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-ai_gateway-guardrails).                                                                                                                                                                |
| `inference_table_config` | Map      | Configuration for inference logging to Unity Catalog tables. See [inference\_table\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-ai_gateway-inference_table_config).                                                                                                  |
| `rate_limits`            | Sequence | Rate limit configurations.                                                                                                                                                                                                                                                                                                |
| `usage_tracking_config`  | Map      | Configuration for tracking usage. See [usage\_tracking\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-ai_gateway-usage_tracking_config).                                                                                                                               |

#### <a id="model_serving_endpoint-ai_gateway-fallback_config" />model\_serving\_endpoint.ai\_gateway.fallback\_config

**`Type: Map`**

Configuration for traffic fallback which auto fallbacks to other served entities if a request fails with certain error codes.

| Key       | Type    | Description                                    |
| --------- | ------- | ---------------------------------------------- |
| `enabled` | Boolean | Whether fallback is enabled for this endpoint. |

#### <a id="model_serving_endpoint-ai_gateway-guardrails" />model\_serving\_endpoint.ai\_gateway.guardrails

**`Type: Map`**

The AI gateway guardrails configuration.

| Key                | Type     | Description                                                       |
| ------------------ | -------- | ----------------------------------------------------------------- |
| `input`            | Map      | Input guardrails configuration with fields like `safety`, `pii`.  |
| `output`           | Map      | Output guardrails configuration with fields like `safety`, `pii`. |
| `invalid_keywords` | Sequence | A list of keywords to block.                                      |

#### <a id="model_serving_endpoint-ai_gateway-inference_table_config" />model\_serving\_endpoint.ai\_gateway.inference\_table\_config

**`Type: Map`**

Configuration for inference logging to Unity Catalog tables.

| Key                 | Type    | Description                                 |
| ------------------- | ------- | ------------------------------------------- |
| `catalog_name`      | String  | The name of the catalog in Unity Catalog.   |
| `schema_name`       | String  | The name of the schema in Unity Catalog.    |
| `table_name_prefix` | String  | The prefix for inference table names.       |
| `enabled`           | Boolean | Whether inference table logging is enabled. |

#### <a id="model_serving_endpoint-ai_gateway-usage_tracking_config" />model\_serving\_endpoint.ai\_gateway.usage\_tracking\_config

**`Type: Map`**

The AI gateway configuration for tracking usage.

| Key       | Type    | Description                        |
| --------- | ------- | ---------------------------------- |
| `enabled` | Boolean | Whether usage tracking is enabled. |

### <a id="model_serving_endpoint-config" />model\_serving\_endpoint.config

**`Type: Map`**

The core configuration of the serving endpoint.

| Key               | Type     | Description                                                                                                                                                                                                                  |
| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `served_entities` | Sequence | A list of served entities for the endpoint to serve. Each served entity contains fields like `entity_name`, `entity_version`, `workload_size`, `scale_to_zero_enabled`, `workload_type`, `environment_vars`.                 |
| `served_models`   | Sequence | (Deprecated: use `served_entities` instead) A list of served models for the endpoint to serve.                                                                                                                               |
| `traffic_config`  | Map      | The traffic config defining how invocations to the serving endpoint should be routed. See [traffic\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#model_serving_endpoint-config-traffic_config). |

#### <a id="model_serving_endpoint-config-traffic_config" />model\_serving\_endpoint.config.traffic\_config

**`Type: Map`**

The traffic config defining how invocations to the serving endpoint should be routed.

| Key      | Type     | Description                                                                                                  |
| -------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `routes` | Sequence | A list of routes for traffic distribution. Each route contains `served_model_name` and `traffic_percentage`. |

#### Example

The following example defines a Unity Catalog model serving endpoint:

```yaml
resources:
  model_serving_endpoints:
    uc_model_serving_endpoint:
      name: 'uc-model-endpoint'
      config:
        served_entities:
          - entity_name: 'myCatalog.mySchema.my-ads-model'
            entity_version: '10'
            workload_size: 'Small'
            scale_to_zero_enabled: 'true'
        traffic_config:
          routes:
            - served_model_name: 'my-ads-model-10'
              traffic_percentage: '100'
      tags:
        - key: 'team'
          value: 'data science'
```

## <a id="pipelines" />pipeline

**`Type: Map`**

The pipeline resource allows you to create [pipelines](https://docs.databricks.com/api/workspace/pipelines/create).

Pipelines are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.pipelines](https://databricks.github.io/cli/python/databricks.bundles.pipelines.html).

For information about pipelines, see [Spark Declarative Pipelines on Lakeflow](https://docs.databricks.com/aws/en/ldp/index.md). For a tutorial that uses the Declarative Automation Bundles template to create a pipeline, see [Develop pipelines with Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/pipelines-tutorial.md).

```yaml
pipelines:
  <pipeline-name>:
    <pipeline-field-name>: <pipeline-field-value>
```

| Key                     | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                             |
| ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allow_duplicate_names` | Boolean  | If false, deployment will fail if name conflicts with that of another pipeline.<br />*Added in Databricks CLI version 0.261.0*                                                                                                                                                                                                                                                                                          |
| `budget_policy_id`      | String   | (Public Preview) The ID (UUID) of the serverless budget policy applied to this pipeline. Only supported for serverless pipelines.<br />*Added in Databricks CLI version 0.230.0*                                                                                                                                                                                                                                        |
| `cascade_on_destroy`    | Boolean  | Whether destroying the pipeline also deletes its datasets (materialized views, streaming tables, and views). When unset, the server default applies. Set to `false` to retain the datasets on destroy. Supported with the direct deployment engine.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                       |
| `catalog`               | String   | A catalog in Unity Catalog to publish data from this pipeline to. Tables are published to the schema set in `schema` (or the legacy `target`) inside this catalog, for example `catalog`.`schema`.`table`. Source code can also use fully qualified names to write to other schemas and catalogs. If `catalog` is not specified, the pipeline uses the legacy Hive metastore.                                           |
| `channel`               | String   | The release channel that selects the pipeline runtime version. Valid values are `CURRENT` (the default) and `PREVIEW`, which runs on the upcoming runtime release.                                                                                                                                                                                                                                                      |
| `clusters`              | Sequence | The cluster settings for this pipeline deployment. Applies to classic (non-serverless) pipelines. Omit this field when `serverless` is `true`. See [cluster](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#clusters).                                                                                                                                                                               |
| `configuration`         | Map      | The configuration for this pipeline execution.                                                                                                                                                                                                                                                                                                                                                                          |
| `deployment`            | Map      | Deployment type of this pipeline. See [deployment](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-deployment).                                                                                                                                                                                                                                                                              |
| `dry_run`               | Boolean  | Whether the pipeline is a dry run pipeline.                                                                                                                                                                                                                                                                                                                                                                             |
| `edition`               | String   | The pipeline product edition. Valid values are `CORE`, `PRO`, and `ADVANCED`. Serverless pipelines require `ADVANCED`.                                                                                                                                                                                                                                                                                                  |
| `environment`           | Map      | The environment specification for this pipeline used to install dependencies on serverless compute. See [environment](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-environment). This key is only supported in Databricks CLI version 0.258 and above.<br />*Added in Databricks CLI version 0.257.0*                                                                                     |
| `event_log`             | Map      | The event log configuration for this pipeline. See [event\_log](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-event_log).<br />*Added in Databricks CLI version 0.246.0*                                                                                                                                                                                                                   |
| `filters`               | Map      | The filters that determine which pipeline packages to include in the deployed graph. See [filters](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-filters).                                                                                                                                                                                                                                 |
| `gateway_definition`    | Map      | The configuration for a gateway pipeline. These settings cannot be used with the `ingestion_definition` settings.                                                                                                                                                                                                                                                                                                       |
| `id`                    | String   | Unique identifier for this pipeline.                                                                                                                                                                                                                                                                                                                                                                                    |
| `ingestion_definition`  | Map      | The configuration for a managed ingestion pipeline. These settings cannot be used with the `libraries`, `schema`, `target`, or `catalog` settings. See [ingestion\_definition](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition).                                                                                                                                        |
| `libraries`             | Sequence | A list of libraries or code needed by this deployment. See [pipeline.libraries](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-libraries).                                                                                                                                                                                                                                                  |
| `lifecycle`             | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                 |
| `name`                  | String   | A friendly name for this pipeline.                                                                                                                                                                                                                                                                                                                                                                                      |
| `notifications`         | Sequence | The notification settings for this pipeline. See [notifications](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-notifications).                                                                                                                                                                                                                                                             |
| `parameters`            | Map      | The default parameters to use for pipeline execution, where each key is the name of the parameter and the value is the parameter value. The maximum total size is 10k characters in JSON format.                                                                                                                                                                                                                        |
| `permissions`           | Sequence | The pipeline's permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).                                                                                                                                                                                                                                                                                           |
| `photon`                | Boolean  | Whether Photon is enabled for this pipeline. This key is ignored if `serverless` is set to `true`.                                                                                                                                                                                                                                                                                                                      |
| `restart_window`        | Map      | Defines a restart window for this pipeline. Pipelines can be restarted within this window without falling behind.                                                                                                                                                                                                                                                                                                       |
| `root_path`             | String   | The root path for this pipeline. This is used as the root directory when editing the pipeline in the Databricks user interface and it is added to sys.path when executing Python sources during pipeline execution.<br />*Added in Databricks CLI version 0.253.0*                                                                                                                                                      |
| `run_as`                | Map      | The identity that the pipeline runs as. If not specified, the pipeline runs as the user who created the pipeline. Specify exactly one of `user_name`, `service_principal_name`, or `group_name`. If more than one is specified, an error is thrown. See [Set the run-as identity to a group](https://docs.databricks.com/aws/en/ldp/configure-pipeline.md#run-as-group).<br />*Added in Databricks CLI version 0.241.0* |
| `schema`                | String   | The default schema (database) where tables are read from or published to.<br />*Added in Databricks CLI version 0.230.0*                                                                                                                                                                                                                                                                                                |
| `serverless`            | Boolean  | Whether serverless compute is enabled for this pipeline. Databricks recommends serverless compute for new pipelines. Set this to `true` to run the pipeline on serverless compute. For notebook or file pipelines, omitting this field uses classic compute configured through the `clusters` field. When `true`, omit `clusters`. Photon is always enabled for serverless pipelines.                                   |
| `storage`               | String   | The DBFS root directory for storing checkpoints and tables.                                                                                                                                                                                                                                                                                                                                                             |
| `tags`                  | Map      | A map of tags associated with the pipeline. These are forwarded to the cluster as cluster tags, and are therefore subject to the same limitations. A maximum of 25 tags can be added to the pipeline.<br />*Added in Databricks CLI version 0.256.0*                                                                                                                                                                    |
| `target`                | String   | Target schema (database) to add tables in this pipeline to. Exactly one of `schema` or `target` must be specified. To publish to Unity Catalog, also specify `catalog`. This legacy field is deprecated for pipeline creation in favor of the `schema` field.                                                                                                                                                           |
| `usage_policy_id`       | String   | The ID of the serverless usage policy to use for this pipeline.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                                                                                                                                                                          |

### <a id="pipeline-deployment" />pipeline.deployment

**`Type: Map`**

Deployment type configuration for the pipeline.

| Key                  | Type   | Description                                       |
| -------------------- | ------ | ------------------------------------------------- |
| `kind`               | String | The kind of deployment. For example, `BUNDLE`.    |
| `metadata_file_path` | String | The path to the metadata file for the deployment. |

### <a id="pipeline-environment" />pipeline.environment

**`Type: Map`**

Environment specification for installing dependencies on serverless compute.

| Key                   | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| --------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dependencies`        | Sequence | A list of pip dependencies, as supported by the version of pip in this environment. Each dependency is a [pip requirement file line](https://pip.pypa.io/en/stable/reference/requirements-file-format/).                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `environment_version` | String   | (Public Preview) The environment version of the serverless Python environment used to execute customer Python code, for example `4`. Each environment version includes a specific Python version and a curated set of pre-installed libraries with defined versions, providing a stable and reproducible execution environment. Databricks supports a three-year lifecycle for each environment version. For available versions and their included packages, see [Environment versions](https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/index.md).<br />*Added in Databricks CLI version 0.294.0* |

### <a id="pipeline-event_log" />pipeline.event\_log

**`Type: Map`**

Event log configuration for the pipeline.

| Key       | Type   | Description                                                 |
| --------- | ------ | ----------------------------------------------------------- |
| `catalog` | String | The Unity Catalog catalog the event log is published under. |
| `name`    | String | The name the event log is published to in Unity Catalog.    |
| `schema`  | String | The Unity Catalog schema the event log is published under.  |

### <a id="pipeline-filters" />pipeline.filters

**`Type: Map`**

Filters that determine which pipeline packages to include in the deployed graph.

| Key       | Type     | Description                         |
| --------- | -------- | ----------------------------------- |
| `include` | Sequence | A list of package names to include. |
| `exclude` | Sequence | A list of package names to exclude. |

### <a id="pipeline-ingestion_definition" />pipeline.ingestion\_definition

**`Type: Map`**

Configuration for a managed ingestion pipeline. These settings cannot be used with the `libraries`, `schema`, `target`, or `catalog` settings.

| Key                              | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `connection_name`                | String   | The name of the connection to use for ingestion. To create connections programmatically for connectors that support API-only authentication, use `databricks connections create` in a pre-deploy script or job task. See [Deployment](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/index.md#deployment).                                                                                                                                                                            |
| `connector_type`                 | String   | Optional. Connector type for sources. Valid values are `CDC` and `QUERY_BASED`.<br />*Added in Databricks CLI version 0.296.0*                                                                                                                                                                                                                                                                                                                                                                       |
| `data_staging_options`           | Map      | Optional. Location of staged data storage. This is required for migration from a CDC managed ingestion pipeline with a gateway pipeline to a combined CDC managed ingestion pipeline. If not specified, the volume for staged data is created in the catalog and schema/target specified in the top-level pipeline definition.<br />*Added in Databricks CLI version 0.296.0*                                                                                                                        |
| `full_refresh_window`            | Map      | Optional. A window that specifies a set of time ranges for snapshot queries in CDC.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `ingest_from_uc_foreign_catalog` | Boolean  | Immutable. If set to true, the pipeline will ingest tables from the Unity Catalog foreign catalogs directly without the need to specify a Unity Catalog connection or ingestion gateway. The `source_catalog` fields in objects of IngestionConfig are interpreted as the Unity Catalog foreign catalogs to ingest from.<br />*Added in Databricks CLI version 0.279.0*                                                                                                                              |
| `ingestion_gateway_id`           | String   | The ID of the ingestion gateway.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `objects`                        | Sequence | Required. Settings specifying tables to replicate and the destination for the replicated tables. Each object can be a [SchemaSpec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-schemaspec), [TableSpec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-tablespec), or [ReportSpec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-reportspec). |
| `source_type`                    | String   | Required when using `source_configurations`. Specifies the connector type (for example, `POSTGRESQL`, `MYSQL`).                                                                                                                                                                                                                                                                                                                                                                                      |
| `source_configurations`          | Sequence | Catalog-level source configuration parameters. When using this field, you must also specify `source_type`. See [source\_configurations](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-source_configurations).                                                                                                                                                                                                                                      |
| `table_configuration`            | Map      | Configuration for the ingestion tables. See [table\_configuration](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-table_configuration).                                                                                                                                                                                                                                                                                                             |

#### <a id="pipeline-ingestion_definition-schemaspec" />SchemaSpec

**`Type: Map`**

Schema object specification for ingesting all tables from a schema.

| Key                   | Type   | Description                                                                                                                                                                                                                          |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `source_schema`       | String | The name of the source schema to ingest.                                                                                                                                                                                             |
| `destination_catalog` | String | The name of the destination catalog in Unity Catalog.                                                                                                                                                                                |
| `destination_schema`  | String | The name of the destination schema in Unity Catalog.                                                                                                                                                                                 |
| `table_configuration` | Map    | Configuration to apply to all tables in this schema. See [pipeline.ingestion\_definition.table\_configuration](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-table_configuration). |

#### <a id="pipeline-ingestion_definition-tablespec" />TableSpec

**`Type: Map`**

Table object specification for ingesting a specific table.

| Key                   | Type   | Description                                                                                                                                                                                                            |
| --------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `source_schema`       | String | The name of the source schema containing the table.                                                                                                                                                                    |
| `source_table`        | String | The name of the source table to ingest.                                                                                                                                                                                |
| `destination_catalog` | String | The name of the destination catalog in Unity Catalog.                                                                                                                                                                  |
| `destination_schema`  | String | The name of the destination schema in Unity Catalog.                                                                                                                                                                   |
| `destination_table`   | String | The name of the destination table in Unity Catalog.                                                                                                                                                                    |
| `table_configuration` | Map    | Configuration for this specific table. See [pipeline.ingestion\_definition.table\_configuration](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-table_configuration). |

#### <a id="pipeline-ingestion_definition-reportspec" />ReportSpec

**`Type: Map`**

Report object specification for ingesting analytics reports.

| Key                   | Type   | Description                                                                                                                                                                                                         |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `source_url`          | String | The URL of the source report.                                                                                                                                                                                       |
| `source_report`       | String | The name or identifier of the source report.                                                                                                                                                                        |
| `destination_catalog` | String | The name of the destination catalog in Unity Catalog.                                                                                                                                                               |
| `destination_schema`  | String | The name of the destination schema in Unity Catalog.                                                                                                                                                                |
| `destination_table`   | String | The name of the destination table for the report data.                                                                                                                                                              |
| `table_configuration` | Map    | Configuration for the report table. See [pipeline.ingestion\_definition.table\_configuration](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-table_configuration). |

#### <a id="pipeline-ingestion_definition-source_configurations" />pipeline.ingestion\_definition.source\_configurations

**`Type: Sequence`**

Configuration for source. Each element in the sequence is a Map containing catalog-level configuration.

| Key       | Type | Description                                                                                                                                                                                  |
| --------- | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `catalog` | Map  | Catalog-level source configuration parameters. See [catalog](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-source_configurations-catalog). |

##### <a id="pipeline-ingestion_definition-source_configurations-catalog" />pipeline.ingestion\_definition.source\_configurations.catalog

**`Type: Map`**

Catalog-level source configuration parameters

| Key              | Type   | Description                                                                                                                                                                           |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `postgres`       | Map    | Postgres-specific catalog-level configuration parameters. Contains one `slot_config` key that is a `Map` representing the Postgres slot configuration to use for logical replication. |
| `source_catalog` | String | The source catalog name.                                                                                                                                                              |

#### <a id="pipeline-ingestion_definition-table_configuration" />pipeline.ingestion\_definition.table\_configuration

**`Type: Map`**

Configuration options for ingestion tables.

For the complete set of options, including connector-specific options, see the `table_configuration` field in [Create a pipeline](https://docs.databricks.com/api/workspace/pipelines/create) in the REST API reference.

| Key                            | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `auto_full_refresh_policy`     | Map      | The policy for automatically running a full refresh of the table when the pipeline encounters an issue that a full refresh can fix. If not specified, auto full refresh is disabled. See [pipeline.ingestion\_definition.table\_configuration.auto\_full\_refresh\_policy](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-table_configuration-auto_full_refresh_policy). |
| `clustering_columns`           | Sequence | A list of column names to cluster the destination table by. This field is mutually exclusive with `enable_auto_clustering`. See [Enable liquid clustering](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/clustering.md).                                                                                                                                                                                  |
| `enable_auto_clustering`       | Boolean  | Whether to enable automatic liquid clustering on the destination table. Defaults to `false`. This field is mutually exclusive with `clustering_columns`. See [Enable liquid clustering](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/clustering.md).                                                                                                                                                     |
| `exclude_columns`              | Sequence | A list of column names to be excluded for the ingestion. When not specified, `include_columns` fully controls what columns to be ingested. When specified, all other columns including future ones will be automatically included for ingestion. This field in mutually exclusive with `include_columns`.                                                                                                                 |
| `include_columns`              | Sequence | A list of column names to be included for the ingestion. When not specified, all columns except ones in `exclude_columns` will be included. Future columns will be automatically included. When specified, all other future columns will be automatically excluded from ingestion. This field in mutually exclusive with `exclude_columns`.                                                                               |
| `primary_keys`                 | Sequence | A list of column names to use as primary keys for the table.                                                                                                                                                                                                                                                                                                                                                              |
| `query_based_connector_config` | Map      | Configuration that applies only to query-based connectors. See [pipeline.ingestion\_definition.table\_configuration.query\_based\_connector\_config](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-ingestion_definition-table_configuration-query_based_connector_config).                                                                                                                   |
| `row_filter`                   | String   | A condition that filters the rows to ingest. Write the condition in Databricks SQL syntax without the `WHERE` keyword. See [Select rows to ingest](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/row-filtering.md).                                                                                                                                                                                       |
| `scd_type`                     | String   | The slowly changing dimension (SCD) type to apply to the table. Valid values are `SCD_TYPE_1`, `SCD_TYPE_2`, and `APPEND_ONLY`. Defaults to `SCD_TYPE_1`. See [Enable history tracking (SCD type 2)](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/scd.md).                                                                                                                                               |
| `sequence_by`                  | Sequence | The column names specifying the logical order of events in the source data. Spark Declarative Pipelines uses this sequencing to handle change events that arrive out of order.                                                                                                                                                                                                                                            |
| `source_metadata_column`       | String   | The name of a struct column to add to each ingested record that holds per-row source metadata.                                                                                                                                                                                                                                                                                                                            |
| `table_properties`             | Map      | Table properties to set on the destination table, as key-value pairs. These override the `table_properties` set for the pipeline. See [Set Delta Lake table properties](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/table-properties.md).                                                                                                                                                               |

##### <a id="pipeline-ingestion_definition-table_configuration-auto_full_refresh_policy" />pipeline.ingestion\_definition.table\_configuration.auto\_full\_refresh\_policy

**`Type: Map`**

The policy for automatically running a full refresh of the table when the pipeline encounters an issue that a full refresh can fix. If not specified, auto full refresh is disabled. See [Auto full refresh policy](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/full-refresh.md#auto-full-refresh).

| Key                  | Type    | Description                                                                                                        |
| -------------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| `enabled`            | Boolean | Required. Whether auto full refresh is enabled.                                                                    |
| `min_interval_hours` | Integer | The minimum interval, in hours, between the table's last full refresh and a new auto full refresh. Defaults to 24. |

##### <a id="pipeline-ingestion_definition-table_configuration-query_based_connector_config" />pipeline.ingestion\_definition.table\_configuration.query\_based\_connector\_config

**`Type: Map`**

Configuration that applies only to query-based connectors. See [Query-based connector reference](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-reference.md).

| Key                                          | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `cursor_columns`                             | Sequence | The names of the monotonically increasing columns in the source table that the connector uses to read and ingest the table incrementally. Values can repeat but must not decrease. If the table uses `SCD_TYPE_1` or `SCD_TYPE_2`, these columns also act as `sequence_by` unless you set `sequence_by` explicitly. See [Cursor column requirements](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-reference.md#cursor-column-requirements). |
| `deletion_condition`                         | String   | A SQL condition that identifies source rows that have been soft-deleted, for example `is_deleted = true`. See [Deletion condition](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-reference.md#deletion-condition).                                                                                                                                                                                                                           |
| `hard_deletion_sync_min_interval_in_seconds` | Integer  | The minimum interval, in seconds, between primary key snapshots that detect rows physically removed from the source table. If not set, hard-deletion sync is disabled. See [Hard-deletion tracking](https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-reference.md#hard-deletion-tracking).                                                                                                                                                      |

### <a id="pipeline-libraries" />pipeline.libraries

**`Type: Sequence`**

Defines the list of libraries or code needed by this pipeline.

Each item in the list is a definition:

| Key        | Type   | Description                                                                                                                                                                                                                                                                                                         |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `file`     | Map    | The path to a file that defines a pipeline and is stored in Databricks Repos. See [pipeline.libraries.file](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-libraries-file).                                                                                                             |
| `glob`     | Map    | The unified field to include source code. Each entry can be a notebook path, a file path, or a folder path that ends `/**`. This field cannot be used together with `notebook` or `file`. See [pipeline.libraries.glob](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-libraries-glob). |
| `notebook` | Map    | The path to a notebook that defines a pipeline and is stored in the Databricks workspace. See [pipeline.libraries.notebook](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#pipeline-libraries-notebook).                                                                                         |
| `whl`      | String | This field is deprecated                                                                                                                                                                                                                                                                                            |

#### <a id="pipeline-libraries-file" />pipeline.libraries.file

**`Type: Map`**

The path to a file that defines a pipeline and is stored in the Databricks Repos.

| Key    | Type   | Description                           |
| ------ | ------ | ------------------------------------- |
| `path` | String | The absolute path of the source code. |

#### <a id="pipeline-libraries-glob" />pipeline.libraries.glob

**`Type: Map`**

The unified field to include source code. Each entry can be a notebook path, a file path, or a folder path that ends `/**`. This field cannot be used together with `notebook` or `file`.

| Key       | Type   | Description                              |
| --------- | ------ | ---------------------------------------- |
| `include` | String | The source code to include for pipelines |

#### <a id="pipeline-libraries-notebook" />pipeline.libraries.notebook

**`Type: Map`**

The path to a notebook that defines a pipeline and is stored in the Databricks workspace.

| Key    | Type   | Description                           |
| ------ | ------ | ------------------------------------- |
| `path` | String | The absolute path of the source code. |

### <a id="pipeline-notifications" />pipeline.notifications

**`Type: Sequence`**

The notification settings for this pipeline. Each item in the sequence is a notification configuration.

| Key                | Type     | Description                                                                                                                                               |
| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `alerts`           | Sequence | A list of alerts that trigger notifications. Valid values include `on-update-success`, `on-update-failure`, `on-update-fatal-failure`, `on-flow-failure`. |
| `email_recipients` | Sequence | A list of email addresses to notify when a configured alert is triggered.                                                                                 |

#### Example

The following example defines a pipeline with the resource key `hello-pipeline`:

```yaml
resources:
  pipelines:
    hello-pipeline:
      name: hello-pipeline
      clusters:
        - label: default
          num_workers: 1
      development: true
      continuous: false
      channel: CURRENT
      edition: CORE
      photon: false
      libraries:
        - notebook:
            path: ./pipeline.py
```

For additional pipeline configuration examples, see [Pipeline configuration](https://docs.databricks.com/aws/en/dev-tools/bundles/examples.md#pipeline).

## <a id="postgres_branches" />postgres\_branch

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type:Map`**

The Postgres branch resource allows you to define [Lakebase branches](https://docs.databricks.com/api/workspace/postgres/createbranch) in a bundle. You must also define corresponding [Postgres projects](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_projects) and [compute endpoints](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_endpoints).

*Added in Databricks CLI version 0.287.0*

```yaml
postgres_branches:
  <postgres_branch-name>:
    <postgres_branch-field-name>: <postgres_branches-field-value>
```

| Key                  | Type    | Description                                                                                                                                                                                                                                                                                                                                                                              |
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch_id`          | String  | The ID to use for the Branch. This becomes the final component of the branch's resource name. The ID is required and must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. For example, `development` becomes `projects/my-app/branches/development`.<br />*Added in Databricks CLI version 0.287.0*                    |
| `expire_time`        | String  | Absolute expiration timestamp. When set, the branch will expire at this time.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                             |
| `is_protected`       | Boolean | When set to true, protects the branch from deletion and reset. Associated compute endpoints and the project cannot be deleted while the branch is protected.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                              |
| `lifecycle`          | Map     | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.287.0*                                                                                                                  |
| `no_expiry`          | Boolean | Explicitly disable expiration. When set to true, the branch will not expire. If set to false, the request is invalid; provide either ttl or expire\_time instead.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                         |
| `parent`             | String  | The project where this branch will be created. Format: `projects/{project_id}`<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                            |
| `purge_on_delete`    | Boolean | Whether to purge the branch's data when it is deleted.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                                                                                      |
| `replace_existing`   | Boolean | Whether to replace an existing branch that has the same ID when deploying.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                  |
| `source_branch`      | String  | The name of the source branch from which this branch was created (data lineage for point-in-time recovery). If not specified, defaults to the project's default branch. Format: `projects/{project_id}/branches/{branch_id}`<br />*Added in Databricks CLI version 0.287.0*                                                                                                              |
| `source_branch_lsn`  | String  | The Log Sequence Number (LSN) on the source branch from which this branch was created.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                    |
| `source_branch_time` | String  | The point in time on the source branch from which this branch was created.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                |
| `source_snapshot`    | String  | The snapshot this branch was created from. When set, the branch's data comes from the snapshot rather than a source branch, so `source_branch`, `source_branch_lsn`, and `source_branch_time` must be empty. The snapshot must be `AVAILABLE` and belong to this branch's project. Format: `projects/{project_id}/snapshots/{snapshot_id}`<br />*Added in Databricks CLI version 1.16.0* |
| `ttl`                | String  | Relative time-to-live duration. When set, the branch will expire at creation\_time + ttl.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                 |

#### Example

See [postgres\_projects example](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres-example).

## <a id="postgres_catalogs" />postgres\_catalog

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres catalog resource allows you to define [Lakebase Postgres catalogs](https://docs.databricks.com/api/workspace/postgres/createcatalog) in a bundle. Each catalog binds a Unity Catalog catalog to a Postgres database on a [Lakebase Autoscaling branch](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches).

*Added in Databricks CLI version 1.0.0*

```yaml
postgres_catalogs:
  <postgres_catalog-name>:
    <postgres_catalog-field-name>: <postgres_catalog-field-value>
```

| Key                          | Type    | Description                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch`                     | String  | The resource path of the Lakebase Autoscaling branch that holds the Postgres database, in the format `projects/{project_id}/branches/{branch_id}`. The branch must have a read-write compute endpoint.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                   |
| `catalog_id`                 | String  | Required. The ID of the Unity Catalog catalog to bind to the Postgres database.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                          |
| `create_database_if_missing` | Boolean | Whether to create the Postgres database if it does not already exist.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                    |
| `lifecycle`                  | Map     | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.0.0*                                                                                                                 |
| `postgres_database`          | String  | Required. The name of the Postgres database to bind to the catalog. The database must already exist, unless `create_database_if_missing` is `true`. The system databases `postgres`, `databricks_system`, `template0`, and `template1` cannot be registered. A database can be registered with only one Unity Catalog catalog at a time.<br />*Added in Databricks CLI version 1.0.0* |

#### Example

```yaml
resources:
  postgres_projects:
    project:
      project_id: test-pg-project
      display_name: Test Postgres Project

  postgres_catalogs:
    catalog:
      catalog_id: test_catalog
      branch: ${resources.postgres_projects.project.name}/branches/production
      postgres_database: appdb
      create_database_if_missing: true
```

## <a id="postgres_data_apis" />postgres\_data\_api

> [!NOTE]
> **Preview**
>
> This feature is in [Private Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md). To try it, reach out to your Databricks contact.

**`Type: Map`**

The Postgres Data API resource allows you to enable and configure the [Lakebase Data API](https://docs.databricks.com/aws/en/oltp/projects/data-api.md), a PostgREST-compatible REST interface, of a Postgres database on a [Lakebase Autoscaling branch](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches). A database has at most one Data API. Removing the resource from the bundle turns off the Data API. The database and its data are not affected.

At least one setting besides `parent` is required, such as `db_schemas`. The serving URL of the Data API is available as `status.url`, so you can reference it as `${resources.postgres_data_apis.<postgres_data_api-name>.status.url}`.

*Added in Databricks CLI version 1.25.0*

```yaml
postgres_data_apis:
  <postgres_data_api-name>:
    <postgres_data_api-field-name>: <postgres_data_api-field-value>
```

| Key                           | Type     | Description                                                                                                                                                                                                                                                                                                                        |
| ----------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `db_aggregates_enabled`       | Boolean  | Whether to enable aggregate functions, such as `count`, `sum`, and `avg`, in Data API responses. The default is `true`.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                              |
| `db_extra_search_path`        | Sequence | Additional schemas to include in the PostgreSQL search path. Each entry must be a valid PostgreSQL schema name.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                                      |
| `db_max_rows`                 | Integer  | The maximum number of rows returned in a single Data API response. Must be a positive integer.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                                                       |
| `db_schemas`                  | Sequence | The database schemas exposed through the Data API. Each entry must be a valid PostgreSQL schema name of 1-63 characters that matches `[a-zA-Z_][a-zA-Z0-9_$]*`. A maximum of 100 entries is supported. The default is `["public"]`.<br />*Added in Databricks CLI version 1.25.0*                                                  |
| `jwt_cache_max_lifetime`      | String   | The maximum lifetime of cached JWT tokens, as a duration in seconds such as `300s`. A zero duration disables caching.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                                |
| `jwt_role_claim_key`          | String   | The JSON path to the role claim in JWT tokens. The default is `.sub`.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                                                                                |
| `lifecycle`                   | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.25.0*                                                             |
| `openapi_mode`                | String   | The OpenAPI documentation mode for the Data API endpoint. Valid values are `OPEN_API_MODE_IGNORE_PRIVILEGES` and `OPEN_API_MODE_DISABLED`.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                           |
| `parent`                      | String   | Required. The database whose Data API this resource manages, in the format `projects/{project_id}/branches/{branch_id}/databases/{database_id}`. For a database defined in the same bundle, use a reference such as `${resources.postgres_databases.<postgres_database-name>.name}`.<br />*Added in Databricks CLI version 1.25.0* |
| `server_cors_allowed_origins` | Sequence | The allowed origins for CORS requests. Each entry must be a valid origin URL, or `*` to allow all origins.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                                           |
| `server_timing_enabled`       | Boolean  | Whether to enable the `Server-Timing` header in Data API responses.<br />*Added in Databricks CLI version 1.25.0*                                                                                                                                                                                                                  |

#### Example

The following example enables the Data API for a database and exposes its `public` schema:

```yaml
resources:
  postgres_databases:
    my_database:
      parent: ${resources.postgres_branches.production.id}
      database_id: my-database
      postgres_database: app_db
      role: ${resources.postgres_roles.owner.id}

  postgres_data_apis:
    my_data_api:
      parent: ${resources.postgres_databases.my_database.name}
      db_schemas:
        - public
      db_max_rows: 100
```

## <a id="postgres_databases" />postgres\_database

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres database resource allows you to define [Lakebase Postgres databases](https://docs.databricks.com/api/workspace/postgres/createdatabase) in a bundle. Each database is created on a [Lakebase Autoscaling branch](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches).

*Added in Databricks CLI version 1.4.0*

```yaml
postgres_databases:
  <postgres_database-name>:
    <postgres_database-field-name>: <postgres_database-field-value>
```

| Key                 | Type    | Description                                                                                                                                                                                                                                                           |
| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `database_id`       | String  | Required. The ID to use for the database. This becomes the final component of the database's resource name.<br />*Added in Databricks CLI version 1.4.0*                                                                                                              |
| `lifecycle`         | Map     | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.4.0* |
| `parent`            | String  | Required. The branch where this database is created. Format: `projects/{project_id}/branches/{branch_id}`.<br />*Added in Databricks CLI version 1.4.0*                                                                                                               |
| `postgres_database` | String  | The name of the Postgres database.<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                                                       |
| `replace_existing`  | Boolean | Whether to replace an existing database that has the same ID when deploying.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                             |
| `role`              | String  | Required on create. The resource name of the Postgres role that owns the database. Format: `projects/{project_id}/branches/{branch_id}/roles/{role_id}`. The role must be in the same branch as the database.<br />*Added in Databricks CLI version 1.4.0*            |

#### Examples

```yaml
resources:
  postgres_projects:
    my_project:
      project_id: test-pg-proj
      display_name: 'Test Project for Database'
      pg_version: 16
      history_retention_duration: '604800s'

  postgres_branches:
    main:
      parent: ${resources.postgres_projects.my_project.id}
      branch_id: main
      no_expiry: true

  postgres_roles:
    owner:
      parent: ${resources.postgres_branches.main.id}
      role_id: app-owner
      postgres_role: app_owner

  postgres_databases:
    my_database:
      parent: ${resources.postgres_branches.main.id}
      database_id: my-database
      postgres_database: app_db
      # The live API requires `role`. Declare an explicit role so the bundle is
      # portable across users (the auto-created project-owner role's id is
      # derived from the creator's identity).
      role: ${resources.postgres_roles.owner.id}
```

## <a id="postgres_endpoints" />postgres\_endpoint

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres endpoint resource allows you to define [Lakebase compute endpoints](https://docs.databricks.com/api/workspace/postgres/createendpoint) in a bundle. You must also define corresponding [Lakebase projects](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_projects) and [Lakebase branches](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches).

*Added in Databricks CLI version 0.287.0*

```yaml
postgres_endpoints:
  <postgres_endpoint-name>:
    <postgres_endpoint-field-name>: <postgres_endpoint-field-value>
```

| Key                        | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| -------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autoscaling_limit_max_cu` | Number  | The maximum number of Compute Units. The maximum value is 64, and the difference between the minimum and maximum Compute Units must not exceed 16. Set it equal to `autoscaling_limit_min_cu` for a fixed-size compute. When omitted at creation, the project's default endpoint settings apply.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                   |
| `autoscaling_limit_min_cu` | Number  | The minimum number of Compute Units. Minimum value is 0.5, and it must not exceed `autoscaling_limit_max_cu`. When omitted at creation, the project's default endpoint settings apply.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                             |
| `disabled`                 | Boolean | Whether to restrict connections to the compute endpoint. Enabling this option schedules a suspend compute operation. A disabled compute endpoint cannot be enabled by a connection or console action. To accept connections again, set this field back to `false`.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                 |
| `endpoint_id`              | String  | The ID to use for the Endpoint. This becomes the final component of the endpoint's resource name. The ID is required and must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. For example, `primary` becomes `projects/my-app/branches/development/endpoints/primary`.<br />*Added in Databricks CLI version 0.287.0*                                                                                           |
| `endpoint_type`            | String  | The endpoint type. A branch can only have one READ\_WRITE endpoint. Possible values: `ENDPOINT_TYPE_READ_WRITE`, `ENDPOINT_TYPE_READ_ONLY`.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                                        |
| `group`                    | Map     | The high availability (HA) configuration of the endpoint. If unspecified, the endpoint defaults to a single compute with no readable secondaries. Automatic suspension is not available for an endpoint with more than one compute, so set `no_suspension` to `true` when configuring one. See [postgres\_endpoint.group](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_endpoint-group).                                                             |
| `lifecycle`                | Map     | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                           |
| `no_suspension`            | Boolean | When set to true, explicitly disables automatic suspension (never suspend). The value must be `true` when provided. Mutually exclusive with `suspend_timeout_duration`.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                            |
| `parent`                   | String  | The branch where this Endpoint will be created. Format: `projects/{project_id}/branches/{branch_id}`<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                                                                               |
| `replace_existing`         | Boolean | Whether to replace an existing compute endpoint that has the same ID when deploying.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                                                                                                 |
| `settings`                 | Map     | The Postgres server parameters for the compute endpoint. Its `pg_settings` key is a map of Postgres server parameters keyed by parameter name, with each value given as a string. On update, an empty `pg_settings` map leaves the current parameters unchanged.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                   |
| `suspend_timeout_duration` | String  | Duration of inactivity after which the compute endpoint is automatically suspended. If specified, the value must be between 60s and 604800s (1 minute to 1 week). A suspended endpoint keeps its hostnames and configuration, and the next connection attempt restarts it. When neither this field nor `no_suspension` is set at creation, the project's default endpoint settings apply. Mutually exclusive with `no_suspension`.<br />*Added in Databricks CLI version 0.287.0* |

### <a id="postgres_endpoint-group" />postgres\_endpoint.group

**`Type: Map`**

The endpoint group configuration.

| Key                           | Type    | Description                                                                                                                                                                                                                                                                          |
| ----------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enable_readable_secondaries` | Boolean | Whether to allow read-only connections to read-write endpoints. Only relevant for read-write endpoints where `group.max > 1`. When enabled, the endpoint also reports a read-only host in `status.hosts`.                                                                            |
| `max`                         | Integer | Required. The maximum number of computes in the endpoint group. Currently, this must be equal to `min`. Set to `1` for single compute endpoints, to disable High Availability (HA). To manually suspend all computes in an endpoint group, set `disabled` to `true` on the endpoint. |
| `min`                         | Integer | Required. The minimum number of computes in the endpoint group. Currently, this must be equal to `max`. This must be greater than or equal to `1`.                                                                                                                                   |

#### Example

See [postgres\_projects example](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres-example).

## <a id="postgres_projects" />postgres\_project

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres project resource allows you to define [Lakebase Autoscaling Postgres database projects](https://docs.databricks.com/api/workspace/postgres/createproject) in a bundle. You must also define corresponding [Postgres branches](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches) and [compute endpoints](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_endpoints).

*Added in Databricks CLI version 0.287.0*

```yaml
postgres_projects:
  <postgres_project-name>:
    <postgres_project-field-name>: <postgres_project-field-value>
```

| Key                          | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `budget_policy_id`           | String   | The budget policy ID for this project.                                                                                                                                                                                                                                                                                                                                                                       |
| `custom_tags`                | Sequence | Custom tags to associate with the project, used for billing and cost tracking. See [postgres\_project.custom\_tags](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_project-custom_tags).                                                                                                                                                                                         |
| `default_branch`             | String   | The full resource path of the default branch of the project, in the format `projects/{project_id}/branches/{branch_id}`. At creation time, the branch ID in this path names the initial branch, which is called `production` when the field is omitted. On update, the path must name an existing branch of this project, which then becomes the default branch.                                             |
| `default_endpoint_settings`  | Map      | The settings applied by default to compute endpoints created in this project. The initial endpoint also takes these values for any setting that `initial_endpoint_spec` does not provide. See [postgres\_project.default\_endpoint\_settings](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_projects-default_endpoint_settings).<br />*Added in Databricks CLI version 0.287.0* |
| `display_name`               | String   | Human-readable project name. Length should be between 1 and 256 characters.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                                                                                   |
| `enable_pg_native_login`     | Boolean  | Whether to enable native Postgres login for the project.<br />*Added in Databricks CLI version 0.294.0*                                                                                                                                                                                                                                                                                                      |
| `history_retention_duration` | String   | The number of seconds to retain the shared history for point in time recovery for all branches in this project. Value should be between 172800s (2 days) and 3024000s (35 days). Defaults to 604800s (7 days) when omitted.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                   |
| `lifecycle`                  | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                      |
| `permissions`                | Sequence | The permissions for the Postgres project. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.292.0*                                                                                                                                                                                                                   |
| `pg_version`                 | Integer  | The major Postgres version number. Defaults to `17` when omitted. The set of versions that new projects can use may change over time.<br />*Added in Databricks CLI version 0.287.0*                                                                                                                                                                                                                         |
| `project_id`                 | String   | The ID to use for the Project. This becomes the final component of the project's resource name. The ID is required and must be 1-63 characters long, start with a lowercase letter, and contain only lowercase letters, numbers, and hyphens. For example, `my-app` becomes `projects/my-app`.<br />*Added in Databricks CLI version 0.287.0*                                                                |
| `purge_on_delete`            | Boolean  | Whether to purge the project's data when it is deleted.<br />*Added in Databricks CLI version 1.2.0*                                                                                                                                                                                                                                                                                                         |

#### <a id="postgres-example" />Example

```yaml
resources:
  postgres_projects:
    my_db:
      project_id: test-prod-app
      display_name: 'Production Database'
      pg_version: 17

  postgres_branches:
    main:
      parent: ${resources.postgres_projects.my_db.id}
      branch_id: main
      is_protected: false
      no_expiry: true

  postgres_endpoints:
    primary:
      parent: ${resources.postgres_branches.main.id}
      endpoint_id: primary
      endpoint_type: ENDPOINT_TYPE_READ_WRITE
      autoscaling_limit_min_cu: 0.5
      autoscaling_limit_max_cu: 4
```

### <a id="postgres_project-custom_tags" />postgres\_project.custom\_tags

**`Type: Sequence`**

A list of custom tags for the project.

| Key     | Type   | Description                  |
| ------- | ------ | ---------------------------- |
| `key`   | String | The key of the custom tag.   |
| `value` | String | The value of the custom tag. |

### <a id="postgres_projects-default_endpoint_settings" />postgres\_project.default\_endpoint\_settings

**`Type: Map`**

| Key                        | Type    | Description                                                                                                                                                                                       |
| -------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `autoscaling_limit_max_cu` | Number  | The maximum number of Compute Units. Minimum value is 0.5.                                                                                                                                        |
| `autoscaling_limit_min_cu` | Number  | The minimum number of Compute Units. Minimum value is 0.5.                                                                                                                                        |
| `no_suspension`            | Boolean | When set to true, explicitly disables automatic suspension (never suspend). Should be set to true when provided. Mutually exclusive with `suspend_timeout_duration`.                              |
| `pg_settings`              | Map     | A raw representation of Postgres settings.                                                                                                                                                        |
| `suspend_timeout_duration` | String  | Duration of inactivity after which the compute endpoint is automatically suspended. If specified should be between 60s and 604800s (1 minute to 1 week). Mutually exclusive with `no_suspension`. |

## <a id="postgres_roles" />postgres\_role

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres role resource allows you to define [Lakebase Postgres roles](https://docs.databricks.com/api/workspace/postgres/createrole) in a bundle. Each role is created on a [Lakebase Autoscaling branch](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_branches).

*Added in Databricks CLI version 1.4.0*

```yaml
postgres_roles:
  <postgres_role-name>:
    <postgres_role-field-name>: <postgres_role-field-value>
```

| Key                | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `attributes`       | Map      | The desired API-exposed Postgres role attributes to associate with the role. See [postgres\_role.attributes](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_role-attributes).<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                                           |
| `auth_method`      | String   | How the role is authenticated when connecting to Postgres. If left unspecified, a meaningful authentication method is derived from the `identity_type`. Valid values are `NO_LOGIN`, `PG_PASSWORD_SCRAM_SHA_256`, `LAKEBASE_OAUTH_V1`.<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                              |
| `identity_type`    | String   | The type of the Databricks managed identity that this role represents. Leave empty to create a regular Postgres role not associated with a Databricks identity. Valid values are `USER`, `SERVICE_PRINCIPAL`, `GROUP`.<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                              |
| `lifecycle`        | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                            |
| `membership_roles` | Sequence | Standard roles that this role is a member of.<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                                                                                                                                                                                                       |
| `parent`           | String   | Required. The branch where this role is created. Format: `projects/{project_id}/branches/{branch_id}`.<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                                                                                                                                              |
| `postgres_role`    | String   | The name of the Postgres role. Required when creating the role. To create a Postgres role backed by a managed Databricks identity, `postgres_role` must be one of the following:<br /><ul><li>User email, for an `identity_type` of `USER`.</li><li>Application ID, for an `identity_type` of `SERVICE_PRINCIPAL`.</li><li>Group name, for an `identity_type` of `GROUP`.</li></ul><br />*Added in Databricks CLI version 1.4.0* |
| `replace_existing` | Boolean  | Whether to replace an existing role that has the same ID when deploying.<br />*Added in Databricks CLI version 1.7.0*                                                                                                                                                                                                                                                                                                            |
| `role_id`          | String   | Required. The user-specified role ID; becomes the final component of the role's resource name. Must be 4-63 characters, lowercase letters, numbers, and hyphens (RFC 1123).<br />*Added in Databricks CLI version 1.4.0*                                                                                                                                                                                                         |

### <a id="postgres_role-attributes" />postgres\_role.attributes

**`Type: Map`**

The desired API-exposed Postgres role attributes to associate with the role.

*Added in Databricks CLI version 1.4.0*

| Key          | Type    | Description                                                                                         |
| ------------ | ------- | --------------------------------------------------------------------------------------------------- |
| `bypassrls`  | Boolean | Whether the role bypasses row-level security.                                                       |
| `createdb`   | Boolean | Whether the role can create databases.                                                              |
| `createrole` | Boolean | Whether the role can create, alter, drop, comment on, and change the security label of other roles. |

#### Examples

```yaml
resources:
  postgres_projects:
    my_project:
      project_id: my-pg-proj
      display_name: 'Test Project for Role'
      pg_version: 16
      history_retention_duration: '604800s'

  postgres_branches:
    main:
      parent: ${resources.postgres_projects.my_project.id}
      branch_id: main
      no_expiry: true

  postgres_roles:
    my_role:
      parent: ${resources.postgres_branches.main.id}
      role_id: my-role
      postgres_role: app_role
      attributes:
        createdb: true
```

## <a id="postgres_snapshot_schedules" />postgres\_snapshot\_schedule

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres snapshot schedule resource allows you to define automatic-snapshot schedules for a branch of a [Lakebase Autoscaling project](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_projects) in a bundle.

> [!NOTE]
>
> Using Declarative Automation Bundles to define Postgres snapshot schedules is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.16.0*

```yaml
postgres_snapshot_schedules:
  <postgres_snapshot_schedule-name>:
    <postgres_snapshot_schedule-field-name>: <postgres_snapshot_schedule-field-value>
```

| Key         | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch`    | String   | Required. The branch whose automatic-snapshot schedule this manages. Format: `projects/{project_id}/branches/{branch_id}`.<br />*Added in Databricks CLI version 1.16.0*                                                                                                                                                                                                                                       |
| `lifecycle` | Map      | Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.16.0*                                                                                                                                                        |
| `schedule`  | Sequence | The cadences at which automatic snapshots are taken. An empty set disables automatic snapshots. When several cadences fire together, one snapshot is taken and retained for the longest of their retentions. See [postgres\_snapshot\_schedule.schedule](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_snapshot_schedule-schedule).<br />*Added in Databricks CLI version 1.16.0* |

### <a id="postgres_snapshot_schedule-schedule" />postgres\_snapshot\_schedule.schedule

**`Type: Sequence`**

The cadences at which automatic snapshots are taken.

*Added in Databricks CLI version 1.16.0*

Each item specifies one snapshot cadence (`daily_schedule`, `weekly_schedule`, or `monthly_schedule`) and its `retention`:

| Key                | Type   | Description                                                                                                                                                                                                                                               |
| ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `daily_schedule`   | Map    | Take a snapshot once per day.<br />*Added in Databricks CLI version 1.16.0*                                                                                                                                                                               |
| `monthly_schedule` | Map    | Take a snapshot once per month.<br />*Added in Databricks CLI version 1.16.0*                                                                                                                                                                             |
| `retention`        | String | Required. How long snapshots from this cadence are kept before automatic deletion. Must be at least 1 hour. Applied when a snapshot is taken; not retroactive, so changing it affects only later snapshots.<br />*Added in Databricks CLI version 1.16.0* |
| `weekly_schedule`  | Map    | Take a snapshot once per week.<br />*Added in Databricks CLI version 1.16.0*                                                                                                                                                                              |

## <a id="postgres_synced_tables" />postgres\_synced\_table

> [!NOTE]
> **Beta**
>
> This feature is in [Beta](https://docs.databricks.com/aws/en/release-notes/release-types.md).

**`Type: Map`**

The Postgres synced table resource allows you to define [Lakebase Postgres synced tables](https://docs.databricks.com/api/workspace/postgres/createsyncedtable) in a bundle. Each synced table continuously replicates a Unity Catalog Delta source table into a Postgres table on a Lakebase Autoscaling instance.

*Added in Databricks CLI version 1.0.0*

```yaml
postgres_synced_tables:
  <postgres_synced_table-name>:
    <postgres_synced_table-field-name>: <postgres_synced_table-field-value>
```

| Key                                  | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `branch`                             | String   | The full resource name of the Lakebase Autoscaling branch that contains the synced table, in the format `projects/{project_id}/branches/{branch_id}`. A value must be specified when creating a synced table inside a standard catalog. Inside a Lakebase catalog it can be omitted, and if specified it must match the branch of that catalog.<br />*Added in Databricks CLI version 1.0.0*                                                                                                      |
| `create_database_objects_if_missing` | Boolean  | Whether to create the synced table's logical database and schema resources if they do not already exist.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                                                                                             |
| `existing_pipeline_id`               | String   | The ID for an existing pipeline. If this is set, the synced table will be bin packed into the existing pipeline referenced. This avoids creating a new pipeline and allows sharing existing compute. In this case, the pipeline must be a synced table pipeline that runs continuously if and only if the `scheduling_policy` of this synced table is `CONTINUOUS`. At most one of `existing_pipeline_id` and `new_pipeline_spec` should be defined.<br />*Added in Databricks CLI version 1.0.0* |
| `extra_columns`                      | Sequence | The extra PostgreSQL columns to add to the synced table, beyond those replicated from the source table.<br />*Added in Databricks CLI version 1.10.0*                                                                                                                                                                                                                                                                                                                                             |
| `lifecycle`                          | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                             |
| `new_pipeline_spec`                  | Map      | The specification for a new pipeline. See [postgres\_synced\_table.new\_pipeline\_spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_synced_table-new_pipeline_spec). At most one of `existing_pipeline_id` and `new_pipeline_spec` should be defined.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                 |
| `postgres_database`                  | String   | Required on create. The name of the Postgres database where the synced table is created. If the synced table is created inside a Lakebase catalog, the value must match the Postgres database of that catalog.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                       |
| `primary_key_columns`                | Sequence | The list of column names that form the primary key. At least one column must be specified.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                                                                                                           |
| `scheduling_policy`                  | String   | Required on create. The scheduling policy of the synced table's underlying pipeline. See [Serve lakehouse data with synced tables](https://docs.databricks.com/aws/en/oltp/projects/sync-tables.md) for how to choose a sync mode. Valid values are `CONTINUOUS`, `TRIGGERED`, `SNAPSHOT`.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                           |
| `source_table_full_name`             | String   | The full name of the source table in the format `catalog.schema.table`.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                                                                                                                              |
| `synced_table_id`                    | String   | Required. The ID to use for the synced table.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                                                                                                                                                        |
| `timeseries_key`                     | String   | Time series key to de-duplicate rows with the same primary key.<br />*Added in Databricks CLI version 1.0.0*                                                                                                                                                                                                                                                                                                                                                                                      |
| `type_overrides`                     | Sequence | Overrides the default Delta-to-PostgreSQL type mapping for specific columns. See [postgres\_synced\_table.type\_overrides](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_synced_table-type_overrides).<br />*Added in Databricks CLI version 1.5.0*                                                                                                                                                                                                                  |

### <a id="postgres_synced_table-new_pipeline_spec" />postgres\_synced\_table.new\_pipeline\_spec

**`Type: Map`**

The specification for a new pipeline used by the synced table.

*Added in Databricks CLI version 1.0.0*

| Key                | Type   | Description                                                                                                                                                                                  |
| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `budget_policy_id` | String | The budget policy to set on the newly created pipeline.                                                                                                                                      |
| `storage_catalog`  | String | The catalog for the pipeline to store intermediate files, such as checkpoints and event logs. This needs to be a standard catalog where the user has permissions to create Delta tables.     |
| `storage_schema`   | String | The schema for the pipeline to store intermediate files, such as checkpoints and event logs. This needs to be in the standard catalog where the user has permissions to create Delta tables. |

### <a id="postgres_synced_table-type_overrides" />postgres\_synced\_table.type\_overrides

**`Type: Sequence`**

Overrides the default Delta-to-PostgreSQL type mapping for a single column.

*Added in Databricks CLI version 1.5.0*

| Key           | Type    | Description                                                                                                                                                                                                               |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `column_name` | String  | Required. The name of the source column whose target PostgreSQL type should be overridden.<br />*Added in Databricks CLI version 1.5.0*                                                                                   |
| `pg_type`     | String  | Required. The PostgreSQL-specific target type to use for the column. Valid values are `PG_SPECIFIC_TYPE_VECTOR`, `PG_SPECIFIC_TYPE_HALFVEC`, and `PG_SPECIFIC_TYPE_VARCHAR`.<br />*Added in Databricks CLI version 1.5.0* |
| `size`        | Integer | The size parameter for the target type, for types that take one, such as vector dimension or varchar length. Required when the chosen `pg_type` needs a size.<br />*Added in Databricks CLI version 1.5.0*                |

#### Example

```yaml
resources:
  schemas:
    pipeline_storage:
      name: test_pipeline_storage
      catalog_name: main
      comment: 'Pipeline storage for the synced-table test'

  postgres_projects:
    my_project:
      project_id: test-pg-proj
      display_name: 'Test Project for Synced Table'
      pg_version: 17

  postgres_catalogs:
    my_catalog:
      catalog_id: lakebase_test
      branch: ${resources.postgres_projects.my_project.id}/branches/production
      postgres_database: appdb
      create_database_if_missing: true

  postgres_synced_tables:
    my_table:
      synced_table_id: ${resources.postgres_catalogs.my_catalog.catalog_id}.public.trips_synced
      source_table_full_name: main.source_test.trips_source
      primary_key_columns: ['tpep_pickup_datetime']
      scheduling_policy: SNAPSHOT
      postgres_database: appdb
      branch: ${resources.postgres_projects.my_project.id}/branches/production
      create_database_objects_if_missing: true
      new_pipeline_spec:
        storage_catalog: ${resources.schemas.pipeline_storage.catalog_name}
        storage_schema: ${resources.schemas.pipeline_storage.name}
```

## <a id="quality_monitors" />quality\_monitor (Unity Catalog)

**`Type: Map`**

The quality\_monitor resource allows you to define a Unity Catalog [table monitor](https://docs.databricks.com/api/workspace/qualitymonitors/create). For information about monitors, see [Data profiling](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/data-profiling/index.md).

Quality monitors are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.quality\_monitors](https://databricks.github.io/cli/python/databricks.bundles.quality_monitors.html).

```yaml
quality_monitors:
  <quality_monitor-name>:
    <quality_monitor-field-name>: <quality_monitor-field-value>
```

| Key                          | Type     | Description                                                                                                                                                                                                                                                                                                                     |
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assets_dir`                 | String   | The directory to store monitoring assets (e.g. dashboard, metric tables).                                                                                                                                                                                                                                                       |
| `baseline_table_name`        | String   | Name of the baseline table from which drift metrics are computed from. Columns in the monitored table should also be present in the baseline table.                                                                                                                                                                             |
| `custom_metrics`             | Sequence | Custom metrics to compute on the monitored table. These can be aggregate metrics, derived metrics (from already computed aggregate metrics), or drift metrics (comparing metrics across time windows). See [custom\_metrics](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-custom_metrics). |
| `inference_log`              | Map      | Configuration for monitoring inference logs. See [inference\_log](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-inference_log).                                                                                                                                                             |
| `latest_monitor_failure_msg` | String   | The latest error message for a monitor failure. This is a read-only field that is populated when a monitor fails.<br />*Added in Databricks CLI version 0.264.0*                                                                                                                                                                |
| `lifecycle`                  | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                         |
| `notifications`              | Map      | The notification settings for the monitor. See [notifications](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-notifications).                                                                                                                                                                |
| `output_schema_name`         | String   | Schema where output metric tables are created.                                                                                                                                                                                                                                                                                  |
| `schedule`                   | Map      | The schedule for automatically updating and refreshing metric tables. See [schedule](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-schedule).                                                                                                                                               |
| `skip_builtin_dashboard`     | Boolean  | Whether to skip creating a default dashboard summarizing data quality metrics.                                                                                                                                                                                                                                                  |
| `slicing_exprs`              | Sequence | List of column expressions to slice data with for targeted analysis. The data is grouped by each expression independently, resulting in a separate slice for each predicate and its complements. For high-cardinality columns, only the top 100 unique values by frequency will generate slices.                                |
| `snapshot`                   | Map      | Configuration for monitoring snapshot tables. See [snapshot](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-snapshot).                                                                                                                                                                       |
| `table_name`                 | String   | The full name of the table.<br />*Added in Databricks CLI version 0.235.0*                                                                                                                                                                                                                                                      |
| `time_series`                | Map      | Configuration for monitoring time series tables. See [time\_series](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-time_series).                                                                                                                                                             |
| `warehouse_id`               | String   | Optional argument to specify the warehouse for dashboard creation. If not specified, the first running warehouse will be used.                                                                                                                                                                                                  |

### <a id="quality_monitor-custom_metrics" />quality\_monitor.custom\_metrics

**`Type: Sequence`**

A list of custom metric definitions.

Each item in the list is a `CustomMetric`:

| Key                | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `definition`       | String   | Jinja template for a SQL expression that specifies how to compute the metric. See [create metric definition](https://docs.databricks.com/en/lakehouse-monitoring/custom-metrics.html#create-definition).                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `input_columns`    | Sequence | A list of column names in the input table the metric should be computed for. Can use `:table` to indicate that the metric needs information from multiple columns.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `name`             | String   | Name of the metric in the output tables.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `output_data_type` | String   | The output type of the custom metric.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `type`             | String   | Can only be one of `CUSTOM_METRIC_TYPE_AGGREGATE`, `CUSTOM_METRIC_TYPE_DERIVED`, or `CUSTOM_METRIC_TYPE_DRIFT`. The `CUSTOM_METRIC_TYPE_AGGREGATE` and `CUSTOM_METRIC_TYPE_DERIVED` metrics are computed on a single table, whereas the `CUSTOM_METRIC_TYPE_DRIFT` compare metrics across baseline and input table, or across the two consecutive time windows.<br /><ul><li>CUSTOM\_METRIC\_TYPE\_AGGREGATE: only depend on the existing columns in your table</li><li>CUSTOM\_METRIC\_TYPE\_DERIVED: depend on previously computed aggregate metrics</li><li>CUSTOM\_METRIC\_TYPE\_DRIFT: depend on previously computed aggregate or derived metrics</li></ul> |

### <a id="quality_monitor-inference_log" />quality\_monitor.inference\_log

**`Type: Map`**

Configuration for monitoring inference logs.

| Key                    | Type     | Description                                                                                            |
| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `granularities`        | Sequence | The time granularities for aggregating inference logs (for example, `["1 day"]`).                      |
| `model_id_col`         | String   | The name of the column containing the model ID.                                                        |
| `prediction_col`       | String   | The name of the column containing the prediction.                                                      |
| `timestamp_col`        | String   | The name of the column containing the timestamp.                                                       |
| `problem_type`         | String   | The type of ML problem. Valid values include `PROBLEM_TYPE_CLASSIFICATION`, `PROBLEM_TYPE_REGRESSION`. |
| `label_col`            | String   | The name of the column containing the label (ground truth).                                            |
| `prediction_proba_col` | String   | The name of the column containing the prediction probabilities.                                        |

### <a id="quality_monitor-notifications" />quality\_monitor.notifications

**`Type: Map`**

Notification settings for the monitor.

| Key                                  | Type | Description                                                                                                                                                                                                                                        |
| ------------------------------------ | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `on_failure`                         | Map  | Notification settings when the monitor fails. See [on\_failure](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-notifications-on_failure).                                                                       |
| `on_new_classification_tag_detected` | Map  | Notification settings when new classification tags are detected. See [on\_new\_classification\_tag\_detected](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#quality_monitor-notifications-on_new_classification_tag_detected). |

#### <a id="quality_monitor-notifications-on_failure" />quality\_monitor.notifications.on\_failure

**`Type: Map`**

Notification settings when the monitor fails.

| Key               | Type     | Description                                             |
| ----------------- | -------- | ------------------------------------------------------- |
| `email_addresses` | Sequence | A list of email addresses to notify on monitor failure. |

#### <a id="quality_monitor-notifications-on_new_classification_tag_detected" />quality\_monitor.notifications.on\_new\_classification\_tag\_detected

**`Type: Map`**

Notification settings when new classification tags are detected.

| Key               | Type     | Description                                                                    |
| ----------------- | -------- | ------------------------------------------------------------------------------ |
| `email_addresses` | Sequence | A list of email addresses to notify when new classification tags are detected. |

### <a id="quality_monitor-schedule" />quality\_monitor.schedule

**`Type: Map`**

Schedule for automatically updating and refreshing metric tables.

| Key                      | Type   | Description                                                                                  |
| ------------------------ | ------ | -------------------------------------------------------------------------------------------- |
| `quartz_cron_expression` | String | A Cron expression using Quartz syntax. For example, `0 0 8 * * ?` runs every day at 8:00 AM. |
| `timezone_id`            | String | The timezone for the schedule (for example, `UTC`, `America/Los_Angeles`).                   |
| `pause_status`           | String | Whether the schedule is paused. Valid values: `PAUSED`, `UNPAUSED`.                          |

### <a id="quality_monitor-snapshot" />quality\_monitor.snapshot

**`Type: Map`**

Configuration for monitoring snapshot tables.

### <a id="quality_monitor-time_series" />quality\_monitor.time\_series

Configuration for monitoring time series tables.

| Key             | Type     | Description                                                                              |
| --------------- | -------- | ---------------------------------------------------------------------------------------- |
| `granularities` | Sequence | The time granularities for aggregating time series data (for example, `["30 minutes"]`). |
| `timestamp_col` | String   | The name of the column containing the timestamp.                                         |

#### Examples

The following examples define quality monitors for [InferenceLog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/data-profiling/create-monitor-api.md#inferencelog), [TimeSeries](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/data-profiling/create-monitor-api.md#timeseries), and [Snapshot](https://docs.databricks.com/aws/en/data-governance/unity-catalog/data-quality-monitoring/data-profiling/create-monitor-api.md#snapshot) profile types.

```yaml
# InferenceLog profile type
resources:
  quality_monitors:
    my_quality_monitor:
      table_name: dev.mlops_schema.predictions
      output_schema_name: ${bundle.target}.mlops_schema
      assets_dir: /Workspace/Users/${workspace.current_user.userName}/databricks_lakehouse_monitoring
      inference_log:
        granularities: [1 day]
        model_id_col: model_id
        prediction_col: prediction
        label_col: price
        problem_type: PROBLEM_TYPE_REGRESSION
        timestamp_col: timestamp
      schedule:
        quartz_cron_expression: 0 0 8 * * ? # Run Every day at 8am
        timezone_id: UTC
```

```yaml
# TimeSeries profile type
resources:
  quality_monitors:
    my_quality_monitor:
      table_name: dev.mlops_schema.predictions
      output_schema_name: ${bundle.target}.mlops_schema
      assets_dir: /Workspace/Users/${workspace.current_user.userName}/databricks_lakehouse_monitoring
      time_series:
        granularities: [30 minutes]
        timestamp_col: timestamp
      schedule:
        quartz_cron_expression: 0 0 8 * * ? # Run Every day at 8am
        timezone_id: UTC
```

```yaml
# Snapshot profile type
resources:
  quality_monitors:
    my_quality_monitor:
      table_name: dev.mlops_schema.predictions
      output_schema_name: ${bundle.target}.mlops_schema
      assets_dir: /Workspace/Users/${workspace.current_user.userName}/databricks_lakehouse_monitoring
      snapshot: {}
      schedule:
        quartz_cron_expression: 0 0 8 * * ? # Run Every day at 8am
        timezone_id: UTC
```

The following example configures a quality monitor and a corresponding model retraining job based on the monitoring:

```yaml
# Quality monitoring workflow
resources:
  quality_monitors:
    mlops_quality_monitor:
      table_name: ${bundle.target}.mlops_demo.predictions
      output_schema_name: ${bundle.target}.mlops_demo
      assets_dir: /Users/${workspace.current_user.userName}/databricks_lakehouse_monitoring
      inference_log:
        granularities: [1 hour]
        model_id_col: model_version
        prediction_col: prediction
        label_col: fare_amount
        problem_type: PROBLEM_TYPE_REGRESSION
        timestamp_col: inference_timestamp
      schedule:
        quartz_cron_expression: 57 0 14 * * ? # refresh monitoring metrics every day at 7 am PT
        timezone_id: UTC
  jobs:
    retraining_job:
      name: ${bundle.target}-mlops_demo-monitoring-retraining-job
      tasks:
        - task_key: monitored_metric_violation_check
          notebook_task:
            notebook_path: ../monitoring/notebooks/MonitoredMetricViolationCheck.py
            base_parameters:
              env: ${bundle.target}
              table_name_under_monitor: ${bundle.target}.mlops_demo.predictions
              metric_to_monitor: r2_score
              metric_violation_threshold: 0.7
              num_evaluation_windows: 24
              num_violation_windows: 5 # 5 out of the past 24 windows have metrics lower than threshold

        - task_key: is_metric_violated
          depends_on:
            - task_key: monitored_metric_violation_check
          condition_task:
            op: EQUAL_TO
            left: '{{tasks.monitored_metric_violation_check.values.is_metric_violated}}'
            right: 'true'

        - task_key: trigger_retraining
          depends_on:
            - task_key: is_metric_violated
              outcome: 'true'
          run_job_task:
            job_id: ${resources.jobs.model_training_job.id}

      schedule:
        quartz_cron_expression: '0 0 15 * * ?' # daily at 8 am PDT
        timezone_id: UTC

      # To get notifications, provide a list of emails to the on_failure argument.
      #
      #  email_notifications:
      #    on_failure:
      #      - someone@example.com
```

## <a id="registered_models" />registered\_model (Unity Catalog)

**`Type: Map`**

The registered model resource allows you to define models in Unity Catalog. For information about Unity Catalog [registered models](https://docs.databricks.com/api/workspace/registeredmodels/create), see [Manage model lifecycle in Unity Catalog](https://docs.databricks.com/aws/en/machine-learning/manage-model-lifecycle/index.md).

Registered models are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.registered\_models](https://databricks.github.io/cli/python/databricks.bundles.registered_models.html).

```yaml
registered_models:
  <registered_model-name>:
    <registered_model-field-name>: <registered_model-field-value>
```

| Key                | Type     | Description                                                                                                                                                                                                                                                             |
| ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `aliases`          | Sequence | List of aliases associated with the registered model. See [registered\_model.aliases](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#registered_model-aliases).<br />*Added in Databricks CLI version 0.273.0*                                       |
| `catalog_name`     | String   | The name of the catalog where the schema and the registered model reside.                                                                                                                                                                                               |
| `comment`          | String   | The comment attached to the registered model.                                                                                                                                                                                                                           |
| `created_at`       | Integer  | Creation timestamp of the registered model in milliseconds since the Unix epoch.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                         |
| `created_by`       | String   | The identifier of the user who created the registered model.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                             |
| `full_name`        | String   | The three-level (fully qualified) name of the registered model.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                          |
| `grants`           | Sequence | The grants associated with the registered model. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).                                                                                                                                 |
| `lifecycle`        | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0* |
| `metastore_id`     | String   | The unique identifier of the metastore.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                                                  |
| `name`             | String   | The name of the registered model.                                                                                                                                                                                                                                       |
| `owner`            | String   | The identifier of the user who owns the registered model.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                                |
| `schema_name`      | String   | The name of the schema where the registered model resides.                                                                                                                                                                                                              |
| `storage_location` | String   | The storage location on the cloud under which model version data files are stored.                                                                                                                                                                                      |
| `updated_at`       | String   | Last-update timestamp of the registered model in milliseconds since the Unix epoch.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                      |
| `updated_by`       | String   | The identifier of the user who updated the registered model last time.<br />*Added in Databricks CLI version 0.273.0*                                                                                                                                                   |

### <a id="registered_model-aliases" />registered\_model.aliases

**`Type: Sequence`**

A list of aliases associated with the registered model.

Each item in the list is an `Alias`:

| Key            | Type    | Description                                                                             |
| -------------- | ------- | --------------------------------------------------------------------------------------- |
| `alias_name`   | String  | Name of the alias, e.g. 'champion' or 'latest\_stable'                                  |
| `catalog_name` | String  | The name of the catalog containing the model version                                    |
| `id`           | String  | The unique identifier of the alias                                                      |
| `model_name`   | String  | The name of the parent registered model of the model version, relative to parent schema |
| `schema_name`  | String  | The name of the schema containing the model version, relative to parent catalog         |
| `version_num`  | Integer | Integer version number of the model version to which this alias points.                 |

#### Example

The following example defines a registered model in Unity Catalog:

```yaml
resources:
  registered_models:
    model:
      name: my_model
      catalog_name: ${bundle.target}
      schema_name: mlops_schema
      comment: Registered model in Unity Catalog for ${bundle.target} deployment target
      grants:
        - privileges:
            - EXECUTE
          principal: account users
```

## <a id="schemas" />schema (Unity Catalog)

**`Type: Map`**

The schema resource type allows you to define Unity Catalog [schemas](https://docs.databricks.com/api/workspace/schemas/create) for tables and other assets in your workflows and pipelines created as part of a bundle. A schema, different from other resource types, has the following limitations:

* The owner of a schema resource is always the deployment user, and cannot be changed. If `run_as` is specified in the bundle, it will be ignored by operations on the schema.
* Only fields supported by the corresponding [Schemas object create API](https://docs.databricks.com/api/workspace/schemas/create) are available for the schema resource. For example, `enable_predictive_optimization` is not supported as it is only available on the [update API](https://docs.databricks.com/api/workspace/schemas/update).

Schemas are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.schemas](https://databricks.github.io/cli/python/databricks.bundles.schemas.html).

```yaml
schemas:
  <schema-name>:
    <schema-field-name>: <schema-field-value>
```

| Key                          | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ---------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `catalog_name`               | String   | The name of the parent catalog.                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `comment`                    | String   | A user-provided free-form text description.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `custom_max_retention_hours` | Integer  | (Public Preview) The number of hours that dropped objects in the schema remain recoverable before they are permanently purged. The value must be `0` or within the range allowed for the metastore. Schemas that do not set their own value inherit the parent catalog's value.<br />*Added in Databricks CLI version 1.5.0*                                                                                                                                                         |
| `grants`                     | Sequence | The grants associated with the schema. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).                                                                                                                                                                                                                                                                                                                                                        |
| `lifecycle`                  | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                              |
| `name`                       | String   | The name of schema, relative to the parent catalog.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `properties`                 | Map      | A map of key-value properties attached to the schema.                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `storage_root`               | String   | The storage root URL under which managed tables and volumes in the schema are stored. The path must be inside an external location on which the caller has the `CREATE MANAGED STORAGE` privilege. If omitted, managed data is stored under the parent catalog's storage root, or under the metastore's root storage location when the catalog has none. Schemas in OpenSharing catalogs cannot have a storage root, and schemas in a federated Hive metastore catalog must set one. |

#### Examples

The following example defines a pipeline with the resource key `my_pipeline` that creates a Unity Catalog schema with the key `my_schema` as the target. This example uses [substitutions](https://docs.databricks.com/aws/en/dev-tools/bundles/variables.md#substitutions).

```yaml
resources:
  pipelines:
    my_pipeline:
      name: test-pipeline
      libraries:
        - notebook:
            path: ../src/nb.ipynb
        - file:
            path: ../src/range.sql
      development: true
      catalog: ${resources.schemas.my_schema.catalog_name}
      target: ${resources.schemas.my_schema.id}

  schemas:
    my_schema:
      name: test-schema
      catalog_name: main
      comment: This schema was created by Declarative Automation Bundles.
```

A top-level grants mapping is not supported by Declarative Automation Bundles, so if you want to set grants for a schema, define the grants for the schema within the `schemas` mapping. For more information about grants, see [Show, grant, and revoke privileges](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md#grant).

The following example defines a Unity Catalog schema with grants:

```yaml
resources:
  schemas:
    my_schema:
      name: test-schema
      grants:
        - principal: users
          privileges:
            - SELECT
        - principal: my_team
          privileges:
            - MANAGE
      catalog_name: main
```

## <a id="secrets" />secret (Unity Catalog)

**`Type: Map`**

The secret resource allows you to define a secret stored in Unity Catalog. Secrets are three-level namespace objects (`catalog.schema.secret`) that securely store sensitive credential data such as passwords, tokens, and keys.

Secrets are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.secrets](https://databricks.github.io/cli/python/databricks.bundles.secrets.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define secrets is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 1.12.0*

```yaml
secrets:
  <secret-name>:
    <secret-field-name>: <secret-field-value>
```

| Key            | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                              |
| -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `catalog_name` | String   | Required. The name of the catalog where the schema and the secret reside.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                                                                                                                                                                  |
| `comment`      | String   | User-provided free-form text description of the secret. Must be between 1 and 65536 characters.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                                                                                                                                            |
| `expire_time`  | String   | User-provided expiration time of the secret. This field indicates when the secret should no longer be used and may be displayed as a warning in the UI. It is purely informational and does not trigger any automatic actions or affect the secret's lifecycle.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                            |
| `grants`       | Sequence | The grants to apply on this secret. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                                                                                                                 |
| `lifecycle`    | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                   |
| `name`         | String   | Required. The name of the secret, relative to its parent schema.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                                                                                                                                                                           |
| `owner`        | String   | The owner of the secret. Defaults to the creating principal on creation. Can be updated to transfer ownership of the secret to another principal.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                                                                                          |
| `schema_name`  | String   | Required. The name of the schema where the secret resides.<br />*Added in Databricks CLI version 1.12.0*                                                                                                                                                                                                                                                                                                                                 |
| `value`        | String   | Required. The secret value to store. This field is input-only and is not returned in responses—use the `effective_value` field (via `GetSecret` with `include_value` set to `true`) to read the secret value. The maximum size is 60 KiB (pre-encryption). Accepted content includes passwords, tokens, keys, and other sensitive credential data. Must be between 1 and 61440 characters.<br />*Added in Databricks CLI version 1.12.0* |

#### Examples

The following example defines a Unity Catalog secret whose value is supplied by a bundle variable at deploy time:

```yaml
bundle:
  name: my-bundle

variables:
  my_secret_value:
    description: 'Secret value passed at deploy time'

resources:
  secrets:
    my_secret:
      catalog_name: main
      schema_name: default
      name: my_api_key
      value: ${var.my_secret_value}
      comment: 'API key for external service'
```

## <a id="secret_scopes" />secret\_scope

**`Type: Map`**

The secret\_scope resource allows you to define [secret scopes](https://docs.databricks.com/api/workspace/secrets/createscope) in a bundle. For information about secret scopes, see [Secret management](https://docs.databricks.com/aws/en/security/secrets/index.md).

Secret scopes are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.secret\_scopes](https://databricks.github.io/cli/python/databricks.bundles.secret_scopes.html).

*Added in Databricks CLI version 0.252.0*

```yaml
secret_scopes:
  <secret_scope-name>:
    <secret_scope-field-name>: <secret_scope-field-value>
```

| Key                 | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `backend_type`      | String   | The backend type the scope will be created with. If not specified, this defaults to `DATABRICKS`.<br />*Added in Databricks CLI version 0.252.0*                                                                                                                                                                                                                                                                                                                                                                |
| `keyvault_metadata` | Map      | The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT`. See [keyvault\_metadata](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#secret_scope-keyvault_metadata).<br />*Added in Databricks CLI version 0.252.0*                                                                                                                                                                                                                                                         |
| `lifecycle`         | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                                                         |
| `name`              | String   | Scope name requested by the user. Scope names are unique.<br />*Added in Databricks CLI version 0.252.0*                                                                                                                                                                                                                                                                                                                                                                                                        |
| `permissions`       | Sequence | The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs, so each `group_name`, `user_name`, or `service_principal_name` translates to a `principal` field in the ACL. Allowed levels are `READ`, `WRITE`, and `MANAGE`. For the same principal, resource permissions take precedence over top-level or target permissions. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.252.0* |

### <a id="secret_scope-keyvault_metadata" />secret\_scope.keyvault\_metadata

**`Type: Map`**

The metadata for Azure Key Vault-backed secret scopes.

| Key           | Type   | Description                             |
| ------------- | ------ | --------------------------------------- |
| `resource_id` | String | The Azure resource ID of the Key Vault. |
| `dns_name`    | String | The DNS name of the Azure Key Vault.    |

#### Examples

The following example defines a secret scope that uses a key vault backend:

```yaml
resources:
  secret_scopes:
    secret_scope_azure:
      name: test-secrets-azure-backend
      backend_type: 'AZURE_KEYVAULT'
      keyvault_metadata:
        resource_id: my_azure_keyvault_id
        dns_name: my_azure_keyvault_dns_name
```

The following example sets a custom ACL using secret scopes and permissions:

```yaml
resources:
  secret_scopes:
    my_secret_scope:
      name: my_secret_scope
      permissions:
        - user_name: admins
          level: WRITE
        - user_name: users
          level: READ
```

For an example bundle that demonstrates how to define a secret scope and a job with a task that reads from it in a bundle, see the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/job_read_secret).

## <a id="sql_warehouses" />sql\_warehouse

**`Type: Map`**

The SQL warehouse resource allows you to define a [SQL warehouse](https://docs.databricks.com/api/workspace/warehouses/create) in a bundle. For information about SQL warehouses, see [Data warehousing on Databricks](https://docs.databricks.com/aws/en/sql/index.md).

SQL warehouses are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.sql\_warehouses](https://databricks.github.io/cli/python/databricks.bundles.sql_warehouses.html).

*Added in Databricks CLI version 0.260.0*

```yaml
sql_warehouses:
  <sql-warehouse-name>:
    <sql-warehouse-field-name>: <sql-warehouse-field-value>
```

| Key                         | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| --------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `auto_stop_mins`            | Integer  | The amount of time in minutes that a SQL warehouse must be idle (for example, no RUNNING queries), before it is automatically stopped. Valid values are 0, which indicates no autostop, or greater than or equal to 10 (classic/pro) or 1 (serverless). The default is 120 (classic/pro) and 10 (serverless).<br />*Added in Databricks CLI version 0.260.0*                                                                                                     |
| `channel`                   | Map      | The channel details. See [channel](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#sql-warehouse-channel).<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                                      |
| `cluster_size`              | String   | The size of the clusters allocated for this warehouse. Increasing the size of a Spark cluster allows you to run larger queries on it. If you want to increase the number of concurrent queries, tune max\_num\_clusters. For supported values, see [cluster\_size](https://docs.databricks.com/api/workspace/warehouses/create#cluster_size).<br />*Added in Databricks CLI version 0.260.0*                                                                     |
| `creator_name`              | String   | The name of the user that created the warehouse.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                                                                                                                  |
| `enable_photon`             | Boolean  | Whether the warehouse should use Photon optimized clusters. Defaults to false.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                                                                                    |
| `enable_serverless_compute` | Boolean  | Whether the warehouse should use serverless compute.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                                                                                                              |
| `instance_profile_arn`      | String   | Deprecated. Instance profile used to pass IAM role to the cluster.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                                                                                                |
| `lifecycle`                 | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                          |
| `max_num_clusters`          | Integer  | The maximum number of clusters that the autoscaler will create to handle concurrent queries. Values must be less than or equal to 30 and greater than or equal to `min_num_clusters`. Defaults to min\_clusters if unset.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                         |
| `min_num_clusters`          | Integer  | The minimum number of available clusters that will be maintained for this SQL warehouse. Increasing this will ensure that a larger number of clusters are always running and therefore may reduce the cold start time for new queries. This is similar to reserved vs. revocable cores in a resource manager. Values must be greater than 0 and less than or equal to min(max\_num\_clusters, 30). Defaults to 1.<br />*Added in Databricks CLI version 0.260.0* |
| `name`                      | String   | The logical name for the cluster. The name must be unique within an org and less than 100 characters.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                                                             |
| `permissions`               | Sequence | The permissions to apply to the warehouse. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                      |
| `spot_instance_policy`      | String   | Whether to use spot instances. Valid values are `POLICY_UNSPECIFIED`, `COST_OPTIMIZED`, `RELIABILITY_OPTIMIZED`. The default is `COST_OPTIMIZED`.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                                 |
| `statement_timeout`         | Integer  | The statement timeout for the warehouse, in seconds. See [Statement timeout](https://docs.databricks.com/aws/en/compute/sql-warehouse/warehouse-behavior.md#statement-timeout).<br />*Added in Databricks CLI version 1.21.0*                                                                                                                                                                                                                                    |
| `tags`                      | Map      | A set of custom tags for the warehouse. See [sql\_warehouse.tags](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#sql-warehouse-tags).<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                                                                          |
| `warehouse_type`            | String   | The warehouse type. Valid values are `PRO`, `CLASSIC`, and `REALTIME`. If you want to use serverless compute, set this field to `PRO` and also set the field `enable_serverless_compute` to `true`.<br />*Added in Databricks CLI version 0.260.0*                                                                                                                                                                                                               |

### <a id="sql-warehouse-channel" />sql\_warehouse.channel

**`Type: Map`**

The channel configuration for the SQL warehouse.

| Key             | Type   | Description                                                                                                          |
| --------------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| `name`          | String | The name of the channel. Valid values include `CHANNEL_NAME_CURRENT`, `CHANNEL_NAME_PREVIEW`, `CHANNEL_NAME_CUSTOM`. |
| `dbsql_version` | String | The DBSQL version for custom channels.                                                                               |

### <a id="sql-warehouse-tags" />sql\_warehouse.tags

**`Type: Map`**

The custom tags for the SQL warehouse.

| Key           | Type     | Description                                                                                                                                                                            |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `custom_tags` | Sequence | A set of key-value pairs that identify tags on all resources (for example, AWS instances and EBS volumes) associated with this SQL warehouse. The number of tags must be less than 45. |

#### Example

The following example defines a SQL warehouse:

```yaml
resources:
  sql_warehouses:
    my_sql_warehouse:
      name: my_sql_warehouse
      cluster_size: X-Large
      enable_serverless_compute: true
      max_num_clusters: 3
      min_num_clusters: 1
      auto_stop_mins: 60
      warehouse_type: PRO
      tags:
        custom_tags:
          - key: 'bizunit'
            value: 'commercial'
          - key: 'area'
            value: 'marketing'
```

## <a id="database_tables" />synced\_database\_table

**`Type: Map`**

The synced database table resource allows you to define [Lakebase database tables](https://docs.databricks.com/api/workspace/database/createsynceddatabasetable) in a bundle.

For new workloads, Databricks recommends the [`postgres_synced_tables`](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#postgres_synced_tables) resource.

Synced database tables are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.synced\_database\_tables](https://databricks.github.io/cli/python/databricks.bundles.synced_database_tables.html).

For information about synced database tables, see [Lakebase Provisioned](https://docs.databricks.com/aws/en/oltp/instances/index.md).

*Added in Databricks CLI version 0.266.0*

```yaml
synced_database_tables:
  <synced_database_table-name>:
    <synced_database_table-field-name>: <synced_database_table-field-value>
```

| Key                      | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `database_instance_name` | String | The name of the target database instance. This is required when creating synced database tables in standard catalogs. This is optional when creating synced database tables in registered catalogs; if specified in that case, the database instance name must match that of the registered catalog, or the request is rejected.<br />*Added in Databricks CLI version 0.266.0*                                                                                                                                                                                                                                                                                                                            |
| `lifecycle`              | Map    | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `logical_database_name`  | String | The name of the target Postgres database object (logical database) for this table.<br />When creating a synced table in a registered Postgres catalog, the target Postgres database name is inferred to be that of the registered catalog. If this field is specified in that case, the Postgres database name must match that of the registered catalog, or the request is rejected.<br />When creating a synced table in a standard catalog, this field is required, and specifying it allows targeting an arbitrary Postgres database. If this database does not exist yet, it is created when `create_database_objects_if_missing` in `spec` is `true`.<br />*Added in Databricks CLI version 0.266.0* |
| `name`                   | String | Required. The full name of the table, in the form `catalog.schema.table`.<br />*Added in Databricks CLI version 0.266.0*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `spec`                   | Map    | The source table, the key columns, and how the data synchronization pipeline runs. See [synced database table specification](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#synced_database_table-spec).<br />*Added in Databricks CLI version 0.266.0*                                                                                                                                                                                                                                                                                                                                                                                                                                 |

### <a id="synced_database_table-spec" />synced\_database\_table.spec

**`Type: Map`**

The database table specification.

*Added in Databricks CLI version 0.266.0*

| Key                                  | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create_database_objects_if_missing` | Boolean  | Whether to create the synced table's logical database and schema resources if they do not already exist. The request fails if this is `false` and the database or schema does not exist.                                                                                                                                                                                                                                                                                                                                                                                  |
| `existing_pipeline_id`               | String   | The ID for an existing pipeline. If this is set, the synced table will be bin packed into the existing pipeline referenced. This avoids creating a new pipeline and allows sharing existing compute. In this case, the `scheduling_policy` of this synced table must match the scheduling policy of the existing pipeline. At most one of `existing_pipeline_id` and `new_pipeline_spec` should be defined.                                                                                                                                                               |
| `new_pipeline_spec`                  | Map      | The specification for a new pipeline. See [new\_pipeline\_spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#synced_database_table-spec-new_pipeline_spec). At most one of `existing_pipeline_id` and `new_pipeline_spec` should be defined.                                                                                                                                                                                                                                                                                                         |
| `primary_key_columns`                | Sequence | The list of column names that form the primary key, used to insert and update rows in the destination table. At least one column is required. Rows whose primary key columns contain null values are not synced, and the primary key cannot be changed after the table is created.                                                                                                                                                                                                                                                                                        |
| `scheduling_policy`                  | String   | The scheduling policy of the underlying pipeline. Valid values are:<br /><ul><li>`CONTINUOUS`: The pipeline keeps running and applies source changes as they happen.</li><li>`TRIGGERED`: The pipeline stops after the initial load and syncs again only when it is run (manually, on a schedule, or from a job), applying source changes incrementally.</li><li>`SNAPSHOT`: The pipeline stops after the initial load and copies the full source table on every run.</li></ul><br />`CONTINUOUS` and `TRIGGERED` require the source table to provide a change data feed. |
| `source_table_full_name`             | String   | The full name of the source table in the format `catalog.schema.table`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `timeseries_key`                     | String   | The time series key that deduplicates (tie-breaks) rows with the same primary key. When primary key values can repeat in the source table, the synced table keeps only the row with the latest value of this column for each primary key. The key cannot be changed after the table is created.                                                                                                                                                                                                                                                                           |

#### <a id="synced_database_table-spec-new_pipeline_spec" />synced\_database\_table.spec.new\_pipeline\_spec

**`Type: Map`**

The specification for a new pipeline used by the synced database table.

| Key                | Type   | Description                                                                                                                                                                                  |
| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `budget_policy_id` | String | The ID of the budget policy to set on the newly created pipeline.                                                                                                                            |
| `storage_catalog`  | String | The catalog for the pipeline to store intermediate files, such as checkpoints and event logs. This needs to be a standard catalog where the user has permissions to create Delta tables.     |
| `storage_schema`   | String | The schema for the pipeline to store intermediate files, such as checkpoints and event logs. This needs to be in the standard catalog where the user has permissions to create Delta tables. |

#### Examples

The following example defines a synced database table within a corresponding [database catalog](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#database_catalogs):

```yaml
resources:
  database_instances:
    my_instance:
      name: my-instance
      capacity: CU_1
  database_catalogs:
    my_catalog:
      database_instance_name: my-instance
      database_name: 'my_database'
      name: my_catalog
      create_database_if_not_exists: true
  synced_database_tables:
    my_synced_table:
      name: ${resources.database_catalogs.my_catalog.name}.${resources.database_catalogs.my_catalog.database_name}.my_destination_table
      database_instance_name: ${resources.database_catalogs.my_catalog.database_instance_name}
      logical_database_name: ${resources.database_catalogs.my_catalog.database_name}
      spec:
        source_table_full_name: 'my_source_table'
        scheduling_policy: SNAPSHOT
        primary_key_columns:
          - my_pk_column
        new_pipeline_spec:
          storage_catalog: 'my_delta_catalog'
          storage_schema: 'my_delta_schema'
```

The following example defines a synced database table inside a standard catalog:

```yaml
resources:
  synced_database_tables:
    my_synced_table:
      name: 'my_standard_catalog.public.synced_table'
      # database_instance_name is required for synced tables created in standard catalogs.
      database_instance_name: 'my-database-instance'
      # logical_database_name is required for synced tables created in standard catalogs:
      logical_database_name: ${resources.database_catalogs.my_catalog.database_name}
      spec:
        source_table_full_name: 'source_catalog.schema.table'
        scheduling_policy: SNAPSHOT
        primary_key_columns:
          - my_pk_column
        create_database_objects_if_missing: true
        new_pipeline_spec:
          storage_catalog: 'my_delta_catalog'
          storage_schema: 'my_delta_schema'
```

This example creates a synced database table and customizes the pipeline schedule for it. It assumes you already have:

* A database instance named `my-database-instance`
* A standard catalog named `my_standard_catalog`
* A schema in the standard catalog named `default`
* A source delta table named `source_delta.schema.customer` with the primary key `c_custkey`

```yaml
resources:
  synced_database_tables:
    my_synced_table:
      name: 'my_standard_catalog.default.my_synced_table'
      database_instance_name: 'my-database-instance'
      logical_database_name: 'test_db'
      spec:
        source_table_full_name: 'source_delta.schema.customer'
        scheduling_policy: SNAPSHOT
        primary_key_columns:
          - c_custkey
        create_database_objects_if_missing: true
        new_pipeline_spec:
          storage_catalog: 'source_delta'
          storage_schema: 'schema'

  jobs:
    sync_pipeline_schedule_job:
      name: sync_pipeline_schedule_job
      description: 'Job to schedule synced database table pipeline.'
      tasks:
        - task_key: synced-table-pipeline
          pipeline_task:
            pipeline_id: ${resources.synced_database_tables.my_synced_table.data_synchronization_status.pipeline_id}
      schedule:
        quartz_cron_expression: '0 0 0 * * ?'
```

## <a id="vector_search_endpoints" />vector\_search\_endpoint

**`Type: Map`**

The vector\_search\_endpoint resource allows you to define [AI Search endpoints](https://docs.databricks.com/api/workspace/vectorsearchendpoints/createendpoint) in a bundle. For information about AI Search, see [Databricks AI Search](https://docs.databricks.com/aws/en/ai-search/ai-search.md).

Vector search endpoints are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.vector\_search\_endpoints](https://databricks.github.io/cli/python/databricks.bundles.vector_search_endpoints.html).

> [!NOTE]
>
> Using Declarative Automation Bundles to define vector search endpoints is only supported if you are using the [direct deployment engine](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).

*Added in Databricks CLI version 0.298.0*

```yaml
vector_search_endpoints:
  <vector_search_endpoint-name>:
    <vector_search_endpoint-field-name>: <vector_search_endpoint-field-value>
```

| Key                | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `budget_policy_id` | String   | (Public Preview) The ID of the budget policy to attribute the endpoint's usage to. If omitted, the default budget policy applies.<br />*Added in Databricks CLI version 0.298.0*                                                                                                                                                                                                                                         |
| `endpoint_type`    | String   | The type of endpoint to create. Valid values are:<br /><ul><li>`STANDARD`: Optimized for low-latency queries and supports `target_qps` scaling.</li><li>`STORAGE_OPTIMIZED`: Holds much larger indexes and indexes faster, with higher query latency.</li></ul><br />See [ Endpoint options](https://docs.databricks.com/aws/en/ai-search/ai-search.md#endpoint-options).<br />*Added in Databricks CLI version 0.298.0* |
| `lifecycle`        | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.298.0*                                                                                                                                                  |
| `name`             | String   | The name of the AI Search endpoint. The name must be unique within the workspace, have at most 50 characters, contain only lowercase letters, digits, hyphens, underscores, and periods, and start and end with a letter or digit.<br />*Added in Databricks CLI version 0.298.0*                                                                                                                                        |
| `permissions`      | Sequence | The permissions to apply to the AI Search endpoint. Allowed levels are `CAN_CREATE`, `CAN_MANAGE`, and `CAN_USE`. See [permissions](https://docs.databricks.com/aws/en/dev-tools/bundles/reference.md#permissions).<br />*Added in Databricks CLI version 0.298.0*                                                                                                                                                       |
| `target_qps`       | Integer  | The target queries per second for the AI Search endpoint. Supported for `STANDARD` endpoints only. The actual replica count is calculated at index creation or sync time based on this value. This is a best-effort target. The system does not guarantee that this QPS is achieved.<br />*Added in Databricks CLI version 0.299.2*                                                                                      |

#### Example

The following example defines an AI Search endpoint:

```yaml
# databricks.yml
bundle:
  name: vector-search-example
  engine: direct # Vector Search requires the direct deployment engine

resources:
  vector_search_endpoints:
    my_vector_search_endpoint:
      name: my_vector_search_endpoint
      endpoint_type: STANDARD
```

## <a id="vector_search_indexes" />vector\_search\_index

**`Type: Map`**

The vector\_search\_index resource allows you to define [vector search indexes](https://docs.databricks.com/api/workspace/vectorsearchindexes/createindex) in a bundle. For information about vector search, see [Databricks AI Search](https://docs.databricks.com/aws/en/ai-search/ai-search.md).

Vector search indexes are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.vector\_search\_indexes](https://databricks.github.io/cli/python/databricks.bundles.vector_search_indexes.html).

*Added in Databricks CLI version 1.1.0*

```yaml
vector_search_indexes:
  <vector_search_index-name>:
    <vector_search_index-field-name>: <vector_search_index-field-value>
```

| Key                        | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `delta_sync_index_spec`    | Map      | Specification for Delta Sync Index. Required if `index_type` is `DELTA_SYNC`. See [vector\_search\_index.delta\_sync\_index\_spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#vector_search_index-delta_sync_index_spec).<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                                         |
| `direct_access_index_spec` | Map      | Specification for Direct Vector Access Index. Required if `index_type` is `DIRECT_ACCESS`. See [vector\_search\_index.direct\_access\_index\_spec](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#vector_search_index-direct_access_index_spec).<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                      |
| `endpoint_name`            | String   | Required. Name of the endpoint to be used for serving the index.<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                                                                                                                                                                                                                         |
| `grants`                   | Sequence | The grants associated with the vector search index. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                                                                                                                                               |
| `index_subtype`            | String   | (Beta) The subtype of the index. Valid values are `HYBRID` and `FULL_TEXT`. `VECTOR` is not supported.<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                                                                                                                                                                                   |
| `index_type`               | String   | Required. The type of index to create, which determines which spec key is required. Valid values are:<br /><ul><li>`DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data changes.</li><li>`DIRECT_ACCESS`: An index that supports direct read and write of vectors and metadata through the REST and SDK APIs. With this model, the user manages index updates.<br />*Added in Databricks CLI version 1.1.0*</li></ul> |
| `lifecycle`                | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                                                                 |
| `name`                     | String   | Required. The three-level Unity Catalog name of the index to create.<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                                                                                                                                                                                                                     |
| `primary_key`              | String   | Required. The name of the column that uniquely identifies each row. For a Delta Sync index, it is a column of the source table. For a Direct Vector Access index, it must be declared in `schema_json`. It cannot be the embedding source or embedding vector column.<br />*Added in Databricks CLI version 1.1.0*                                                                                                                                                                                                    |

### <a id="vector_search_index-delta_sync_index_spec" />vector\_search\_index.delta\_sync\_index\_spec

**`Type: Map`**

Specification for a Delta Sync Index.

*Added in Databricks CLI version 1.1.0*

| Key                         | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                |
| --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `columns_to_index`          | Sequence | Optional. Alias for `columns_to_sync`. Select the columns to include in the vector index. If this field is blank, all columns from the source table are included. The primary key column and embedding source column or embedding vector column are always included. Only one of `columns_to_sync` or `columns_to_index` may be specified.                                                 |
| `columns_to_sync`           | Sequence | Optional. Select the columns to sync with the vector index. If this field is blank, all columns from the source table are synced with the index. The primary key column and embedding source column or embedding vector column are always synced.                                                                                                                                          |
| `embedding_source_columns`  | Sequence | The source table column whose text Databricks embeds, together with the embedding model endpoint to use. Set this for an index with Databricks-managed embeddings. Exactly one of `embedding_source_columns` or `embedding_vector_columns` must be specified unless the index subtype is `FULL_TEXT`, and only one column is supported.                                                    |
| `embedding_vector_columns`  | Sequence | The source table column that contains precomputed embedding vectors. Set this instead of `embedding_source_columns` for an index with self-managed embeddings.                                                                                                                                                                                                                             |
| `embedding_writeback_table` | String   | Optional. Name of the Delta table to sync the vector index contents and computed embeddings to.                                                                                                                                                                                                                                                                                            |
| `pipeline_type`             | String   | Pipeline execution mode. Valid values are:<br /><ul><li>`TRIGGERED`: The system stops processing after successfully refreshing the source table in the pipeline once, ensuring the table is updated based on the data available when the update started.</li><li>`CONTINUOUS`: The pipeline processes new data as it arrives in the source table to keep the vector index fresh.</li></ul> |
| `source_table`              | String   | The three-level Unity Catalog name of the source table that the index is synced from.                                                                                                                                                                                                                                                                                                      |

### <a id="vector_search_index-direct_access_index_spec" />vector\_search\_index.direct\_access\_index\_spec

**`Type: Map`**

Specification for a Direct Vector Access Index.

*Added in Databricks CLI version 1.1.0*

| Key                        | Type     | Description                                                                                                                                                                                                                                                                                                                          |
| -------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `embedding_source_columns` | Sequence | The embedding source configuration used to embed `query_text` when the index is queried with text, naming the embedding model endpoint to use. The index stores the vectors you supply through upsert. This setting never computes embeddings for them.                                                                              |
| `embedding_vector_columns` | Sequence | The column that holds the embedding vectors you write to the index. Exactly one column must be specified, and `schema_json` must declare it as `array<float>` or `array<double>`.                                                                                                                                                    |
| `schema_json`              | String   | A JSON object that maps each column name of the index to its type, serialized to a string. The primary key and the embedding vector column must be present. Supported types are `integer`, `long`, `float`, `double`, `boolean`, `string`, `date`, `timestamp`. Supported types for vector columns: `array<float>`, `array<double>`. |

#### Example

The following example defines a Delta Sync vector search index:

```yaml
resources:
  vector_search_endpoints:
    my_endpoint:
      name: my-endpoint
      endpoint_type: STANDARD
  vector_search_indexes:
    my_index:
      name: main.default.my_index
      endpoint_name: ${resources.vector_search_endpoints.my_endpoint.name}
      primary_key: id
      index_type: DELTA_SYNC
      delta_sync_index_spec:
        source_table: main.default.source
        pipeline_type: TRIGGERED
      grants:
        - principal: data-engineers
          privileges: [SELECT]
```

## <a id="volumes" />volume (Unity Catalog)

**`Type: Map`**

The volume resource type allows you to define and create Unity Catalog [volumes](https://docs.databricks.com/api/workspace/volumes/create) as part of a bundle. When deploying a bundle with a volume defined, note that:

* A volume cannot be referenced in the `artifact_path` for the bundle until it exists in the workspace. Hence, if you want to use Declarative Automation Bundles to create the volume, you must first define the volume in the bundle, deploy it to create the volume, then reference it in the `artifact_path` in subsequent deployments.
* Volumes in the bundle are not prepended with the `dev_${workspace.current_user.short_name}` prefix when the deployment target has `mode: development` configured. However, you can manually configure this prefix. See [Custom presets](https://docs.databricks.com/aws/en/dev-tools/bundles/deployment-modes.md#custom-presets).

Volumes are supported in [Python for Declarative Automation Bundles](https://docs.databricks.com/aws/en/dev-tools/bundles/python/index.md). See [databricks.bundles.volumes](https://databricks.github.io/cli/python/databricks.bundles.volumes.html).

*Added in Databricks CLI version 0.236.0*

```yaml
volumes:
  <volume-name>:
    <volume-field-name>: <volume-field-value>
```

| Key                | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `catalog_name`     | String   | The name of the catalog of the schema and volume.<br />*Added in Databricks CLI version 0.236.0*                                                                                                                                                                                                                                                                                                                              |
| `comment`          | String   | The comment attached to the volume.<br />*Added in Databricks CLI version 0.236.0*                                                                                                                                                                                                                                                                                                                                            |
| `grants`           | Sequence | The grants associated with the volume. See [grant](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#grants).<br />*Added in Databricks CLI version 0.236.0*                                                                                                                                                                                                                                                  |
| `lifecycle`        | Map      | Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [lifecycle](https://docs.databricks.com/aws/en/dev-tools/bundles/resources.md#lifecycle).<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                       |
| `name`             | String   | The name of the volume.<br />*Added in Databricks CLI version 0.236.0*                                                                                                                                                                                                                                                                                                                                                        |
| `schema_name`      | String   | The name of the schema where the volume is.<br />*Added in Databricks CLI version 0.236.0*                                                                                                                                                                                                                                                                                                                                    |
| `storage_location` | String   | The cloud storage URL where the files of the volume are stored. For an external volume, it must be set on creation to a path within an existing external location. For a managed volume, it must be omitted on creation. The volume is placed under the managed storage location of the parent schema, catalog, or metastore, and the assigned path is returned in this field.<br />*Added in Databricks CLI version 0.236.0* |
| `volume_type`      | String   | The volume type, either `EXTERNAL` or `MANAGED`. An external volume is located in the specified external location. A managed volume is located in the default location which is specified by the parent schema, or the parent catalog, or the metastore. See [Managed versus external volumes](https://docs.databricks.com/aws/en/volumes/index.md#diff).                                                                     |

#### Example

The following example creates a Unity Catalog volume with the key `my_volume_id`:

```yaml
resources:
  volumes:
    my_volume_id:
      catalog_name: main
      name: my_volume
      schema_name: my_schema
```

For an example bundle that runs a job that writes to a file in Unity Catalog volume, see the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/write_from_job_to_volume).

## Common objects

### <a id="grants" />grant

**`Type: Map`**

Defines the principal and privileges to grant to that principal. For more information about grants, see [Show, grant, and revoke privileges](https://docs.databricks.com/aws/en/data-governance/unity-catalog/manage-privileges/index.md#grant).

| Key          | Type     | Description                                                                                                                                                                                               |
| ------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `principal`  | String   | The name of the principal that will be granted privileges. This can be a user, group, or service principal.                                                                                               |
| `privileges` | Sequence | The privileges to grant to the specified entity. Valid values depend on the resource type (for example, `SELECT`, `MODIFY`, `CREATE`, `USAGE`, `READ_FILES`, `WRITE_FILES`, `EXECUTE`, `ALL_PRIVILEGES`). |

#### Example

The following example defines a Unity Catalog schema with grants:

```yaml
resources:
  schemas:
    my_schema:
      name: test-schema
      grants:
        - principal: users
          privileges:
            - SELECT
        - principal: my_team
          privileges:
            - MANAGE
      catalog_name: main
```

### <a id="lifecycle" />lifecycle

**`Type: Map`**

Contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed.

*Added in Databricks CLI version 0.268.0*

| Key               | Type     | Description                                                                                                                                                                                                                                                                                                                                                                                |
| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `depends_on`      | Sequence | Resources that must be deployed before this resource and deleted after it. Each item has a required `resource` key that specifies the key of the resource to depend on, as `foo` or `jobs.foo`. Unlike variable references, this only affects ordering.<br />*Added in Databricks CLI version 1.23.0*                                                                                      |
| `prevent_destroy` | Boolean  | Lifecycle setting to prevent the resource from being destroyed.<br />*Added in Databricks CLI version 0.268.0*                                                                                                                                                                                                                                                                             |
| `started`         | Boolean  | Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql\_warehouses in [direct deployment mode](https://docs.databricks.com/aws/en/dev-tools/bundles/direct.md).<br />*Added in Databricks CLI version 0.297.0* (apps)<br />*Added in Databricks CLI version 1.1.0* (clusters)<br />*Added in Databricks CLI version 1.2.0* (sql\_warehouses) |
| `triggers`        | Sequence | Conditions that re-fire the run, in addition to configuration changes. Only supported for `job_run`.<br />*Added in Databricks CLI version 1.13.0*                                                                                                                                                                                                                                         |
