diff --git a/.agent/rules/auto-generated-files.md b/.agent/rules/auto-generated-files.md index 833ac7e4cf4..97ababe8727 100644 --- a/.agent/rules/auto-generated-files.md +++ b/.agent/rules/auto-generated-files.md @@ -14,7 +14,6 @@ globs: - "internal/genkit/tagging.py" - "internal/mocks/**/*.go" - "bundle/direct/dresources/*.generated.yml" - - "bundle/docsgen/output/**/*.md" - "bundle/internal/schema/annotations_openapi.yml" - "bundle/internal/validation/generated/*.go" - "bundle/schema/jsonschema.json" @@ -36,7 +35,6 @@ paths: - "internal/genkit/tagging.py" - "internal/mocks/**/*.go" - "bundle/direct/dresources/*.generated.yml" - - "bundle/docsgen/output/**/*.md" - "bundle/internal/schema/annotations_openapi.yml" - "bundle/internal/validation/generated/*.go" - "bundle/schema/jsonschema.json" @@ -75,8 +73,6 @@ Files matching this rule's glob pattern are most likely generated artifacts. Aut - `./task generate-schema` - `./task generate-schema-docs` - This can also refresh `bundle/internal/schema/annotations_openapi.yml` when OpenAPI annotation extraction is enabled. -- Bundle docs: - - `./task generate-docs` - Validation generated code: - `./task generate-validation` - Mock files: diff --git a/.golangci.yaml b/.golangci.yaml index 5df32231eb0..565f46a5ca8 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -62,7 +62,6 @@ linters: no-stdlib-log: files: - "**" - - "!**/bundle/docsgen/**" - "!**/bundle/internal/schema/**" - "!**/bundle/internal/tf/codegen/**" - "!**/bundle/internal/validation/**" diff --git a/.wsignore b/.wsignore index bea28485827..c472fd672dd 100644 --- a/.wsignore +++ b/.wsignore @@ -26,8 +26,3 @@ python/databricks/bundles/*/_models/*.py # Developed elsewhere: internal/genkit/tagging.py - -# Docsgen: -bundle/docsgen/output/resources.md -bundle/docsgen/output/reference.md -bundle/docsgen/testdata/anchors.md diff --git a/AGENTS.md b/AGENTS.md index c8e078aa5eb..2d816bd7581 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,7 +40,6 @@ This is the Databricks CLI, a command-line interface for interacting with Databr ### Specialized Commands - `./task generate-schema` - Generate bundle JSON schema -- `./task generate-docs` - Generate bundle documentation - `./task generate-cligen` - Regenerate CLI command stubs from the checked-in .codegen/cli.json - `./task generate-clijson` - Refresh .codegen/cli.json from the OpenAPI spec via genkit (requires universe repo) - `./task generate` - Run all generators diff --git a/Taskfile.yml b/Taskfile.yml index af32e3acd1d..d72140290e2 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -57,7 +57,6 @@ tasks: - task: generate-schema-map - task: generate-schema-docs - task: generate-validation - - task: generate-docs - task: generate-direct - task: pydabs-codegen - task: pydabs-lint @@ -743,7 +742,6 @@ tasks: - task: generate-schema - task: generate-schema-docs - task: generate-validation - - task: generate-docs - task: generate-direct - task: pydabs-codegen @@ -765,7 +763,6 @@ tasks: - task: generate-refschema - task: generate-schema - task: generate-validation - - task: generate-docs - task: generate-direct - task: pydabs-codegen @@ -861,12 +858,12 @@ tasks: # Regenerates the OpenAPI annotation files (annotations_openapi*.yml) from the # checked-in .codegen/cli.json. This is the step that propagates a cli.json - # change into the schema/docs artifacts: generate-schema, generate-schema-docs - # and generate-docs all depend on it, so editing cli.json and running - # `task generate` percolates into jsonschema.json, the docs and pydabs. + # change into the schema/docs artifacts: generate-schema and generate-schema-docs + # both depend on it, so editing cli.json and running `task generate` + # percolates into jsonschema.json, jsonschema_for_docs.json and pydabs. generate-annotations: desc: Regenerate annotation files from .codegen/cli.json - # Dep of generate-schema, generate-schema-docs and generate-docs; `run: once` + # Dep of generate-schema and generate-schema-docs; `run: once` # plus the fingerprint keep `task generate` from re-running it per parent. run: once sources: @@ -913,23 +910,6 @@ tasks: - git fetch origin 'refs/tags/v*:refs/tags/v*' - "go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema_for_docs.json --docs" - generate-docs: - desc: Generate bundle documentation - deps: ['generate-annotations'] - sources: - - "**/*.go" - - bundle/docsgen/templates/** - - bundle/internal/schema/annotations*.yml - - exclude: "**/*_test.go" - - go.mod - - go.sum - - "{{.EMBED_SOURCES}}" - generates: - - bundle/docsgen/output/reference.md - - bundle/docsgen/output/resources.md - cmds: - - "go run ./bundle/docsgen ./bundle/internal/schema ./bundle/docsgen" - generate-validation: desc: Generate enum and required field validation code sources: diff --git a/bundle/docsgen/README.md b/bundle/docsgen/README.md deleted file mode 100644 index 0468945dc7d..00000000000 --- a/bundle/docsgen/README.md +++ /dev/null @@ -1,79 +0,0 @@ -## docs-autogen - -1. Install [Golang](https://go.dev/doc/install) -2. Run `./task generate-docs` from the repo -3. See generated documents in `./bundle/docsgen/output` directory -4. To change descriptions update content in `./bundle/internal/schema/annotations.yml` or `./bundle/internal/schema/annotations_openapi_overrides.yml` and re-run `./task generate-docs` - -For simpler usage run it together with copy command to move resulting files to local `docs` repo. Note that it will overwrite any local changes in affected files. Example: - -``` -task generate-docs && cp bundle/docgen/output/*.md ../docs/source/dev-tools/bundles -``` - -To change intro sections for files update them in `templates/` directory - -### Annotation file structure - -```yaml -"": - "": - description: Description of the property, only plain text is supported - markdown_description: Description with markdown support, if defined it will override the value in docs and in JSON-schema - markdown_examples: Custom block for any example, in free form, Markdown is supported - title: JSON-schema title, not used in docs - default: Default value of the property, not used in docs - enum: Possible values of enum-type, not used in docs -``` - -Descriptions with `PLACEHOLDER` value are not displayed in docs and JSON-schema - -All relative links like `[_](/dev-tools/bundles/settings.md#cluster_id)` are kept as is in docs but converted to absolute links in JSON schema - -To change description for type itself (not its fields) use `"_"`: - -```yaml -github.com/databricks/cli/bundle/config/resources.Cluster: - "_": - "markdown_description": |- - The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). -``` - -### Example annotation - -```yaml -github.com/databricks/cli/bundle/config.Bundle: - "cluster_id": - "description": |- - The ID of a cluster to use to run the bundle. - "markdown_description": |- - The ID of a cluster to use to run the bundle. See [_](/dev-tools/bundles/settings.md#cluster_id). - "compute_id": - "description": |- - PLACEHOLDER - "databricks_cli_version": - "description": |- - The Databricks CLI version to use for the bundle. - "markdown_description": |- - The Databricks CLI version to use for the bundle. See [_](/dev-tools/bundles/settings.md#databricks_cli_version). - "deployment": - "description": |- - The definition of the bundle deployment - "markdown_description": |- - The definition of the bundle deployment. For supported attributes, see [_](#deployment) and [_](/dev-tools/bundles/deployment-modes.md). - "git": - "description": |- - The Git version control details that are associated with your bundle. - "markdown_description": |- - The Git version control details that are associated with your bundle. For supported attributes, see [_](#git) and [_](/dev-tools/bundles/settings.md#git). - "name": - "description": |- - The name of the bundle. - "uuid": - "description": |- - PLACEHOLDER -``` - -### TODO - -Add file watcher to track changes in the annotation files and re-run `./task generate-docs` script automtically diff --git a/bundle/docsgen/main.go b/bundle/docsgen/main.go deleted file mode 100644 index ec177c40c80..00000000000 --- a/bundle/docsgen/main.go +++ /dev/null @@ -1,148 +0,0 @@ -package main - -import ( - "errors" - "fmt" - "io/fs" - "log" - "os" - "path" - "reflect" - "strings" - - "github.com/databricks/cli/bundle/config" - "github.com/databricks/cli/bundle/internal/annotation" - "github.com/databricks/cli/libs/jsonschema" -) - -const ( - rootFileName = "reference.md" - resourcesFileName = "resources.md" -) - -func main() { - if len(os.Args) != 3 { - fmt.Println("Usage: go run main.go ") - os.Exit(1) - } - - annotationDir := os.Args[1] - docsDir := os.Args[2] - outputDir := path.Join(docsDir, "output") - templatesDir := path.Join(docsDir, "templates") - - if _, err := os.Stat(outputDir); errors.Is(err, fs.ErrNotExist) { - if err := os.MkdirAll(outputDir, 0o755); err != nil { - log.Fatal(err) - } - } - - rootHeader, err := os.ReadFile(path.Join(templatesDir, rootFileName)) - if err != nil { - log.Fatal(err) - } - err = generateDocs( - []string{path.Join(annotationDir, "annotations.yml")}, - path.Join(outputDir, rootFileName), - reflect.TypeFor[config.Root](), - string(rootHeader), - ) - if err != nil { - log.Fatal(err) - } - resourcesHeader, err := os.ReadFile(path.Join(templatesDir, resourcesFileName)) - if err != nil { - log.Fatal(err) - } - err = generateDocs( - []string{path.Join(annotationDir, "annotations_openapi.yml"), path.Join(annotationDir, "annotations_openapi_overrides.yml"), path.Join(annotationDir, "annotations.yml")}, - path.Join(outputDir, resourcesFileName), - reflect.TypeFor[config.Resources](), - string(resourcesHeader), - ) - if err != nil { - log.Fatal(err) - } -} - -func generateDocs(inputPaths []string, outputPath string, rootType reflect.Type, header string) error { - annotations, err := annotation.LoadAndMerge(inputPaths) - if err != nil { - log.Fatal(err) - } - - // schemas is used to resolve references to schemas - schemas := map[string]*jsonschema.Schema{} - // ownFields is used to track fields that are defined in the annotation file and should be included in the docs page - ownFields := map[string]bool{} - - s, err := jsonschema.FromType(rootType, []func(reflect.Type, jsonschema.Schema) jsonschema.Schema{ - func(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { - _, isOwnField := annotations[jsonschema.TypePath(typ)] - if isOwnField { - ownFields[jsonschema.TypePath(typ)] = true - } - - refPath := getPath(typ) - shouldHandle := strings.HasPrefix(refPath, "github.com") - if !shouldHandle { - schemas[jsonschema.TypePath(typ)] = &s - return s - } - - a := annotations[refPath] - if a == nil { - a = map[string]annotation.Descriptor{} - } - - rootTypeAnnotation, ok := a["_"] - if ok { - assignAnnotation(&s, rootTypeAnnotation) - } - - for k, v := range s.Properties { - assignAnnotation(v, a[k]) - } - - schemas[jsonschema.TypePath(typ)] = &s - return s - }, - }) - if err != nil { - log.Fatal(err) - } - - nodes := buildNodes(s, schemas, ownFields) - err = buildMarkdown(nodes, outputPath, header) - if err != nil { - log.Fatal(err) - } - return nil -} - -func getPath(typ reflect.Type) string { - return typ.PkgPath() + "." + typ.Name() -} - -func assignAnnotation(s *jsonschema.Schema, a annotation.Descriptor) { - if a.Description != "" && a.Description != annotation.Placeholder { - s.Description = a.Description - } - if a.MarkdownDescription != "" { - s.MarkdownDescription = a.MarkdownDescription - } - if a.MarkdownExamples != "" { - s.Examples = []string{a.MarkdownExamples} - } - if a.DeprecationMessage != "" { - s.Deprecated = true - s.DeprecationMessage = a.DeprecationMessage - } - if a.Preview == "PRIVATE" { - s.DoNotSuggest = true - s.Preview = a.Preview - } - if a.OutputOnly != nil && *a.OutputOnly { - s.DoNotSuggest = true - } -} diff --git a/bundle/docsgen/markdown.go b/bundle/docsgen/markdown.go deleted file mode 100644 index 4055e362bda..00000000000 --- a/bundle/docsgen/markdown.go +++ /dev/null @@ -1,111 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - "strings" -) - -func buildMarkdown(nodes []rootNode, outputFile, header string) error { - m := newMardownRenderer() - m = m.PlainText(header) - for _, node := range nodes { - m = m.LF() - title := node.Title - if node.TopLevel { - m = m.H2(title) - } else { - m = m.H3(title) - } - m = m.LF() - - if node.Type != "" { - m = m.PlainText(fmt.Sprintf("**`Type: %s`**", node.Type)) - m = m.LF() - } - m = m.PlainText(node.Description) - m = m.LF() - - if len(node.ObjectKeyAttributes) > 0 { - n := pickLastWord(node.Title) - n = removePluralForm(n) - m = m.CodeBlocks("yaml", fmt.Sprintf("%ss:\n <%s-name>:\n <%s-field-name>: <%s-field-value>", n, n, n, n)) - m = m.LF() - m = buildAttributeTable(m, node.ObjectKeyAttributes) - } else if len(node.ArrayItemAttributes) > 0 { - m = m.LF() - m = buildAttributeTable(m, node.ArrayItemAttributes) - } else if len(node.Attributes) > 0 { - m = m.LF() - m = buildAttributeTable(m, node.Attributes) - } - - if node.Example != "" { - m = m.LF() - m = m.PlainText("**Example**") - m = m.LF() - m = m.PlainText(node.Example) - } - } - - f, err := os.Create(outputFile) - if err != nil { - log.Fatal(err) - } - _, err = f.WriteString(m.String()) - if err != nil { - log.Fatal(err) - } - return f.Close() -} - -func pickLastWord(s string) string { - words := strings.Split(s, ".") - return words[len(words)-1] -} - -// Build a custom table which we use in Databricks website -func buildAttributeTable(m *markdownRenderer, attributes []attributeNode) *markdownRenderer { - m = m.LF() - m = m.PlainText(":::list-table") - m = m.LF() - - m = m.PlainText("- - Key") - m = m.PlainText(" - Type") - m = m.PlainText(" - Description") - m = m.LF() - - for _, a := range attributes { - m = m.PlainText("- - " + fmt.Sprintf("`%s`", a.Title)) - m = m.PlainText(" - " + a.Type) - m = m.PlainText(" - " + formatDescription(a)) - m = m.LF() - } - - m = m.PlainText(":::") - m = m.LF() - - return m -} - -func formatDescription(a attributeNode) string { - s := strings.ReplaceAll(a.Description, "\n", " ") - if a.Link != "" { - if strings.HasSuffix(s, ".") { - s += " " - } else if s != "" { - s += ". " - } - s += fmt.Sprintf("See [\\_](#%s).", cleanAnchor(a.Link)) - } - return s -} - -// Docs framework does not allow special characters in anchor links and strip them out by default -// We need to clean them up to make sure the links pass the validation -func cleanAnchor(s string) string { - s = strings.ReplaceAll(s, ".", "") - s = strings.ReplaceAll(s, nameFieldWithFormat, nameField) - return s -} diff --git a/bundle/docsgen/markdown_test.go b/bundle/docsgen/markdown_test.go deleted file mode 100644 index 5463eeef3c0..00000000000 --- a/bundle/docsgen/markdown_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "path/filepath" - "testing" - - "github.com/databricks/cli/internal/testutil" - "github.com/stretchr/testify/require" -) - -func TestBuildMarkdownAnchors(t *testing.T) { - nodes := []rootNode{ - { - Title: "some_field", - TopLevel: true, - Type: "Map", - Description: "This is a description", - Attributes: []attributeNode{ - { - Title: "my_attribute", - Type: "Map", - Description: "Desc with link", - Link: "some_field._name_.my_attribute", - }, - }, - }, - { - Title: "some_field._name_.my_attribute", - TopLevel: false, - Type: "Boolean", - Description: "Another description", - }, - } - tmpDir := t.TempDir() - path := filepath.Join(tmpDir, "output.md") - - err := buildMarkdown(nodes, path, "Header") - require.NoError(t, err) - - expected := testutil.ReadFile(t, "testdata/anchors.md") - testutil.AssertFileContents(t, path, expected) -} diff --git a/bundle/docsgen/nodes.go b/bundle/docsgen/nodes.go deleted file mode 100644 index a6f629ca429..00000000000 --- a/bundle/docsgen/nodes.go +++ /dev/null @@ -1,247 +0,0 @@ -package main - -import ( - "cmp" - "slices" - "strings" - - "github.com/databricks/cli/libs/jsonschema" -) - -// rootNode is an intermediate representation of resolved JSON-schema item that is used to generate documentation -// Every schema node goes follows this conversion `JSON-schema -> rootNode -> markdown text` -type rootNode struct { - Title string - Description string - Attributes []attributeNode - Example string - ObjectKeyAttributes []attributeNode - ArrayItemAttributes []attributeNode - TopLevel bool - Type string -} - -type attributeNode struct { - Title string - Type string - Description string - Link string -} - -type rootProp struct { - // k is the name of the property - k string - // v is the corresponding json-schema node - v *jsonschema.Schema - // topLevel is true only for direct properties of the schema of root type (e.g. config.Root or config.Resources) - // Example: config.Root has . - topLevel bool - // circular indicates if property was added by recursive type, e.g. task.for_each_task.task.for_each_task - // These entries don't expand further and don't add any new nodes from their properties - circular bool -} - -const MapType = "Map" - -// buildNodes converts JSON-schema to a flat list of rootNode items that are then used to generate markdown documentation -// It recursively traverses the schema expanding the resulting list with new items for every properties of nodes `object` and `array` type -func buildNodes(s jsonschema.Schema, refs map[string]*jsonschema.Schema, ownFields map[string]bool) []rootNode { - var rootProps []rootProp - for k, v := range s.Properties { - rootProps = append(rootProps, rootProp{k, v, true, false}) - } - nodes := make([]rootNode, 0, len(rootProps)) - visited := make(map[string]bool) - - for i := 0; i < len(rootProps); i++ { - item := rootProps[i] - k := item.k - v := item.v - - if visited[k] { - continue - } - visited[k] = true - v = resolveRefs(v, refs) - - if v.Deprecated { - continue - } - if v.DoNotSuggest { - continue - } - - node := rootNode{ - Title: k, - Description: getDescription(v), - TopLevel: item.topLevel, - Example: getExample(v), - Type: getHumanReadableType(v.Type), - } - - hasProperties := len(v.Properties) > 0 - if hasProperties { - node.Attributes = getAttributes(v.Properties, refs, ownFields, k, item.circular) - } - - mapValueType := getMapValueType(v, refs) - if mapValueType != nil { - d := getDescription(mapValueType) - if d != "" { - node.Description = d - } - if node.Example == "" { - node.Example = getExample(mapValueType) - } - node.ObjectKeyAttributes = getAttributes(mapValueType.Properties, refs, ownFields, getMapKeyPrefix(k), item.circular) - } - - arrayItemType := resolveRefs(v.Items, refs) - if arrayItemType != nil { - node.ArrayItemAttributes = getAttributes(arrayItemType.Properties, refs, ownFields, k, item.circular) - } - - nodes = append(nodes, node) - - // Whether we should add new root props from the children of the current JSON-schema node to include their definitions to this document - shouldAddNewProps := !item.circular - if shouldAddNewProps { - var newProps []rootProp - // Adds node with definition for the properties. Example: - // bundle: - // prop-name: - if hasProperties { - newProps = append(newProps, extractNodes(k, v.Properties, refs, ownFields)...) - } - - // Adds node with definition for the type of array item. Example: - // permissions: - // - - if arrayItemType != nil { - newProps = append(newProps, extractNodes(k, arrayItemType.Properties, refs, ownFields)...) - } - // Adds node with definition for the type of the Map value. Example: - // targets: - // : - if mapValueType != nil { - newProps = append(newProps, extractNodes(getMapKeyPrefix(k), mapValueType.Properties, refs, ownFields)...) - } - - rootProps = append(rootProps, newProps...) - } - } - - slices.SortFunc(nodes, func(a, b rootNode) int { - return cmp.Compare(a.Title, b.Title) - }) - return nodes -} - -func getMapValueType(v *jsonschema.Schema, refs map[string]*jsonschema.Schema) *jsonschema.Schema { - additionalProps, ok := v.AdditionalProperties.(*jsonschema.Schema) - if ok { - return resolveRefs(additionalProps, refs) - } - return nil -} - -const ( - nameField = "name" - nameFieldWithFormat = "_name_" -) - -func getMapKeyPrefix(s string) string { - return s + "." + nameFieldWithFormat -} - -func removePluralForm(s string) string { - if before, ok := strings.CutSuffix(s, "s"); ok { - return before - } - return s -} - -func getHumanReadableType(t jsonschema.Type) string { - typesMapping := map[string]string{ - "string": "String", - "integer": "Integer", - "boolean": "Boolean", - "array": "Sequence", - "object": "Map", - } - return typesMapping[string(t)] -} - -func getAttributes(props, refs map[string]*jsonschema.Schema, ownFields map[string]bool, prefix string, circular bool) []attributeNode { - var attributes []attributeNode - for k, v := range props { - v = resolveRefs(v, refs) - if v.DoNotSuggest { - continue - } - typeString := getHumanReadableType(v.Type) - if typeString == "" { - typeString = "Any" - } - var reference string - if isReferenceType(v, refs, ownFields) && !circular && !v.Deprecated { - reference = prefix + "." + k - } - attributes = append(attributes, attributeNode{ - Title: k, - Type: typeString, - Description: getDescription(v), - Link: reference, - }) - } - slices.SortFunc(attributes, func(a, b attributeNode) int { - return cmp.Compare(a.Title, b.Title) - }) - return attributes -} - -func getDescription(s *jsonschema.Schema) string { - if s.DeprecationMessage != "" { - return s.DeprecationMessage - } - if s.MarkdownDescription != "" { - return s.MarkdownDescription - } - return s.Description -} - -func shouldExtract(ref string, ownFields map[string]bool) bool { - if i := strings.Index(ref, "github.com"); i >= 0 { - ref = ref[i:] - } - _, isCustomField := ownFields[ref] - return isCustomField -} - -// extractNodes returns a list of rootProp items for all properties of the json-schema node that should be extracted based on context -// E.g. we extract all propert -func extractNodes(prefix string, props, refs map[string]*jsonschema.Schema, ownFields map[string]bool) []rootProp { - var nodes []rootProp - for k, v := range props { - if v.Reference != nil && !shouldExtract(*v.Reference, ownFields) { - continue - } - v = resolveRefs(v, refs) - if v.Type == "object" || v.Type == "array" { - nodes = append(nodes, rootProp{prefix + "." + k, v, false, isCycleField(k)}) - } - } - return nodes -} - -func isCycleField(field string) bool { - return field == "for_each_task" -} - -func getExample(v *jsonschema.Schema) string { - examples := getExamples(v.Examples) - if len(examples) == 0 { - return "" - } - return examples[0] -} diff --git a/bundle/docsgen/nodes_test.go b/bundle/docsgen/nodes_test.go deleted file mode 100644 index 227d1bc01b3..00000000000 --- a/bundle/docsgen/nodes_test.go +++ /dev/null @@ -1,172 +0,0 @@ -package main - -import ( - "testing" - - "github.com/databricks/cli/libs/jsonschema" - "github.com/stretchr/testify/assert" -) - -func TestBuildNodes_ChildExpansion(t *testing.T) { - tests := []struct { - name string - schema jsonschema.Schema - refs map[string]*jsonschema.Schema - ownFields map[string]bool - wantNodes []rootNode - }{ - { - name: "array expansion", - schema: jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "list": { - Type: "array", - Items: &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "listSub": {Reference: new("#/$defs/github.com/listSub")}, - }, - }, - }, - }, - }, - refs: map[string]*jsonschema.Schema{ - "github.com/listSub": {Type: "array", Items: &jsonschema.Schema{Type: "object", Properties: map[string]*jsonschema.Schema{"subField": {Type: "string"}}}}, - }, - ownFields: map[string]bool{"github.com/listSub": true}, - wantNodes: []rootNode{ - { - Title: "list", - TopLevel: true, - Type: "Sequence", - ArrayItemAttributes: []attributeNode{ - {Title: "listSub", Type: "Sequence", Link: "list.listSub"}, - }, - }, - { - Title: "list.listSub", - Type: "Sequence", - ArrayItemAttributes: []attributeNode{ - {Title: "subField", Type: "String"}, - }, - }, - }, - }, - { - name: "map expansion", - schema: jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "myMap": { - Type: "object", - AdditionalProperties: &jsonschema.Schema{ - Reference: new("#/$defs/github.com/myMap"), - Properties: map[string]*jsonschema.Schema{ - "mapSub": {Type: "object", Reference: new("#/$defs/github.com/mapSub")}, - }, - }, - }, - }, - }, - refs: map[string]*jsonschema.Schema{ - "github.com/myMap": { - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "mapSub": {Type: "boolean", Reference: new("#/$defs/github.com/mapSub")}, - }, - }, - "github.com/mapSub": { - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "deepSub": {Type: "boolean"}, - }, - }, - }, - ownFields: map[string]bool{ - "github.com/myMap": true, - "github.com/mapSub": true, - }, - wantNodes: []rootNode{ - { - Title: "myMap", - TopLevel: true, - Type: "Map", - ObjectKeyAttributes: []attributeNode{ - {Title: "mapSub", Type: "Map", Link: "myMap._name_.mapSub"}, - }, - }, - { - Title: "myMap._name_.mapSub", - Type: "Map", - Attributes: []attributeNode{ - {Title: "deepSub", Type: "Boolean"}, - }, - }, - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - got := buildNodes(tt.schema, tt.refs, tt.ownFields) - assert.Equal(t, tt.wantNodes, got) - }) - } -} - -func TestDeprecatedFields(t *testing.T) { - s := jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "deprecatedField": {Deprecated: true}, - "notDeprecatedField": { - Properties: map[string]*jsonschema.Schema{ - "nestedDeprecatedField": { - Deprecated: true, - Description: "nested description", - Extension: jsonschema.Extension{ - DeprecationMessage: "nested deprecation message", - }, - }, - "nestedNotDeprecatedField": {}, - }, - }, - }, - } - nodes := buildNodes(s, nil, nil) - assert.Len(t, nodes, 1) - assert.Equal(t, "notDeprecatedField", nodes[0].Title) - - assert.Len(t, nodes[0].Attributes, 2) - assert.Equal(t, "nested deprecation message", nodes[0].Attributes[0].Description) -} - -func TestDoNotSuggestFields(t *testing.T) { - s := jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "doNotSuggestField": {Extension: jsonschema.Extension{DoNotSuggest: true}}, - "notDoNotSuggestField": { - Properties: map[string]*jsonschema.Schema{ - "nestedDoNotSuggestField": { - Description: "nested description", - Extension: jsonschema.Extension{ - DeprecationMessage: "nested do message", - DoNotSuggest: true, - }, - }, - "nestedNotDoNotSuggestField": { - Description: "nested suggested field", - }, - }, - }, - }, - } - nodes := buildNodes(s, nil, nil) - assert.Len(t, nodes, 1) - assert.Equal(t, "notDoNotSuggestField", nodes[0].Title) - - assert.Len(t, nodes[0].Attributes, 1) - assert.Equal(t, "nestedNotDoNotSuggestField", nodes[0].Attributes[0].Title) -} diff --git a/bundle/docsgen/output/.gitattributes b/bundle/docsgen/output/.gitattributes deleted file mode 100644 index 4a85861fe69..00000000000 --- a/bundle/docsgen/output/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.md linguist-generated=true diff --git a/bundle/docsgen/output/reference.md b/bundle/docsgen/output/reference.md deleted file mode 100644 index c809681d926..00000000000 --- a/bundle/docsgen/output/reference.md +++ /dev/null @@ -1,5756 +0,0 @@ ---- -description: 'Configuration reference for databricks.yml' ---- - - - -# Configuration reference - -This article provides reference for keys supported by :re[DABS] configuration (YAML). See [\_](/dev-tools/bundles/index.md). - -For complete bundle examples, see [\_](/dev-tools/bundles/resource-examples.md) and the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples). - - -## artifacts - -**`Type: Map`** - -Defines the attributes to build artifacts, where each key is the name of the artifact, and the value is a Map that defines the artifact build settings. For information about the `artifacts` mapping, see [\_](/dev-tools/bundles/settings.md#artifacts). - -Artifact settings defined in the top level of the bundle configuration can be overridden in the `targets` mapping. See [\_](/dev-tools/bundles/artifact-overrides.md). - -```yaml -artifacts: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `build` - - String - - An optional set of build commands to run locally before deployment. - -- - `dynamic_version` - - Boolean - - Whether to patch the wheel version dynamically based on the timestamp of the whl file. If this is set to `true`, new code can be deployed without having to update the version in `setup.py` or `pyproject.toml`. This setting is only valid when `type` is set to `whl`. See [\_](/dev-tools/bundles/settings.md#bundle-syntax-mappings-artifacts). - -- - `executable` - - String - - The executable type. Valid values are `bash`, `sh`, and `cmd`. - -- - `files` - - Sequence - - The relative or absolute path to the built artifact files. See [\_](#artifactsnamefiles). - -- - `path` - - String - - The local path of the directory for the artifact. - -- - `type` - - String - - Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. - -::: - - -**Example** - -```yaml -artifacts: - default: - type: whl - build: poetry build - path: . -``` - -### artifacts._name_.files - -**`Type: Sequence`** - -The relative or absolute path to the built artifact files. - - - -:::list-table - -- - Key - - Type - - Description - -- - `source` - - String - - Required. The artifact source file. - -::: - - -## bundle - -**`Type: Map`** - -The bundle attributes when deploying to this target, - - - -:::list-table - -- - Key - - Type - - Description - -- - `cluster_id` - - String - - The ID of a cluster to use to run the bundle. See [\_](/dev-tools/bundles/settings.md#cluster_id). - -- - `compute_id` - - String - - Deprecated. The ID of the compute to use to run the bundle. - -- - `databricks_cli_version` - - String - - The Databricks CLI version to use for the bundle. See [\_](/dev-tools/bundles/settings.md#databricks_cli_version). - -- - `deployment` - - Map - - The definition of the bundle deployment. For supported attributes see [\_](/dev-tools/bundles/deployment-modes.md). See [\_](#bundledeployment). - -- - `engine` - - String - - The deployment engine to use. Valid values are `terraform` and `direct`. Takes priority over `DATABRICKS_BUNDLE_ENGINE` environment variable. Default is "terraform". - -- - `git` - - Map - - The Git version control details that are associated with your bundle. For supported attributes see [\_](/dev-tools/bundles/settings.md#git). See [\_](#bundlegit). - -- - `name` - - String - - The name of the bundle. - -- - `uuid` - - String - - Reserved. A Universally Unique Identifier (UUID) for the bundle that uniquely identifies the bundle in internal Databricks systems. This is generated when a bundle project is initialized using a Databricks template (using the `databricks bundle init` command). - -::: - - -### bundle.deployment - -**`Type: Map`** - -The definition of the bundle deployment. For supported attributes see [\_](/dev-tools/bundles/deployment-modes.md). - - - -:::list-table - -- - Key - - Type - - Description - -- - `fail_on_active_runs` - - Boolean - - Whether to fail on active runs. If this is set to true a deployment that is running can be interrupted. - -- - `lock` - - Map - - The deployment lock attributes. See [\_](#bundledeploymentlock). - -::: - - -### bundle.deployment.lock - -**`Type: Map`** - -The deployment lock attributes. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - Whether this lock is enabled. - -- - `force` - - Boolean - - Whether to force this lock if it is enabled. - -::: - - -### bundle.git - -**`Type: Map`** - -The Git version control details that are associated with your bundle. For supported attributes see [\_](/dev-tools/bundles/settings.md#git). - - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - The Git branch name. See [\_](/dev-tools/bundles/settings.md#git). - -- - `origin_url` - - String - - The origin URL of the repository. See [\_](/dev-tools/bundles/settings.md#git). - -::: - - -## experimental - -**`Type: Map`** - -Defines attributes for experimental features. - - - -:::list-table - -- - Key - - Type - - Description - -- - `pydabs` - - Map - - Deprecated: please use python instead - -- - `python` - - Map - - Configures loading of Python code defined with 'databricks-bundles' package. See [\_](#experimentalpython). - -- - `python_wheel_wrapper` - - Boolean - - Whether to use a Python wheel wrapper. - -- - `record_deployment_history` - - Boolean - - Whether to record deployment history using the deployment metadata service (DMS), which tracks what changed across deployments. - -- - `scripts` - - Map - - The commands to run. - -- - `skip_artifact_cleanup` - - Boolean - - Determines whether to skip cleaning up the .internal folder - -- - `skip_name_prefix_for_schema` - - Boolean - - Skip adding the prefix that is either set in `presets.name_prefix` or computed when `mode: development` is set, to the names of UC schemas defined in the bundle. - -- - `use_legacy_run_as` - - Boolean - - Whether to use the legacy run_as behavior. - -::: - - -### experimental.python - -**`Type: Map`** - -Configures loading of Python code defined with 'databricks-bundles' package. - - - -:::list-table - -- - Key - - Type - - Description - -- - `mutators` - - Sequence - - Mutators contains a list of fully qualified function paths to mutator functions. Example: ["my_project.mutators:add_default_cluster"] - -- - `resources` - - Sequence - - Resources contains a list of fully qualified function paths to load resources defined in Python code. Example: ["my_project.resources:load_resources"] - -- - `venv_path` - - String - - VEnvPath is path to the virtual environment. If enabled, Python code will execute within this environment. If disabled, it defaults to using the Python interpreter available in the current shell. - -::: - - -## include - -**`Type: Sequence`** - -Specifies a list of path globs that contain configuration files to include within the bundle. See [\_](/dev-tools/bundles/settings.md#include). - - -## permissions - -**`Type: Sequence`** - -A Sequence that defines the permissions to apply to experiments, jobs, pipelines, and models defined in the bundle, where each item in the sequence is a permission for a specific entity. - -See [\_](/dev-tools/bundles/settings.md#permissions) and [\_](/dev-tools/bundles/permissions.md). - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -**Example** - -```yaml -permissions: - - level: CAN_VIEW - group_name: test-group - - level: CAN_MANAGE - user_name: someone@example.com - - level: CAN_RUN - service_principal_name: 123456-abcdef -``` - -## presets - -**`Type: Map`** - -Defines bundle deployment presets. See [\_](/dev-tools/bundles/deployment-modes.md#presets). - - - -:::list-table - -- - Key - - Type - - Description - -- - `artifacts_dynamic_version` - - Boolean - - Whether to enable dynamic_version on all artifacts. - -- - `jobs_max_concurrent_runs` - - Integer - - The maximum concurrent runs for a job. - -- - `name_prefix` - - String - - The prefix for job runs of the bundle. - -- - `pipelines_development` - - Boolean - - Whether pipeline deployments should be locked in development mode. - -- - `source_linked_deployment` - - Boolean - - Whether to link the deployment to the bundle source. - -- - `tags` - - Map - - The tags for the bundle deployment. - -- - `trigger_pause_status` - - String - - A pause status to apply to all job triggers and schedules. Valid values are PAUSED or UNPAUSED. - -::: - - -## python - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `mutators` - - Sequence - - Mutators contains a list of fully qualified function paths to mutator functions. Example: ["my_project.mutators:add_default_cluster"] - -- - `resources` - - Sequence - - Resources contains a list of fully qualified function paths to load resources defined in Python code. Example: ["my_project.resources:load_resources"] - -- - `venv_path` - - String - - VEnvPath is path to the virtual environment. If enabled, Python code will execute within this environment. If disabled, it defaults to using the Python interpreter available in the current shell. - -::: - - -## resources - -**`Type: Map`** - -A Map that defines the resources for the bundle, where each key is the name of the resource, and the value is a Map that defines the resource. For more information about Declarative Automation Bundles supported resources, and resource definition reference, see [\_](/dev-tools/bundles/resources.md). - -```yaml -resources: - : - : - : -``` - - - -:::list-table - -- - Key - - Type - - Description - -- - `alerts` - - Map - - See [\_](#resourcesalerts). - -- - `apps` - - Map - - The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). See [\_](#resourcesapps). - -- - `catalogs` - - Map - - See [\_](#resourcescatalogs). - -- - `clusters` - - Map - - The cluster definitions for the bundle, where each key is the name of a cluster. See [\_](/dev-tools/bundles/resources.md#clusters). - -- - `dashboards` - - Map - - The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). See [\_](#resourcesdashboards). - -- - `database_catalogs` - - Map - - - -- - `database_instances` - - Map - - See [\_](#resourcesdatabase_instances). - -- - `experiments` - - Map - - The experiment definitions for the bundle, where each key is the name of the experiment. See [\_](/dev-tools/bundles/resources.md#experiments). - -- - `external_locations` - - Map - - See [\_](#resourcesexternal_locations). - -- - `genie_spaces` - - Map - - See [\_](#resourcesgenie_spaces). - -- - `jobs` - - Map - - The job definitions for the bundle, where each key is the name of the job. See [\_](/dev-tools/bundles/resources.md#jobs). - -- - `model_serving_endpoints` - - Map - - The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. See [\_](/dev-tools/bundles/resources.md#model_serving_endpoints). - -- - `models` - - Map - - The model definitions for the bundle, where each key is the name of the model. See [\_](/dev-tools/bundles/resources.md#models). - -- - `pipelines` - - Map - - The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). See [\_](#resourcespipelines). - -- - `postgres_branches` - - Map - - See [\_](#resourcespostgres_branches). - -- - `postgres_catalogs` - - Map - - The Postgres catalog definitions for the bundle, where each key is the name of the catalog. Each entry binds a Unity Catalog catalog to a Postgres database on a Lakebase Autoscaling branch. See [\_](#resourcespostgres_catalogs). - -- - `postgres_endpoints` - - Map - - See [\_](#resourcespostgres_endpoints). - -- - `postgres_projects` - - Map - - See [\_](#resourcespostgres_projects). - -- - `postgres_synced_tables` - - Map - - The Postgres synced table definitions for the bundle, where each key is the name of the synced table. Each entry continuously replicates a Unity Catalog Delta source table into a Postgres table on a Lakebase Autoscaling instance. See [\_](#resourcespostgres_synced_tables). - -- - `quality_monitors` - - Map - - The quality monitor definitions for the bundle, where each key is the name of the quality monitor. See [\_](/dev-tools/bundles/resources.md#quality_monitors). - -- - `registered_models` - - Map - - The registered model definitions for the bundle, where each key is the name of the Unity Catalog registered model. See [\_](/dev-tools/bundles/resources.md#registered_models) - -- - `schemas` - - Map - - The schema definitions for the bundle, where each key is the name of the schema. See [\_](/dev-tools/bundles/resources.md#schemas). - -- - `secret_scopes` - - Map - - The secret scope definitions for the bundle, where each key is the name of the secret scope. See [\_](/dev-tools/bundles/resources.md#secret_scopes). See [\_](#resourcessecret_scopes). - -- - `sql_warehouses` - - Map - - The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. See [\_](/dev-tools/bundles/resources.md#sql_warehouses). - -- - `synced_database_tables` - - Map - - See [\_](#resourcessynced_database_tables). - -- - `vector_search_endpoints` - - Map - - See [\_](#resourcesvector_search_endpoints). - -- - `vector_search_indexes` - - Map - - See [\_](#resourcesvector_search_indexes). - -- - `volumes` - - Map - - The volume definitions for the bundle, where each key is the name of the volume. See [\_](/dev-tools/bundles/resources.md#volumes). - -::: - - -### resources.alerts - -**`Type: Map`** - - - -```yaml -alerts: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `create_time` - - String - - - -- - `custom_description` - - String - - - -- - `custom_summary` - - String - - - -- - `display_name` - - String - - - -- - `effective_run_as` - - Map - - See [\_](#resourcesalertsnameeffective_run_as). - -- - `evaluation` - - Map - - See [\_](#resourcesalertsnameevaluation). - -- - `file_path` - - String - - - -- - `id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcesalertsnamelifecycle). - -- - `lifecycle_state` - - String - - - -- - `owner_user_name` - - String - - - -- - `parent_path` - - String - - - -- - `permissions` - - Sequence - - See [\_](#resourcesalertsnamepermissions). - -- - `query_text` - - String - - - -- - `run_as` - - Map - - See [\_](#resourcesalertsnamerun_as). - -- - `run_as_user_name` - - String - - - -- - `schedule` - - Map - - See [\_](#resourcesalertsnameschedule). - -- - `update_time` - - String - - - -- - `warehouse_id` - - String - - - -::: - - -### resources.alerts._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.alerts._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### resources.apps - -**`Type: Map`** - -The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). - -```yaml -apps: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `active_deployment` - - Map - - See [\_](#resourcesappsnameactive_deployment). - -- - `app_status` - - Map - - See [\_](#resourcesappsnameapp_status). - -- - `budget_policy_id` - - String - - - -- - `compute_max_instances` - - Integer - - - -- - `compute_min_instances` - - Integer - - - -- - `compute_size` - - String - - - -- - `compute_status` - - Map - - See [\_](#resourcesappsnamecompute_status). - -- - `config` - - Map - - See [\_](#resourcesappsnameconfig). - -- - `create_time` - - String - - - -- - `creator` - - String - - - -- - `default_source_code_path` - - String - - - -- - `description` - - String - - - -- - `effective_budget_policy_id` - - String - - - -- - `effective_usage_policy_id` - - String - - - -- - `effective_user_api_scopes` - - Sequence - - - -- - `git_repository` - - Map - - See [\_](#resourcesappsnamegit_repository). - -- - `git_source` - - Map - - 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 [\_](#resourcesappsnamegit_source). - -- - `id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcesappsnamelifecycle). - -- - `name` - - String - - - -- - `oauth2_app_client_id` - - String - - - -- - `oauth2_app_integration_id` - - String - - - -- - `pending_deployment` - - Map - - See [\_](#resourcesappsnamepending_deployment). - -- - `permissions` - - Sequence - - See [\_](#resourcesappsnamepermissions). - -- - `resources` - - Sequence - - See [\_](#resourcesappsnameresources). - -- - `service_principal_client_id` - - String - - - -- - `service_principal_id` - - Integer - - - -- - `service_principal_name` - - String - - - -- - `source_code_path` - - String - - - -- - `space` - - String - - - -- - `telemetry_export_destinations` - - Sequence - - See [\_](#resourcesappsnametelemetry_export_destinations). - -- - `thumbnail_url` - - String - - - -- - `update_time` - - String - - - -- - `updater` - - String - - - -- - `url` - - String - - - -- - `usage_policy_id` - - String - - - -- - `user_api_scopes` - - Sequence - - - -::: - - -### resources.apps._name_.config - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `command` - - Sequence - - - -- - `env` - - Sequence - - See [\_](#resourcesappsnameconfigenv). - -::: - - -### resources.apps._name_.config.env - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `name` - - String - - - -- - `value` - - String - - - -- - `value_from` - - String - - - -::: - - -### resources.apps._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -- - `started` - - Boolean - - Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. - -::: - - -### resources.apps._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### resources.catalogs - -**`Type: Map`** - - - -```yaml -catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `comment` - - String - - - -- - `connection_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#resourcescatalogsnamegrants). - -- - `lifecycle` - - Map - - See [\_](#resourcescatalogsnamelifecycle). - -- - `managed_encryption_settings` - - Map - - See [\_](#resourcescatalogsnamemanaged_encryption_settings). - -- - `name` - - String - - - -- - `options` - - Map - - - -- - `properties` - - Map - - - -- - `provider_name` - - String - - - -- - `share_name` - - String - - - -- - `storage_root` - - String - - - -::: - - -### resources.catalogs._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.dashboards - -**`Type: Map`** - -The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). - -```yaml -dashboards: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `create_time` - - String - - - -- - `dashboard_id` - - String - - - -- - `dataset_catalog` - - String - - Sets the default catalog for all datasets in this dashboard. When set, this overrides the catalog specified in individual dataset definitions. - -- - `dataset_schema` - - String - - Sets the default schema for all datasets in this dashboard. When set, this overrides the schema specified in individual dataset definitions. - -- - `display_name` - - String - - - -- - `embed_credentials` - - Boolean - - - -- - `etag` - - String - - - -- - `file_path` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcesdashboardsnamelifecycle). - -- - `lifecycle_state` - - String - - - -- - `parent_path` - - String - - - -- - `path` - - String - - - -- - `permissions` - - Sequence - - See [\_](#resourcesdashboardsnamepermissions). - -- - `serialized_dashboard` - - Any - - - -- - `update_time` - - String - - - -- - `warehouse_id` - - String - - - -::: - - -### resources.dashboards._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.dashboards._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### resources.database_instances - -**`Type: Map`** - - - -```yaml -database_instances: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `capacity` - - String - - - -- - `child_instance_refs` - - Sequence - - See [\_](#resourcesdatabase_instancesnamechild_instance_refs). - -- - `creation_time` - - String - - - -- - `creator` - - String - - - -- - `custom_tags` - - Sequence - - See [\_](#resourcesdatabase_instancesnamecustom_tags). - -- - `effective_capacity` - - String - - - -- - `effective_custom_tags` - - Sequence - - See [\_](#resourcesdatabase_instancesnameeffective_custom_tags). - -- - `effective_enable_pg_native_login` - - Boolean - - - -- - `effective_enable_readable_secondaries` - - Boolean - - - -- - `effective_node_count` - - Integer - - - -- - `effective_retention_window_in_days` - - Integer - - - -- - `effective_stopped` - - Boolean - - - -- - `effective_usage_policy_id` - - String - - - -- - `enable_pg_native_login` - - Boolean - - - -- - `enable_readable_secondaries` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#resourcesdatabase_instancesnamelifecycle). - -- - `name` - - String - - - -- - `node_count` - - Integer - - - -- - `parent_instance_ref` - - Map - - See [\_](#resourcesdatabase_instancesnameparent_instance_ref). - -- - `permissions` - - Sequence - - See [\_](#resourcesdatabase_instancesnamepermissions). - -- - `pg_version` - - String - - - -- - `read_only_dns` - - String - - - -- - `read_write_dns` - - String - - - -- - `retention_window_in_days` - - Integer - - - -- - `state` - - String - - - -- - `stopped` - - Boolean - - - -- - `uid` - - String - - - -- - `usage_policy_id` - - String - - - -::: - - -### resources.database_instances._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.database_instances._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### resources.external_locations - -**`Type: Map`** - - - -```yaml -external_locations: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `comment` - - String - - - -- - `credential_name` - - String - - - -- - `effective_enable_file_events` - - Boolean - - - -- - `effective_file_event_queue` - - Map - - See [\_](#resourcesexternal_locationsnameeffective_file_event_queue). - -- - `enable_file_events` - - Boolean - - - -- - `encryption_details` - - Map - - See [\_](#resourcesexternal_locationsnameencryption_details). - -- - `fallback` - - Boolean - - - -- - `file_event_queue` - - Map - - See [\_](#resourcesexternal_locationsnamefile_event_queue). - -- - `grants` - - Sequence - - See [\_](#resourcesexternal_locationsnamegrants). - -- - `lifecycle` - - Map - - See [\_](#resourcesexternal_locationsnamelifecycle). - -- - `name` - - String - - - -- - `read_only` - - Boolean - - - -- - `skip_validation` - - Boolean - - - -- - `url` - - String - - - -::: - - -### resources.external_locations._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.genie_spaces - -**`Type: Map`** - - - -```yaml -genie_spaces: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `description` - - String - - Description of the Genie space shown alongside the title in the Databricks UI. - -- - `etag` - - String - - - -- - `file_path` - - String - - Local path to a `.geniespace.json` file holding the serialized Genie space definition. The contents are inlined into `serialized_space` at deploy time. Mutually exclusive with an inline `serialized_space`. - -- - `lifecycle` - - Map - - See [\_](#resourcesgenie_spacesnamelifecycle). - -- - `parent_path` - - String - - Workspace folder under which to create the Genie space. Immutable: changing this field recreates the resource. - -- - `permissions` - - Sequence - - See [\_](#resourcesgenie_spacesnamepermissions). - -- - `serialized_space` - - Any - - Serialized Genie space body. May be provided inline as a JSON string (or YAML that will be marshalled to JSON) or referenced via `file_path`. To round-trip an existing space into a bundle, use `databricks bundle generate genie-space`. - -- - `title` - - String - - Title of the Genie space shown in the Databricks UI. - -- - `warehouse_id` - - String - - ID of the SQL warehouse used to run queries for this Genie space. - -::: - - -### resources.genie_spaces._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.genie_spaces._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### resources.pipelines - -**`Type: Map`** - -The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). - -```yaml -pipelines: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `allow_duplicate_names` - - Boolean - - - -- - `budget_policy_id` - - String - - - -- - `catalog` - - String - - - -- - `channel` - - String - - - -- - `clusters` - - Sequence - - See [\_](#resourcespipelinesnameclusters). - -- - `configuration` - - Map - - - -- - `continuous` - - Boolean - - - -- - `deployment` - - Map - - See [\_](#resourcespipelinesnamedeployment). - -- - `development` - - Boolean - - - -- - `dry_run` - - Boolean - - - -- - `edition` - - String - - - -- - `environment` - - Map - - See [\_](#resourcespipelinesnameenvironment). - -- - `event_log` - - Map - - See [\_](#resourcespipelinesnameevent_log). - -- - `filters` - - Map - - See [\_](#resourcespipelinesnamefilters). - -- - `gateway_definition` - - Map - - See [\_](#resourcespipelinesnamegateway_definition). - -- - `id` - - String - - - -- - `ingestion_definition` - - Map - - See [\_](#resourcespipelinesnameingestion_definition). - -- - `libraries` - - Sequence - - See [\_](#resourcespipelinesnamelibraries). - -- - `lifecycle` - - Map - - See [\_](#resourcespipelinesnamelifecycle). - -- - `name` - - String - - - -- - `notifications` - - Sequence - - See [\_](#resourcespipelinesnamenotifications). - -- - `parameters` - - Map - - - -- - `permissions` - - Sequence - - See [\_](#resourcespipelinesnamepermissions). - -- - `photon` - - Boolean - - - -- - `restart_window` - - Map - - See [\_](#resourcespipelinesnamerestart_window). - -- - `root_path` - - String - - - -- - `run_as` - - Map - - See [\_](#resourcespipelinesnamerun_as). - -- - `schema` - - String - - - -- - `serverless` - - Boolean - - - -- - `storage` - - String - - - -- - `tags` - - Map - - - -- - `target` - - String - - - -- - `trigger` - - Map - - See [\_](#resourcespipelinesnametrigger). - -- - `usage_policy_id` - - String - - - -::: - - -### resources.pipelines._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.pipelines._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### resources.postgres_branches - -**`Type: Map`** - - - -```yaml -postgres_branches: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch_id` - - String - - - -- - `expire_time` - - Map - - - -- - `is_protected` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#resourcespostgres_branchesnamelifecycle). - -- - `no_expiry` - - Boolean - - - -- - `parent` - - String - - - -- - `replace_existing` - - Boolean - - - -- - `source_branch` - - String - - - -- - `source_branch_lsn` - - String - - - -- - `source_branch_time` - - Map - - - -- - `ttl` - - String - - - -::: - - -### resources.postgres_branches._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.postgres_catalogs - -**`Type: Map`** - -The Postgres catalog definitions for the bundle, where each key is the name of the catalog. Each entry binds a Unity Catalog catalog to a Postgres database on a Lakebase Autoscaling branch. - -```yaml -postgres_catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `catalog_id` - - String - - - -- - `create_database_if_missing` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#resourcespostgres_catalogsnamelifecycle). - -- - `postgres_database` - - String - - - -::: - - -### resources.postgres_catalogs._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.postgres_endpoints - -**`Type: Map`** - - - -```yaml -postgres_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `autoscaling_limit_max_cu` - - Any - - - -- - `autoscaling_limit_min_cu` - - Any - - - -- - `disabled` - - Boolean - - - -- - `endpoint_id` - - String - - - -- - `endpoint_type` - - String - - - -- - `group` - - Map - - See [\_](#resourcespostgres_endpointsnamegroup). - -- - `lifecycle` - - Map - - See [\_](#resourcespostgres_endpointsnamelifecycle). - -- - `no_suspension` - - Boolean - - - -- - `parent` - - String - - - -- - `replace_existing` - - Boolean - - - -- - `settings` - - Map - - See [\_](#resourcespostgres_endpointsnamesettings). - -- - `suspend_timeout_duration` - - String - - - -::: - - -### resources.postgres_endpoints._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.postgres_projects - -**`Type: Map`** - - - -```yaml -postgres_projects: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `custom_tags` - - Sequence - - See [\_](#resourcespostgres_projectsnamecustom_tags). - -- - `default_branch` - - String - - - -- - `default_endpoint_settings` - - Map - - See [\_](#resourcespostgres_projectsnamedefault_endpoint_settings). - -- - `display_name` - - String - - - -- - `enable_pg_native_login` - - Boolean - - - -- - `history_retention_duration` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcespostgres_projectsnamelifecycle). - -- - `permissions` - - Sequence - - See [\_](#resourcespostgres_projectsnamepermissions). - -- - `pg_version` - - Integer - - - -- - `project_id` - - String - - - -- - `purge_on_delete` - - Boolean - - - -::: - - -### resources.postgres_projects._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.postgres_projects._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### resources.postgres_synced_tables - -**`Type: Map`** - -The Postgres synced table definitions for the bundle, where each key is the name of the synced table. Each entry continuously replicates a Unity Catalog Delta source table into a Postgres table on a Lakebase Autoscaling instance. - -```yaml -postgres_synced_tables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `create_database_objects_if_missing` - - Boolean - - - -- - `existing_pipeline_id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcespostgres_synced_tablesnamelifecycle). - -- - `new_pipeline_spec` - - Map - - See [\_](#resourcespostgres_synced_tablesnamenew_pipeline_spec). - -- - `postgres_database` - - String - - - -- - `primary_key_columns` - - Sequence - - - -- - `scheduling_policy` - - String - - - -- - `source_table_full_name` - - String - - - -- - `synced_table_id` - - String - - - -- - `timeseries_key` - - String - - - -::: - - -### resources.postgres_synced_tables._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.secret_scopes - -**`Type: Map`** - -The secret scope definitions for the bundle, where each key is the name of the secret scope. See [\_](/dev-tools/bundles/resources.md#secret_scopes). - -```yaml -secret_scopes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `backend_type` - - String - - The backend type the scope will be created with. If not specified, will default to `DATABRICKS` - -- - `keyvault_metadata` - - Map - - The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT`. See [\_](#resourcessecret_scopesnamekeyvault_metadata). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#resourcessecret_scopesnamelifecycle). - -- - `name` - - String - - Scope name requested by the user. Scope names are unique. - -- - `permissions` - - Sequence - - The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. See [\_](#resourcessecret_scopesnamepermissions). - -::: - - -### resources.secret_scopes._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.secret_scopes._name_.permissions - -**`Type: Sequence`** - -The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The application ID of an active service principal. This field translates to a `principal` field in secret scope ACL. - -- - `user_name` - - String - - The name of the user that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - -::: - - -### resources.synced_database_tables - -**`Type: Map`** - - - -```yaml -synced_database_tables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `data_synchronization_status` - - Map - - See [\_](#resourcessynced_database_tablesnamedata_synchronization_status). - -- - `database_instance_name` - - String - - - -- - `effective_database_instance_name` - - String - - - -- - `effective_logical_database_name` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcessynced_database_tablesnamelifecycle). - -- - `logical_database_name` - - String - - - -- - `name` - - String - - - -- - `spec` - - Map - - See [\_](#resourcessynced_database_tablesnamespec). - -- - `unity_catalog_provisioning_state` - - String - - - -::: - - -### resources.synced_database_tables._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.vector_search_endpoints - -**`Type: Map`** - - - -```yaml -vector_search_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `endpoint_type` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcesvector_search_endpointsnamelifecycle). - -- - `name` - - String - - - -- - `permissions` - - Sequence - - See [\_](#resourcesvector_search_endpointsnamepermissions). - -- - `target_qps` - - Integer - - - -- - `usage_policy_id` - - String - - - -::: - - -### resources.vector_search_endpoints._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### resources.vector_search_endpoints._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### resources.vector_search_indexes - -**`Type: Map`** - - - -```yaml -vector_search_indexes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `delta_sync_index_spec` - - Map - - See [\_](#resourcesvector_search_indexesnamedelta_sync_index_spec). - -- - `direct_access_index_spec` - - Map - - See [\_](#resourcesvector_search_indexesnamedirect_access_index_spec). - -- - `endpoint_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#resourcesvector_search_indexesnamegrants). - -- - `index_subtype` - - String - - - -- - `index_type` - - String - - - -- - `lifecycle` - - Map - - See [\_](#resourcesvector_search_indexesnamelifecycle). - -- - `name` - - String - - - -- - `primary_key` - - String - - - -::: - - -### resources.vector_search_indexes._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## run_as - -**`Type: Map`** - -The identity to use when running Declarative Automation Bundles resources. See [\_](/dev-tools/bundles/run-as.md). - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `service_principal_name` - - String - - The application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - -- - `user_name` - - String - - The email of an active workspace user. Non-admin users can only set this field to their own email. - -::: - - -## scripts - -**`Type: Map`** - - - -```yaml -scripts: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `content` - - String - - - -::: - - -## sync - -**`Type: Map`** - -The files and file paths to include or exclude in the bundle. See [\_](/dev-tools/bundles/settings.md#sync). - - - -:::list-table - -- - Key - - Type - - Description - -- - `exclude` - - Sequence - - A list of files or folders to exclude from the bundle. - -- - `include` - - Sequence - - A list of files or folders to include in the bundle. - -- - `paths` - - Sequence - - The local folder paths, which can be outside the bundle root, to synchronize to the workspace when the bundle is deployed. - -::: - - -## targets - -**`Type: Map`** - -Defines deployment targets for the bundle. See [\_](/dev-tools/bundles/settings.md#targets) - -```yaml -targets: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `artifacts` - - Map - - The artifacts to include in the target deployment. See [\_](#targetsnameartifacts). - -- - `bundle` - - Map - - The bundle attributes when deploying to this target. See [\_](#targetsnamebundle). - -- - `cluster_id` - - String - - The ID of the cluster to use for this target. - -- - `compute_id` - - String - - Deprecated: please use cluster_id instead - -- - `default` - - Boolean - - Whether this target is the default target. - -- - `git` - - Map - - The Git version control settings for the target. See [\_](#targetsnamegit). - -- - `mode` - - String - - The deployment mode for the target. Valid values are `development` or `production`. See [\_](/dev-tools/bundles/deployment-modes.md). - -- - `permissions` - - Sequence - - The permissions for deploying and running the bundle in the target. See [\_](#targetsnamepermissions). - -- - `presets` - - Map - - The deployment presets for the target. See [\_](#targetsnamepresets). - -- - `resources` - - Map - - The resource definitions for the target. See [\_](#targetsnameresources). - -- - `run_as` - - Map - - The identity to use to run the bundle, see [\_](/dev-tools/bundles/run-as.md). See [\_](#targetsnamerun_as). - -- - `sync` - - Map - - The local paths to sync to the target workspace when a bundle is run or deployed. See [\_](#targetsnamesync). - -- - `variables` - - Map - - The custom variable definitions for the target. See [\_](#targetsnamevariables). - -- - `workspace` - - Map - - The Databricks workspace for the target. See [\_](#targetsnameworkspace). - -::: - - -### targets._name_.artifacts - -**`Type: Map`** - -The artifacts to include in the target deployment. - -```yaml -artifacts: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `build` - - String - - An optional set of build commands to run locally before deployment. - -- - `dynamic_version` - - Boolean - - Whether to patch the wheel version dynamically based on the timestamp of the whl file. If this is set to `true`, new code can be deployed without having to update the version in `setup.py` or `pyproject.toml`. This setting is only valid when `type` is set to `whl`. See [\_](/dev-tools/bundles/settings.md#bundle-syntax-mappings-artifacts). - -- - `executable` - - String - - The executable type. Valid values are `bash`, `sh`, and `cmd`. - -- - `files` - - Sequence - - The relative or absolute path to the built artifact files. See [\_](#targetsnameartifactsnamefiles). - -- - `path` - - String - - The local path of the directory for the artifact. - -- - `type` - - String - - Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. - -::: - - -### targets._name_.artifacts._name_.files - -**`Type: Sequence`** - -The relative or absolute path to the built artifact files. - - - -:::list-table - -- - Key - - Type - - Description - -- - `source` - - String - - Required. The artifact source file. - -::: - - -### targets._name_.bundle - -**`Type: Map`** - -The bundle attributes when deploying to this target. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cluster_id` - - String - - The ID of a cluster to use to run the bundle. See [\_](/dev-tools/bundles/settings.md#cluster_id). - -- - `compute_id` - - String - - Deprecated. The ID of the compute to use to run the bundle. - -- - `databricks_cli_version` - - String - - The Databricks CLI version to use for the bundle. See [\_](/dev-tools/bundles/settings.md#databricks_cli_version). - -- - `deployment` - - Map - - The definition of the bundle deployment. For supported attributes see [\_](/dev-tools/bundles/deployment-modes.md). See [\_](#targetsnamebundledeployment). - -- - `engine` - - String - - The deployment engine to use. Valid values are `terraform` and `direct`. Takes priority over `DATABRICKS_BUNDLE_ENGINE` environment variable. Default is "terraform". - -- - `git` - - Map - - The Git version control details that are associated with your bundle. For supported attributes see [\_](/dev-tools/bundles/settings.md#git). See [\_](#targetsnamebundlegit). - -- - `name` - - String - - The name of the bundle. - -- - `uuid` - - String - - Reserved. A Universally Unique Identifier (UUID) for the bundle that uniquely identifies the bundle in internal Databricks systems. This is generated when a bundle project is initialized using a Databricks template (using the `databricks bundle init` command). - -::: - - -### targets._name_.bundle.deployment - -**`Type: Map`** - -The definition of the bundle deployment. For supported attributes see [\_](/dev-tools/bundles/deployment-modes.md). - - - -:::list-table - -- - Key - - Type - - Description - -- - `fail_on_active_runs` - - Boolean - - Whether to fail on active runs. If this is set to true a deployment that is running can be interrupted. - -- - `lock` - - Map - - The deployment lock attributes. See [\_](#targetsnamebundledeploymentlock). - -::: - - -### targets._name_.bundle.deployment.lock - -**`Type: Map`** - -The deployment lock attributes. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - Whether this lock is enabled. - -- - `force` - - Boolean - - Whether to force this lock if it is enabled. - -::: - - -### targets._name_.bundle.git - -**`Type: Map`** - -The Git version control details that are associated with your bundle. For supported attributes see [\_](/dev-tools/bundles/settings.md#git). - - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - The Git branch name. See [\_](/dev-tools/bundles/settings.md#git). - -- - `origin_url` - - String - - The origin URL of the repository. See [\_](/dev-tools/bundles/settings.md#git). - -::: - - -### targets._name_.git - -**`Type: Map`** - -The Git version control settings for the target. - - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - The Git branch name. See [\_](/dev-tools/bundles/settings.md#git). - -- - `origin_url` - - String - - The origin URL of the repository. See [\_](/dev-tools/bundles/settings.md#git). - -::: - - -### targets._name_.permissions - -**`Type: Sequence`** - -The permissions for deploying and running the bundle in the target. - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.presets - -**`Type: Map`** - -The deployment presets for the target. - - - -:::list-table - -- - Key - - Type - - Description - -- - `artifacts_dynamic_version` - - Boolean - - Whether to enable dynamic_version on all artifacts. - -- - `jobs_max_concurrent_runs` - - Integer - - The maximum concurrent runs for a job. - -- - `name_prefix` - - String - - The prefix for job runs of the bundle. - -- - `pipelines_development` - - Boolean - - Whether pipeline deployments should be locked in development mode. - -- - `source_linked_deployment` - - Boolean - - Whether to link the deployment to the bundle source. - -- - `tags` - - Map - - The tags for the bundle deployment. - -- - `trigger_pause_status` - - String - - A pause status to apply to all job triggers and schedules. Valid values are PAUSED or UNPAUSED. - -::: - - -### targets._name_.resources - -**`Type: Map`** - -The resource definitions for the target. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alerts` - - Map - - See [\_](#targetsnameresourcesalerts). - -- - `apps` - - Map - - The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). See [\_](#targetsnameresourcesapps). - -- - `catalogs` - - Map - - See [\_](#targetsnameresourcescatalogs). - -- - `clusters` - - Map - - The cluster definitions for the bundle, where each key is the name of a cluster. See [\_](/dev-tools/bundles/resources.md#clusters). - -- - `dashboards` - - Map - - The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). See [\_](#targetsnameresourcesdashboards). - -- - `database_catalogs` - - Map - - - -- - `database_instances` - - Map - - See [\_](#targetsnameresourcesdatabase_instances). - -- - `experiments` - - Map - - The experiment definitions for the bundle, where each key is the name of the experiment. See [\_](/dev-tools/bundles/resources.md#experiments). - -- - `external_locations` - - Map - - See [\_](#targetsnameresourcesexternal_locations). - -- - `genie_spaces` - - Map - - See [\_](#targetsnameresourcesgenie_spaces). - -- - `jobs` - - Map - - The job definitions for the bundle, where each key is the name of the job. See [\_](/dev-tools/bundles/resources.md#jobs). - -- - `model_serving_endpoints` - - Map - - The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. See [\_](/dev-tools/bundles/resources.md#model_serving_endpoints). - -- - `models` - - Map - - The model definitions for the bundle, where each key is the name of the model. See [\_](/dev-tools/bundles/resources.md#models). - -- - `pipelines` - - Map - - The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). See [\_](#targetsnameresourcespipelines). - -- - `postgres_branches` - - Map - - See [\_](#targetsnameresourcespostgres_branches). - -- - `postgres_catalogs` - - Map - - The Postgres catalog definitions for the bundle, where each key is the name of the catalog. Each entry binds a Unity Catalog catalog to a Postgres database on a Lakebase Autoscaling branch. See [\_](#targetsnameresourcespostgres_catalogs). - -- - `postgres_endpoints` - - Map - - See [\_](#targetsnameresourcespostgres_endpoints). - -- - `postgres_projects` - - Map - - See [\_](#targetsnameresourcespostgres_projects). - -- - `postgres_synced_tables` - - Map - - The Postgres synced table definitions for the bundle, where each key is the name of the synced table. Each entry continuously replicates a Unity Catalog Delta source table into a Postgres table on a Lakebase Autoscaling instance. See [\_](#targetsnameresourcespostgres_synced_tables). - -- - `quality_monitors` - - Map - - The quality monitor definitions for the bundle, where each key is the name of the quality monitor. See [\_](/dev-tools/bundles/resources.md#quality_monitors). - -- - `registered_models` - - Map - - The registered model definitions for the bundle, where each key is the name of the Unity Catalog registered model. See [\_](/dev-tools/bundles/resources.md#registered_models) - -- - `schemas` - - Map - - The schema definitions for the bundle, where each key is the name of the schema. See [\_](/dev-tools/bundles/resources.md#schemas). - -- - `secret_scopes` - - Map - - The secret scope definitions for the bundle, where each key is the name of the secret scope. See [\_](/dev-tools/bundles/resources.md#secret_scopes). See [\_](#targetsnameresourcessecret_scopes). - -- - `sql_warehouses` - - Map - - The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. See [\_](/dev-tools/bundles/resources.md#sql_warehouses). - -- - `synced_database_tables` - - Map - - See [\_](#targetsnameresourcessynced_database_tables). - -- - `vector_search_endpoints` - - Map - - See [\_](#targetsnameresourcesvector_search_endpoints). - -- - `vector_search_indexes` - - Map - - See [\_](#targetsnameresourcesvector_search_indexes). - -- - `volumes` - - Map - - The volume definitions for the bundle, where each key is the name of the volume. See [\_](/dev-tools/bundles/resources.md#volumes). - -::: - - -### targets._name_.resources.alerts - -**`Type: Map`** - - - -```yaml -alerts: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `create_time` - - String - - - -- - `custom_description` - - String - - - -- - `custom_summary` - - String - - - -- - `display_name` - - String - - - -- - `effective_run_as` - - Map - - See [\_](#targetsnameresourcesalertsnameeffective_run_as). - -- - `evaluation` - - Map - - See [\_](#targetsnameresourcesalertsnameevaluation). - -- - `file_path` - - String - - - -- - `id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesalertsnamelifecycle). - -- - `lifecycle_state` - - String - - - -- - `owner_user_name` - - String - - - -- - `parent_path` - - String - - - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcesalertsnamepermissions). - -- - `query_text` - - String - - - -- - `run_as` - - Map - - See [\_](#targetsnameresourcesalertsnamerun_as). - -- - `run_as_user_name` - - String - - - -- - `schedule` - - Map - - See [\_](#targetsnameresourcesalertsnameschedule). - -- - `update_time` - - String - - - -- - `warehouse_id` - - String - - - -::: - - -### targets._name_.resources.alerts._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.alerts._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.resources.apps - -**`Type: Map`** - -The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). - -```yaml -apps: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `active_deployment` - - Map - - See [\_](#targetsnameresourcesappsnameactive_deployment). - -- - `app_status` - - Map - - See [\_](#targetsnameresourcesappsnameapp_status). - -- - `budget_policy_id` - - String - - - -- - `compute_max_instances` - - Integer - - - -- - `compute_min_instances` - - Integer - - - -- - `compute_size` - - String - - - -- - `compute_status` - - Map - - See [\_](#targetsnameresourcesappsnamecompute_status). - -- - `config` - - Map - - See [\_](#targetsnameresourcesappsnameconfig). - -- - `create_time` - - String - - - -- - `creator` - - String - - - -- - `default_source_code_path` - - String - - - -- - `description` - - String - - - -- - `effective_budget_policy_id` - - String - - - -- - `effective_usage_policy_id` - - String - - - -- - `effective_user_api_scopes` - - Sequence - - - -- - `git_repository` - - Map - - See [\_](#targetsnameresourcesappsnamegit_repository). - -- - `git_source` - - Map - - 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 [\_](#targetsnameresourcesappsnamegit_source). - -- - `id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesappsnamelifecycle). - -- - `name` - - String - - - -- - `oauth2_app_client_id` - - String - - - -- - `oauth2_app_integration_id` - - String - - - -- - `pending_deployment` - - Map - - See [\_](#targetsnameresourcesappsnamepending_deployment). - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcesappsnamepermissions). - -- - `resources` - - Sequence - - See [\_](#targetsnameresourcesappsnameresources). - -- - `service_principal_client_id` - - String - - - -- - `service_principal_id` - - Integer - - - -- - `service_principal_name` - - String - - - -- - `source_code_path` - - String - - - -- - `space` - - String - - - -- - `telemetry_export_destinations` - - Sequence - - See [\_](#targetsnameresourcesappsnametelemetry_export_destinations). - -- - `thumbnail_url` - - String - - - -- - `update_time` - - String - - - -- - `updater` - - String - - - -- - `url` - - String - - - -- - `usage_policy_id` - - String - - - -- - `user_api_scopes` - - Sequence - - - -::: - - -### targets._name_.resources.apps._name_.config - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `command` - - Sequence - - - -- - `env` - - Sequence - - See [\_](#targetsnameresourcesappsnameconfigenv). - -::: - - -### targets._name_.resources.apps._name_.config.env - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `name` - - String - - - -- - `value` - - String - - - -- - `value_from` - - String - - - -::: - - -### targets._name_.resources.apps._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -- - `started` - - Boolean - - Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. - -::: - - -### targets._name_.resources.apps._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### targets._name_.resources.catalogs - -**`Type: Map`** - - - -```yaml -catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `comment` - - String - - - -- - `connection_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#targetsnameresourcescatalogsnamegrants). - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcescatalogsnamelifecycle). - -- - `managed_encryption_settings` - - Map - - See [\_](#targetsnameresourcescatalogsnamemanaged_encryption_settings). - -- - `name` - - String - - - -- - `options` - - Map - - - -- - `properties` - - Map - - - -- - `provider_name` - - String - - - -- - `share_name` - - String - - - -- - `storage_root` - - String - - - -::: - - -### targets._name_.resources.catalogs._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.dashboards - -**`Type: Map`** - -The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). - -```yaml -dashboards: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `create_time` - - String - - - -- - `dashboard_id` - - String - - - -- - `dataset_catalog` - - String - - Sets the default catalog for all datasets in this dashboard. When set, this overrides the catalog specified in individual dataset definitions. - -- - `dataset_schema` - - String - - Sets the default schema for all datasets in this dashboard. When set, this overrides the schema specified in individual dataset definitions. - -- - `display_name` - - String - - - -- - `embed_credentials` - - Boolean - - - -- - `etag` - - String - - - -- - `file_path` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesdashboardsnamelifecycle). - -- - `lifecycle_state` - - String - - - -- - `parent_path` - - String - - - -- - `path` - - String - - - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcesdashboardsnamepermissions). - -- - `serialized_dashboard` - - Any - - - -- - `update_time` - - String - - - -- - `warehouse_id` - - String - - - -::: - - -### targets._name_.resources.dashboards._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.dashboards._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.resources.database_instances - -**`Type: Map`** - - - -```yaml -database_instances: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `capacity` - - String - - - -- - `child_instance_refs` - - Sequence - - See [\_](#targetsnameresourcesdatabase_instancesnamechild_instance_refs). - -- - `creation_time` - - String - - - -- - `creator` - - String - - - -- - `custom_tags` - - Sequence - - See [\_](#targetsnameresourcesdatabase_instancesnamecustom_tags). - -- - `effective_capacity` - - String - - - -- - `effective_custom_tags` - - Sequence - - See [\_](#targetsnameresourcesdatabase_instancesnameeffective_custom_tags). - -- - `effective_enable_pg_native_login` - - Boolean - - - -- - `effective_enable_readable_secondaries` - - Boolean - - - -- - `effective_node_count` - - Integer - - - -- - `effective_retention_window_in_days` - - Integer - - - -- - `effective_stopped` - - Boolean - - - -- - `effective_usage_policy_id` - - String - - - -- - `enable_pg_native_login` - - Boolean - - - -- - `enable_readable_secondaries` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesdatabase_instancesnamelifecycle). - -- - `name` - - String - - - -- - `node_count` - - Integer - - - -- - `parent_instance_ref` - - Map - - See [\_](#targetsnameresourcesdatabase_instancesnameparent_instance_ref). - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcesdatabase_instancesnamepermissions). - -- - `pg_version` - - String - - - -- - `read_only_dns` - - String - - - -- - `read_write_dns` - - String - - - -- - `retention_window_in_days` - - Integer - - - -- - `state` - - String - - - -- - `stopped` - - Boolean - - - -- - `uid` - - String - - - -- - `usage_policy_id` - - String - - - -::: - - -### targets._name_.resources.database_instances._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.database_instances._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.resources.external_locations - -**`Type: Map`** - - - -```yaml -external_locations: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `comment` - - String - - - -- - `credential_name` - - String - - - -- - `effective_enable_file_events` - - Boolean - - - -- - `effective_file_event_queue` - - Map - - See [\_](#targetsnameresourcesexternal_locationsnameeffective_file_event_queue). - -- - `enable_file_events` - - Boolean - - - -- - `encryption_details` - - Map - - See [\_](#targetsnameresourcesexternal_locationsnameencryption_details). - -- - `fallback` - - Boolean - - - -- - `file_event_queue` - - Map - - See [\_](#targetsnameresourcesexternal_locationsnamefile_event_queue). - -- - `grants` - - Sequence - - See [\_](#targetsnameresourcesexternal_locationsnamegrants). - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesexternal_locationsnamelifecycle). - -- - `name` - - String - - - -- - `read_only` - - Boolean - - - -- - `skip_validation` - - Boolean - - - -- - `url` - - String - - - -::: - - -### targets._name_.resources.external_locations._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.genie_spaces - -**`Type: Map`** - - - -```yaml -genie_spaces: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `description` - - String - - Description of the Genie space shown alongside the title in the Databricks UI. - -- - `etag` - - String - - - -- - `file_path` - - String - - Local path to a `.geniespace.json` file holding the serialized Genie space definition. The contents are inlined into `serialized_space` at deploy time. Mutually exclusive with an inline `serialized_space`. - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesgenie_spacesnamelifecycle). - -- - `parent_path` - - String - - Workspace folder under which to create the Genie space. Immutable: changing this field recreates the resource. - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcesgenie_spacesnamepermissions). - -- - `serialized_space` - - Any - - Serialized Genie space body. May be provided inline as a JSON string (or YAML that will be marshalled to JSON) or referenced via `file_path`. To round-trip an existing space into a bundle, use `databricks bundle generate genie-space`. - -- - `title` - - String - - Title of the Genie space shown in the Databricks UI. - -- - `warehouse_id` - - String - - ID of the SQL warehouse used to run queries for this Genie space. - -::: - - -### targets._name_.resources.genie_spaces._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.genie_spaces._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.resources.pipelines - -**`Type: Map`** - -The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). - -```yaml -pipelines: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `allow_duplicate_names` - - Boolean - - - -- - `budget_policy_id` - - String - - - -- - `catalog` - - String - - - -- - `channel` - - String - - - -- - `clusters` - - Sequence - - See [\_](#targetsnameresourcespipelinesnameclusters). - -- - `configuration` - - Map - - - -- - `continuous` - - Boolean - - - -- - `deployment` - - Map - - See [\_](#targetsnameresourcespipelinesnamedeployment). - -- - `development` - - Boolean - - - -- - `dry_run` - - Boolean - - - -- - `edition` - - String - - - -- - `environment` - - Map - - See [\_](#targetsnameresourcespipelinesnameenvironment). - -- - `event_log` - - Map - - See [\_](#targetsnameresourcespipelinesnameevent_log). - -- - `filters` - - Map - - See [\_](#targetsnameresourcespipelinesnamefilters). - -- - `gateway_definition` - - Map - - See [\_](#targetsnameresourcespipelinesnamegateway_definition). - -- - `id` - - String - - - -- - `ingestion_definition` - - Map - - See [\_](#targetsnameresourcespipelinesnameingestion_definition). - -- - `libraries` - - Sequence - - See [\_](#targetsnameresourcespipelinesnamelibraries). - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcespipelinesnamelifecycle). - -- - `name` - - String - - - -- - `notifications` - - Sequence - - See [\_](#targetsnameresourcespipelinesnamenotifications). - -- - `parameters` - - Map - - - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcespipelinesnamepermissions). - -- - `photon` - - Boolean - - - -- - `restart_window` - - Map - - See [\_](#targetsnameresourcespipelinesnamerestart_window). - -- - `root_path` - - String - - - -- - `run_as` - - Map - - See [\_](#targetsnameresourcespipelinesnamerun_as). - -- - `schema` - - String - - - -- - `serverless` - - Boolean - - - -- - `storage` - - String - - - -- - `tags` - - Map - - - -- - `target` - - String - - - -- - `trigger` - - Map - - See [\_](#targetsnameresourcespipelinesnametrigger). - -- - `usage_policy_id` - - String - - - -::: - - -### targets._name_.resources.pipelines._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.pipelines._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### targets._name_.resources.postgres_branches - -**`Type: Map`** - - - -```yaml -postgres_branches: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch_id` - - String - - - -- - `expire_time` - - Map - - - -- - `is_protected` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcespostgres_branchesnamelifecycle). - -- - `no_expiry` - - Boolean - - - -- - `parent` - - String - - - -- - `replace_existing` - - Boolean - - - -- - `source_branch` - - String - - - -- - `source_branch_lsn` - - String - - - -- - `source_branch_time` - - Map - - - -- - `ttl` - - String - - - -::: - - -### targets._name_.resources.postgres_branches._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.postgres_catalogs - -**`Type: Map`** - -The Postgres catalog definitions for the bundle, where each key is the name of the catalog. Each entry binds a Unity Catalog catalog to a Postgres database on a Lakebase Autoscaling branch. - -```yaml -postgres_catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `catalog_id` - - String - - - -- - `create_database_if_missing` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcespostgres_catalogsnamelifecycle). - -- - `postgres_database` - - String - - - -::: - - -### targets._name_.resources.postgres_catalogs._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.postgres_endpoints - -**`Type: Map`** - - - -```yaml -postgres_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `autoscaling_limit_max_cu` - - Any - - - -- - `autoscaling_limit_min_cu` - - Any - - - -- - `disabled` - - Boolean - - - -- - `endpoint_id` - - String - - - -- - `endpoint_type` - - String - - - -- - `group` - - Map - - See [\_](#targetsnameresourcespostgres_endpointsnamegroup). - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcespostgres_endpointsnamelifecycle). - -- - `no_suspension` - - Boolean - - - -- - `parent` - - String - - - -- - `replace_existing` - - Boolean - - - -- - `settings` - - Map - - See [\_](#targetsnameresourcespostgres_endpointsnamesettings). - -- - `suspend_timeout_duration` - - String - - - -::: - - -### targets._name_.resources.postgres_endpoints._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.postgres_projects - -**`Type: Map`** - - - -```yaml -postgres_projects: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `custom_tags` - - Sequence - - See [\_](#targetsnameresourcespostgres_projectsnamecustom_tags). - -- - `default_branch` - - String - - - -- - `default_endpoint_settings` - - Map - - See [\_](#targetsnameresourcespostgres_projectsnamedefault_endpoint_settings). - -- - `display_name` - - String - - - -- - `enable_pg_native_login` - - Boolean - - - -- - `history_retention_duration` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcespostgres_projectsnamelifecycle). - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcespostgres_projectsnamepermissions). - -- - `pg_version` - - Integer - - - -- - `project_id` - - String - - - -- - `purge_on_delete` - - Boolean - - - -::: - - -### targets._name_.resources.postgres_projects._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.postgres_projects._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.resources.postgres_synced_tables - -**`Type: Map`** - -The Postgres synced table definitions for the bundle, where each key is the name of the synced table. Each entry continuously replicates a Unity Catalog Delta source table into a Postgres table on a Lakebase Autoscaling instance. - -```yaml -postgres_synced_tables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `create_database_objects_if_missing` - - Boolean - - - -- - `existing_pipeline_id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcespostgres_synced_tablesnamelifecycle). - -- - `new_pipeline_spec` - - Map - - See [\_](#targetsnameresourcespostgres_synced_tablesnamenew_pipeline_spec). - -- - `postgres_database` - - String - - - -- - `primary_key_columns` - - Sequence - - - -- - `scheduling_policy` - - String - - - -- - `source_table_full_name` - - String - - - -- - `synced_table_id` - - String - - - -- - `timeseries_key` - - String - - - -::: - - -### targets._name_.resources.postgres_synced_tables._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.secret_scopes - -**`Type: Map`** - -The secret scope definitions for the bundle, where each key is the name of the secret scope. See [\_](/dev-tools/bundles/resources.md#secret_scopes). - -```yaml -secret_scopes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `backend_type` - - String - - The backend type the scope will be created with. If not specified, will default to `DATABRICKS` - -- - `keyvault_metadata` - - Map - - The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT`. See [\_](#targetsnameresourcessecret_scopesnamekeyvault_metadata). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#targetsnameresourcessecret_scopesnamelifecycle). - -- - `name` - - String - - Scope name requested by the user. Scope names are unique. - -- - `permissions` - - Sequence - - The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. See [\_](#targetsnameresourcessecret_scopesnamepermissions). - -::: - - -### targets._name_.resources.secret_scopes._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.secret_scopes._name_.permissions - -**`Type: Sequence`** - -The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The application ID of an active service principal. This field translates to a `principal` field in secret scope ACL. - -- - `user_name` - - String - - The name of the user that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - -::: - - -### targets._name_.resources.synced_database_tables - -**`Type: Map`** - - - -```yaml -synced_database_tables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `data_synchronization_status` - - Map - - See [\_](#targetsnameresourcessynced_database_tablesnamedata_synchronization_status). - -- - `database_instance_name` - - String - - - -- - `effective_database_instance_name` - - String - - - -- - `effective_logical_database_name` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcessynced_database_tablesnamelifecycle). - -- - `logical_database_name` - - String - - - -- - `name` - - String - - - -- - `spec` - - Map - - See [\_](#targetsnameresourcessynced_database_tablesnamespec). - -- - `unity_catalog_provisioning_state` - - String - - - -::: - - -### targets._name_.resources.synced_database_tables._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.vector_search_endpoints - -**`Type: Map`** - - - -```yaml -vector_search_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `endpoint_type` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesvector_search_endpointsnamelifecycle). - -- - `name` - - String - - - -- - `permissions` - - Sequence - - See [\_](#targetsnameresourcesvector_search_endpointsnamepermissions). - -- - `target_qps` - - Integer - - - -- - `usage_policy_id` - - String - - - -::: - - -### targets._name_.resources.vector_search_endpoints._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.resources.vector_search_endpoints._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### targets._name_.resources.vector_search_indexes - -**`Type: Map`** - - - -```yaml -vector_search_indexes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `delta_sync_index_spec` - - Map - - See [\_](#targetsnameresourcesvector_search_indexesnamedelta_sync_index_spec). - -- - `direct_access_index_spec` - - Map - - See [\_](#targetsnameresourcesvector_search_indexesnamedirect_access_index_spec). - -- - `endpoint_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#targetsnameresourcesvector_search_indexesnamegrants). - -- - `index_subtype` - - String - - - -- - `index_type` - - String - - - -- - `lifecycle` - - Map - - See [\_](#targetsnameresourcesvector_search_indexesnamelifecycle). - -- - `name` - - String - - - -- - `primary_key` - - String - - - -::: - - -### targets._name_.resources.vector_search_indexes._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### targets._name_.run_as - -**`Type: Map`** - -The identity to use to run the bundle, see [\_](/dev-tools/bundles/run-as.md). - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `service_principal_name` - - String - - The application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - -- - `user_name` - - String - - The email of an active workspace user. Non-admin users can only set this field to their own email. - -::: - - -### targets._name_.sync - -**`Type: Map`** - -The local paths to sync to the target workspace when a bundle is run or deployed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `exclude` - - Sequence - - A list of files or folders to exclude from the bundle. - -- - `include` - - Sequence - - A list of files or folders to include in the bundle. - -- - `paths` - - Sequence - - The local folder paths, which can be outside the bundle root, to synchronize to the workspace when the bundle is deployed. - -::: - - -### targets._name_.variables - -**`Type: Map`** - -The custom variable definitions for the target. - -```yaml -variables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `default` - - Any - - The default value for the variable. - -- - `description` - - String - - The description of the variable. - -- - `lookup` - - Map - - The name of the alert, cluster_policy, cluster, dashboard, instance_pool, job, metastore, pipeline, query, service_principal, or warehouse object for which to retrieve an ID. See [\_](#targetsnamevariablesnamelookup). - -- - `type` - - String - - The type of the variable. - -::: - - -### targets._name_.variables._name_.lookup - -**`Type: Map`** - -The name of the alert, cluster_policy, cluster, dashboard, instance_pool, job, metastore, pipeline, query, service_principal, or warehouse object for which to retrieve an ID. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert` - - String - - The name of the alert for which to retrieve an ID. - -- - `cluster` - - String - - The name of the cluster for which to retrieve an ID. - -- - `cluster_policy` - - String - - The name of the cluster_policy for which to retrieve an ID. - -- - `dashboard` - - String - - The name of the dashboard for which to retrieve an ID. - -- - `instance_pool` - - String - - The name of the instance_pool for which to retrieve an ID. - -- - `job` - - String - - The name of the job for which to retrieve an ID. - -- - `metastore` - - String - - The name of the metastore for which to retrieve an ID. - -- - `notification_destination` - - String - - The name of the notification_destination for which to retrieve an ID. - -- - `pipeline` - - String - - The name of the pipeline for which to retrieve an ID. - -- - `query` - - String - - The name of the query for which to retrieve an ID. - -- - `service_principal` - - String - - The name of the service_principal for which to retrieve an ID. - -- - `warehouse` - - String - - The name of the warehouse for which to retrieve an ID. - -::: - - -### targets._name_.workspace - -**`Type: Map`** - -The Databricks workspace for the target. - - - -:::list-table - -- - Key - - Type - - Description - -- - `account_id` - - String - - The Databricks account ID. - -- - `artifact_path` - - String - - The artifact path to use within the workspace for both deployments and job runs - -- - `auth_type` - - String - - The authentication type. - -- - `azure_client_id` - - String - - The Azure client ID - -- - `azure_environment` - - String - - The Azure environment - -- - `azure_login_app_id` - - String - - The Azure login app ID - -- - `azure_tenant_id` - - String - - The Azure tenant ID - -- - `azure_use_msi` - - Boolean - - Whether to use MSI for Azure - -- - `azure_workspace_resource_id` - - String - - The Azure workspace resource ID - -- - `client_id` - - String - - The client ID for the workspace - -- - `experimental_is_unified_host` - - Boolean - - Deprecated: no-op. Unified hosts are now detected automatically from /.well-known/databricks-config. Retained for schema compatibility with existing databricks.yml files. - -- - `file_path` - - String - - The file path to use within the workspace for both deployments and job runs - -- - `google_service_account` - - String - - The Google service account name - -- - `host` - - String - - The Databricks workspace host URL - -- - `profile` - - String - - The Databricks workspace profile name - -- - `resource_path` - - String - - The workspace resource path - -- - `root_path` - - String - - The Databricks workspace root path - -- - `state_path` - - String - - The workspace state path - -- - `workspace_id` - - String - - The Databricks workspace ID - -::: - - -## variables - -**`Type: Map`** - -Defines a custom variable for the bundle. See [\_](/dev-tools/bundles/settings.md#variables). - -```yaml -variables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `default` - - Any - - The default value for the variable. - -- - `description` - - String - - The description of the variable - -- - `lookup` - - Map - - The name of the `alert`, `cluster_policy`, `cluster`, `dashboard`, `instance_pool`, `job`, `metastore`, `pipeline`, `query`, `service_principal`, or `warehouse` object for which to retrieve an ID. See [\_](#variablesnamelookup). - -- - `type` - - String - - The type of the variable. - -::: - - -### variables._name_.lookup - -**`Type: Map`** - -The name of the `alert`, `cluster_policy`, `cluster`, `dashboard`, `instance_pool`, `job`, `metastore`, `pipeline`, `query`, `service_principal`, or `warehouse` object for which to retrieve an ID. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert` - - String - - The name of the alert for which to retrieve an ID. - -- - `cluster` - - String - - The name of the cluster for which to retrieve an ID. - -- - `cluster_policy` - - String - - The name of the cluster_policy for which to retrieve an ID. - -- - `dashboard` - - String - - The name of the dashboard for which to retrieve an ID. - -- - `instance_pool` - - String - - The name of the instance_pool for which to retrieve an ID. - -- - `job` - - String - - The name of the job for which to retrieve an ID. - -- - `metastore` - - String - - The name of the metastore for which to retrieve an ID. - -- - `notification_destination` - - String - - The name of the notification_destination for which to retrieve an ID. - -- - `pipeline` - - String - - The name of the pipeline for which to retrieve an ID. - -- - `query` - - String - - The name of the query for which to retrieve an ID. - -- - `service_principal` - - String - - The name of the service_principal for which to retrieve an ID. - -- - `warehouse` - - String - - The name of the warehouse for which to retrieve an ID. - -::: - - -## workspace - -**`Type: Map`** - -Defines the Databricks workspace for the bundle. See [\_](/dev-tools/bundles/settings.md#workspace). - - - -:::list-table - -- - Key - - Type - - Description - -- - `account_id` - - String - - The Databricks account ID. - -- - `artifact_path` - - String - - The artifact path to use within the workspace for both deployments and job runs - -- - `auth_type` - - String - - The authentication type. - -- - `azure_client_id` - - String - - The Azure client ID - -- - `azure_environment` - - String - - The Azure environment - -- - `azure_login_app_id` - - String - - The Azure login app ID - -- - `azure_tenant_id` - - String - - The Azure tenant ID - -- - `azure_use_msi` - - Boolean - - Whether to use MSI for Azure - -- - `azure_workspace_resource_id` - - String - - The Azure workspace resource ID - -- - `client_id` - - String - - The client ID for the workspace - -- - `experimental_is_unified_host` - - Boolean - - Deprecated: no-op. Unified hosts are now detected automatically from /.well-known/databricks-config. Retained for schema compatibility with existing databricks.yml files. - -- - `file_path` - - String - - The file path to use within the workspace for both deployments and job runs - -- - `google_service_account` - - String - - The Google service account name - -- - `host` - - String - - The Databricks workspace host URL - -- - `profile` - - String - - The Databricks workspace profile name - -- - `resource_path` - - String - - The workspace resource path - -- - `root_path` - - String - - The Databricks workspace root path - -- - `state_path` - - String - - The workspace state path - -- - `workspace_id` - - String - - The Databricks workspace ID - -::: - \ No newline at end of file diff --git a/bundle/docsgen/output/resources.md b/bundle/docsgen/output/resources.md deleted file mode 100644 index 318bad87126..00000000000 --- a/bundle/docsgen/output/resources.md +++ /dev/null @@ -1,12834 +0,0 @@ ---- -description: 'Learn about resources supported by Declarative Automation Bundles and how to configure them.' ---- - - - -# :re[DABS] resources - -:re[DABS] allows you to specify information about the :re[Databricks] resources used by the bundle in the `resources` mapping in the bundle configuration. See [resources mapping](/dev-tools/bundles/settings.md#resources) and [resources key reference](/dev-tools/bundles/reference.md#resources). - -This article outlines supported resource types for bundles and provides details and an example for each supported type. For additional examples, see [\_](/dev-tools/bundles/resource-examples.md). - -:::tip - -To generate YAML for any existing resource, use the `databricks bundle generate` command. See [\_](/dev-tools/cli/bundle-commands.md#generate). - -::: - -## Supported resources - -The following table lists supported resource types for bundles. Some resources can be created by defining them in a bundle and deploying the bundle, and some resources only support referencing an existing resource to include in the bundle. - -Resources are defined using the corresponding [Databricks REST API](/api/workspace/introduction) object’s create operation request payload, where the object’s supported fields, expressed as YAML, are the resource’s supported properties. Links to documentation for each resource’s corresponding payloads are listed in the table. - -:::tip - -The `databricks bundle validate` command returns warnings if unknown resource properties are found in bundle configuration files. - -::: - -::::aws-azure - -:::list-table - -- - Resource - - Create support - - Corresponding REST API object -- - [app](#apps) - - ✓ - - [App object](/api/workspace/apps/create) -- - [cluster](#clusters) - - ✓ - - [Cluster object](/api/workspace/clusters/create) -- - [dashboard](#dashboards) - - - - [Dashboard object](/api/workspace/lakeview/create) -- - [experiment](#experiments) - - ✓ - - [Experiment object](/api/workspace/experiments/createexperiment) -- - [job](#job) - - ✓ - - [Job object](/api/workspace/jobs/create) -- - [model (legacy)](#models) - - ✓ - - [Model (legacy) object](/api/workspace/modelregistry/createmodel) -- - [model_serving_endpoint](#model_serving_endpoints) - - ✓ - - [Model serving endpoint object](/api/workspace/servingendpoints/create) -- - [pipeline](#pipeline) - - ✓ - - [Pipeline object](/api/workspace/pipelines/create) -- - [quality_monitor](#quality_monitors) - - ✓ - - [Quality monitor object](/api/workspace/qualitymonitors/create) -- - [registered_model](#registered_models) (:re[UC]) - - ✓ - - [Registered model object](/api/workspace/registeredmodels/create) -- - [schema](#schemas) (:re[UC]) - - ✓ - - [Schema object](/api/workspace/schemas/create) -- - [volume](#volumes) (:re[UC]) - - ✓ - - [Volume object](/api/workspace/volumes/create) - -::: - -:::: - -::::gcp - -:::list-table - -- - Resource - - Create support - - Corresponding REST API object -- - [cluster](#clusters) - - ✓ - - [Cluster object](/api/workspace/clusters/create) -- - [dashboard](#dashboards) - - - - [Dashboard object](/api/workspace/lakeview/create) -- - [experiment](#experiments) - - ✓ - - [Experiment object](/api/workspace/experiments/createexperiment) -- - [job](#jobs) - - ✓ - - [Job object](/api/workspace/jobs/create) -- - [model (legacy)](#models) - - ✓ - - [Model (legacy) object](/api/workspace/modelregistry/createmodel) -- - [model_serving_endpoint](#model_serving_endpoints) - - ✓ - - [Model serving endpoint object](/api/workspace/servingendpoints/create) -- - [pipeline](#pipelines) - - ✓ - - [Pipeline object]](/api/workspace/pipelines/create) -- - [quality_monitor](#quality_monitors) - - ✓ - - [Quality monitor object](/api/workspace/qualitymonitors/create) -- - [registered_model](#registered_models) (:re[UC]) - - ✓ - - [Registered model object](/api/workspace/registeredmodels/create) -- - [schema](#schemas) (:re[UC]) - - ✓ - - [Schema object](/api/workspace/schemas/create) -- - [volume](#volumes) (:re[UC]) - - ✓ - - [Volume object](/api/workspace/volumes/create) - -::: - -:::: - - -## alerts - -**`Type: Map`** - - - -```yaml -alerts: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `custom_description` - - String - - - -- - `custom_summary` - - String - - - -- - `display_name` - - String - - - -- - `evaluation` - - Map - - See [\_](#alertsnameevaluation). - -- - `file_path` - - String - - - -- - `lifecycle` - - Map - - See [\_](#alertsnamelifecycle). - -- - `parent_path` - - String - - - -- - `permissions` - - Sequence - - See [\_](#alertsnamepermissions). - -- - `query_text` - - String - - - -- - `run_as` - - Map - - See [\_](#alertsnamerun_as). - -- - `run_as_user_name` - - String - - This field is deprecated - -- - `schedule` - - Map - - See [\_](#alertsnameschedule). - -- - `warehouse_id` - - String - - - -::: - - -### alerts._name_.evaluation - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `comparison_operator` - - String - - Operator used for comparison in alert evaluation. - -- - `empty_result_state` - - String - - Alert state if result is empty. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated. - -- - `notification` - - Map - - User or Notification Destination to notify when alert is triggered. See [\_](#alertsnameevaluationnotification). - -- - `source` - - Map - - Source column from result to use to evaluate alert. See [\_](#alertsnameevaluationsource). - -- - `threshold` - - Map - - Threshold to user for alert evaluation, can be a column or a value. See [\_](#alertsnameevaluationthreshold). - -::: - - -### alerts._name_.evaluation.notification - -**`Type: Map`** - -User or Notification Destination to notify when alert is triggered. - - - -:::list-table - -- - Key - - Type - - Description - -- - `notify_on_ok` - - Boolean - - Whether to notify alert subscribers when alert returns back to normal. - -- - `retrigger_seconds` - - Integer - - 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 - - See [\_](#alertsnameevaluationnotificationsubscriptions). - -::: - - -### alerts._name_.evaluation.notification.subscriptions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination_id` - - String - - - -- - `user_email` - - String - - - -::: - - -### alerts._name_.evaluation.source - -**`Type: Map`** - -Source column from result to use to evaluate alert - - - -:::list-table - -- - Key - - Type - - Description - -- - `aggregation` - - String - - - -- - `display` - - String - - - -- - `name` - - String - - - -::: - - -### alerts._name_.evaluation.threshold - -**`Type: Map`** - -Threshold to user for alert evaluation, can be a column or a value. - - - -:::list-table - -- - Key - - Type - - Description - -- - `column` - - Map - - See [\_](#alertsnameevaluationthresholdcolumn). - -- - `value` - - Map - - See [\_](#alertsnameevaluationthresholdvalue). - -::: - - -### alerts._name_.evaluation.threshold.column - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `aggregation` - - String - - - -- - `display` - - String - - - -- - `name` - - String - - - -::: - - -### alerts._name_.evaluation.threshold.value - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `bool_value` - - Boolean - - - -- - `double_value` - - Any - - - -- - `string_value` - - String - - - -::: - - -### alerts._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### alerts._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -### alerts._name_.run_as - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `service_principal_name` - - String - - Application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - -- - `user_name` - - String - - The email of an active workspace user. Can only set this field to their own email. - -::: - - -### alerts._name_.schedule - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `pause_status` - - String - - Indicate whether this schedule is paused or not. - -- - `quartz_cron_schedule` - - String - - A cron expression using quartz syntax that specifies the schedule for this pipeline. Should use the quartz format described here: http://www.quartz-scheduler.org/documentation/quartz-2.1.7/tutorials/tutorial-lesson-06.html - -- - `timezone_id` - - String - - 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 https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details. - -::: - - -## apps - -**`Type: Map`** - -The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). - -```yaml -apps: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `compute_size` - - String - - - -- - `config` - - Map - - See [\_](#appsnameconfig). - -- - `description` - - String - - The description of the app. - -- - `git_repository` - - Map - - 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 [\_](#appsnamegit_repository). - -- - `git_source` - - Map - - 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 [\_](#appsnamegit_source). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#appsnamelifecycle). - -- - `name` - - String - - The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. It must be unique within the workspace. - -- - `permissions` - - Sequence - - See [\_](#appsnamepermissions). - -- - `resources` - - Sequence - - Resources for the app. See [\_](#appsnameresources). - -- - `source_code_path` - - String - - - -- - `telemetry_export_destinations` - - Sequence - - See [\_](#appsnametelemetry_export_destinations). - -- - `usage_policy_id` - - String - - - -- - `user_api_scopes` - - Sequence - - - -::: - - -### apps._name_.config - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `command` - - Sequence - - - -- - `env` - - Sequence - - See [\_](#appsnameconfigenv). - -::: - - -### apps._name_.config.env - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `name` - - String - - - -- - `value` - - String - - - -- - `value_from` - - String - - - -::: - - -### apps._name_.git_repository - -**`Type: Map`** - -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). - - - -:::list-table - -- - Key - - Type - - Description - -- - `provider` - - String - - Git provider. Case insensitive. Supported values: gitHub, gitHubEnterprise, bitbucketCloud, bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit. - -- - `url` - - String - - URL of the Git repository. - -::: - - -### apps._name_.git_source - -**`Type: Map`** - -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. - - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - Git branch to checkout. - -- - `commit` - - String - - Git commit SHA to checkout. - -- - `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 - - Git tag to checkout. - -::: - - -### apps._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -- - `started` - - Boolean - - Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. - -::: - - -### apps._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### apps._name_.resources - -**`Type: Sequence`** - -Resources for the app. - - - -:::list-table - -- - Key - - Type - - Description - -- - `app` - - Map - - See [\_](#appsnameresourcesapp). - -- - `database` - - Map - - See [\_](#appsnameresourcesdatabase). - -- - `description` - - String - - Description of the App Resource. - -- - `experiment` - - Map - - See [\_](#appsnameresourcesexperiment). - -- - `genie_space` - - Map - - See [\_](#appsnameresourcesgenie_space). - -- - `job` - - Map - - See [\_](#appsnameresourcesjob). - -- - `name` - - String - - Name of the App Resource. - -- - `postgres` - - Map - - See [\_](#appsnameresourcespostgres). - -- - `secret` - - Map - - See [\_](#appsnameresourcessecret). - -- - `serving_endpoint` - - Map - - See [\_](#appsnameresourcesserving_endpoint). - -- - `sql_warehouse` - - Map - - See [\_](#appsnameresourcessql_warehouse). - -- - `uc_securable` - - Map - - See [\_](#appsnameresourcesuc_securable). - -::: - - -### apps._name_.resources.app - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `name` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.database - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `database_name` - - String - - - -- - `instance_name` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.experiment - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `experiment_id` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.genie_space - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `name` - - String - - - -- - `permission` - - String - - - -- - `space_id` - - String - - - -::: - - -### apps._name_.resources.job - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.postgres - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `database` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.secret - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - - -- - `permission` - - String - - Permission to grant on the secret scope. Supported permissions are: "READ", "WRITE", "MANAGE". - -- - `scope` - - String - - - -::: - - -### apps._name_.resources.serving_endpoint - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `name` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.sql_warehouse - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -- - `permission` - - String - - - -::: - - -### apps._name_.resources.uc_securable - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `permission` - - String - - - -- - `securable_full_name` - - String - - - -- - `securable_type` - - String - - - -::: - - -### apps._name_.telemetry_export_destinations - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `unity_catalog` - - Map - - Unity Catalog Destinations for OTEL telemetry export. See [\_](#appsnametelemetry_export_destinationsunity_catalog). - -::: - - -### apps._name_.telemetry_export_destinations.unity_catalog - -**`Type: Map`** - -Unity Catalog Destinations for OTEL telemetry export. - - - -:::list-table - -- - Key - - Type - - Description - -- - `logs_table` - - String - - Unity Catalog table for OTEL logs. - -- - `metrics_table` - - String - - Unity Catalog table for OTEL metrics. - -- - `traces_table` - - String - - Unity Catalog table for OTEL traces (spans). - -::: - - -## catalogs - -**`Type: Map`** - - - -```yaml -catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `comment` - - String - - - -- - `connection_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#catalogsnamegrants). - -- - `lifecycle` - - Map - - See [\_](#catalogsnamelifecycle). - -- - `managed_encryption_settings` - - Map - - Control CMK encryption for managed catalog data. See [\_](#catalogsnamemanaged_encryption_settings). - -- - `name` - - String - - - -- - `options` - - Map - - - -- - `properties` - - Map - - - -- - `provider_name` - - String - - - -- - `share_name` - - String - - - -- - `storage_root` - - String - - - -::: - - -### catalogs._name_.grants - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `principal` - - String - - The principal (user email address or group name). For deleted principals, `principal` is empty while `principal_id` is populated. - -- - `privileges` - - Sequence - - The privileges assigned to the principal. - -::: - - -### catalogs._name_.grants.privileges - -**`Type: Sequence`** - -The privileges assigned to the principal. - - -### catalogs._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### catalogs._name_.managed_encryption_settings - -**`Type: Map`** - -Control CMK encryption for managed catalog data - - - -:::list-table - -- - Key - - Type - - Description - -- - `azure_encryption_settings` - - Map - - optional Azure settings - only required if an Azure CMK is used. See [\_](#catalogsnamemanaged_encryption_settingsazure_encryption_settings). - -- - `azure_key_vault_key_id` - - String - - the AKV URL in Azure, null otherwise. - -- - `customer_managed_key_id` - - String - - the CMK uuid in AWS and GCP, null otherwise. - -::: - - -### catalogs._name_.managed_encryption_settings.azure_encryption_settings - -**`Type: Map`** - -optional Azure settings - only required if an Azure CMK is used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `azure_cmk_access_connector_id` - - String - - - -- - `azure_cmk_managed_identity_id` - - String - - - -- - `azure_tenant_id` - - String - - - -::: - - -## clusters - -**`Type: Map`** - -The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). - -```yaml -clusters: - : - : -``` - - -:::list-table - -- - 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. Note: autoscaling works best with DB runtime versions 3.0 or later. See [\_](#clustersnameautoscale). - -- - `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 10000 minutes. 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 [\_](#clustersnameaws_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 [\_](#clustersnameazure_attributes). - -- - `cluster_log_conf` - - Map - - The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every `5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while the destination of executor logs is `$destination/$clusterId/executor`. See [\_](#clustersnamecluster_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. For job clusters, the cluster name is automatically set based on the job and job run IDs. - -- - `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`. Notes: - Currently, Databricks allows at most 45 custom tags - Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags - -- - `data_security_mode` - - String - - Data security mode decides what data governance model to use when accessing data from a cluster. * `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate access mode depending on your compute configuration. * `DATA_SECURITY_MODE_STANDARD`: A secure cluster that can be shared by multiple users. Cluster users are fully isolated so that they cannot see each other’s data and credentials. Most data governance features are supported in this mode. But programming languages and cluster features might be limited. * `DATA_SECURITY_MODE_DEDICATED`: A secure cluster that can only be exclusively used by a single user specified in `single_user_name`. Most programming languages, cluster features and data governance features are available in this mode. The following modes are legacy aliases for the above modes: * `USER_ISOLATION`: Legacy alias for `DATA_SECURITY_MODE_STANDARD`. * `SINGLE_USER`: Legacy alias for `DATA_SECURITY_MODE_DEDICATED`. The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for future Databricks Runtime versions: * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating from legacy Passthrough on high concurrency clusters. * `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This mode provides a way that doesn’t have UC nor passthrough enabled. - -- - `docker_image` - - Map - - See [\_](#clustersnamedocker_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 [\_](#clustersnamedriver_node_type_flexibility). - -- - `driver_node_type_id` - - String - - The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as `node_type_id` defined above. This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence. - -- - `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. - -- - `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 [\_](#clustersnamegcp_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. If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. See [\_](#clustersnameinit_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` - -- - `kind` - - String - - The kind of compute described by this compute specification. Depending on `kind`, different validations and default values will be applied. Clusters with `kind = CLASSIC_PREVIEW` support the following fields, whereas clusters with no specified `kind` do not. * [is_single_node](/api/workspace/clusters/create#is_single_node) * [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) By using the [simple form](https://docs.databricks.com/compute/simple-form.html), your clusters are automatically using `kind = CLASSIC_PREVIEW`. - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#clustersnamelifecycle). - -- - `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 :method:clusters/listNodeTypes API call. - -- - `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. Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in `spark_info` will gradually increase from 5 to 10 as the new nodes are provisioned. - -- - `permissions` - - Sequence - - See [\_](#clustersnamepermissions). - -- - `policy_id` - - String - - The ID of the cluster policy used to create the cluster if applicable. - -- - `remote_disk_throughput` - - Integer - - If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks. - -- - `runtime_engine` - - String - - - -- - `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. Please note that key-value pair of the form (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the driver and workers. In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the example below. This ensures that all default databricks managed environmental variables are included as well. Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - -- - `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 :method:clusters/sparkVersions API call. - -- - `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. Currently only supported for GCP HYPERDISK_BALANCED disks. - -- - `use_ml_runtime` - - Boolean - - This field can only be used when `kind = CLASSIC_PREVIEW`. `effective_spark_version` is determined by `spark_version` (DBR release), this field `use_ml_runtime`, and whether `node_type_id` is gpu node or not. - -- - `worker_node_type_flexibility` - - Map - - Flexible node type configuration for worker nodes. See [\_](#clustersnameworker_node_type_flexibility). - -- - `workload_type` - - Map - - Cluster Attributes showing for clusters workload types. See [\_](#clustersnameworkload_type). - -::: - - -**Example** - -The following example creates a cluster named `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" -``` - -### clusters._name_.autoscale - -**`Type: Map`** - -Parameters needed in order to automatically scale clusters up and down based on load. -Note: autoscaling works best with DB runtime versions 3.0 or later. - - - -:::list-table - -- - Key - - Type - - Description - -- - `max_workers` - - Integer - - The maximum number of workers to which the cluster can scale up when overloaded. Note that `max_workers` must be strictly greater than `min_workers`. - -- - `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. - -::: - - -### clusters._name_.aws_attributes - -**`Type: Map`** - -Attributes related to clusters running on Amazon Web Services. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `ebs_volume_count` - - Integer - - The number of volumes launched for each instance. Users can choose up to 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster creation will fail. These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc. If EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for scratch storage because heterogenously sized scratch devices can lead to inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance store volumes. Please note that if EBS volumes are specified, then the Spark configuration `spark.local.dir` will be overridden. - -- - `ebs_volume_iops` - - Integer - - If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_size` - - Integer - - The size of each EBS volume (in GiB) launched for each instance. For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this value must be within the range 500 - 4096. - -- - `ebs_volume_throughput` - - Integer - - If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_type` - - String - - All EBS volume types that Databricks supports. See https://aws.amazon.com/ebs/details/ for details. - -- - `first_on_demand` - - Integer - - The first `first_on_demand` nodes of the cluster will be placed on on-demand instances. If this value is greater than 0, the cluster driver node in particular will be placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `instance_profile_arn` - - String - - Nodes for this cluster will only be placed on AWS instances with this instance profile. If ommitted, nodes will be placed on instances without an IAM 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. - -- - `spot_bid_price_percent` - - Integer - - 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 cluster needs a new `r3.xlarge` spot instance, then the bid price is half of the price of on-demand `r3.xlarge` instances. Similarly, if this field is set to 200, the bid price is twice the price of on-demand `r3.xlarge` instances. If not specified, the default value is 100. When spot instances are requested for this cluster, only spot instances whose bid price percentage matches this field will be considered. Note that, for safety, we enforce this field to be no more than 10000. - -- - `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". The provided availability zone must be in the same region as the Databricks deployment. For example, "us-west-2a" is not a valid zone id if the Databricks deployment resides in the "us-east-1" region. This is an optional field at cluster creation, and if not specified, the zone "auto" will be used. If the zone specified is "auto", will try to place cluster in a zone with high availability, and will retry placement in a different AZ if there is not enough capacity. The list of available zones as well as the default value can be found by using the `List Zones` method. - -::: - - -### clusters._name_.azure_attributes - -**`Type: Map`** - -Attributes related to clusters running on Microsoft Azure. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `log_analytics_info` - - Map - - Defines values necessary to configure and run Azure Log Analytics agent. See [\_](#clustersnameazure_attributeslog_analytics_info). - -- - `spot_bid_max_price` - - Any - - The max bid price to be used for Azure spot instances. The Max price for the bid cannot be higher than the on-demand price of the instance. If not specified, the default value is -1, which specifies that the instance cannot be evicted on the basis of price, and only on the basis of availability. Further, the value should > 0 or -1. - -::: - - -### clusters._name_.azure_attributes.log_analytics_info - -**`Type: Map`** - -Defines values necessary to configure and run Azure Log Analytics agent - - - -:::list-table - -- - Key - - Type - - Description - -- - `log_analytics_primary_key` - - String - - The primary key for the Azure Log Analytics agent configuration - -- - `log_analytics_workspace_id` - - String - - The workspace ID for the Azure Log Analytics agent configuration - -::: - - -### clusters._name_.cluster_log_conf - -**`Type: Map`** - -The configuration for delivering spark logs to a long-term storage destination. -Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified -for one cluster. If the conf is given, the logs will be delivered to the destination every -`5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while -the destination of executor logs is `$destination/$clusterId/executor`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `dbfs` - - Map - - destination needs to be provided. e.g. `{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }`. See [\_](#clustersnamecluster_log_confdbfs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#clustersnamecluster_log_confs3). - -- - `volumes` - - Map - - destination needs to be provided, e.g. `{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }`. See [\_](#clustersnamecluster_log_confvolumes). - -::: - - -### clusters._name_.cluster_log_conf.dbfs - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - dbfs destination, e.g. `dbfs:/my/path` - -::: - - -### clusters._name_.cluster_log_conf.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### clusters._name_.cluster_log_conf.volumes - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### clusters._name_.docker_image - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `basic_auth` - - Map - - See [\_](#clustersnamedocker_imagebasic_auth). - -- - `url` - - String - - URL of the docker image. - -::: - - -### clusters._name_.docker_image.basic_auth - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `password` - - String - - Password of the user - -- - `username` - - String - - Name of the user - -::: - - -### clusters._name_.driver_node_type_flexibility - -**`Type: Map`** - -Flexible node type configuration for the driver node. - - - -:::list-table - -- - 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. - -::: - - -### clusters._name_.gcp_attributes - -**`Type: Map`** - -Attributes related to clusters running on Google Cloud Platform. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - This field determines whether the instance pool will contain preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. - -- - `boot_disk_size` - - Integer - - Boot disk size in GB - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `google_service_account` - - String - - If provided, the cluster will impersonate the google service account when accessing gcloud services (like GCS). The google service account must have previously been added to the Databricks environment by an account administrator. - -- - `local_ssd_count` - - Integer - - If provided, each node (workers and driver) in the cluster will have this number of local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP documentation](https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds) for the supported number of local SSDs for each instance type. - -- - `use_preemptible_executors` - - Boolean - - This field is deprecated - -- - `zone_id` - - String - - Identifier for the availability zone in which the cluster resides. This can be one of the following: - "HA" => High availability, spread nodes across availability zones for a Databricks deployment region [default]. - "AUTO" => Databricks picks an availability zone to schedule the cluster on. - A GCP availability zone => Pick One of the available zones for (machine type + region) from https://cloud.google.com/compute/docs/regions-zones. - -::: - - -### clusters._name_.init_scripts - -**`Type: Sequence`** - -The configuration for storing init scripts. Any number of destinations can be specified. -The scripts are executed sequentially in the order provided. -If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `abfss` - - Map - - Contains the Azure Data Lake Storage destination path. See [\_](#clustersnameinit_scriptsabfss). - -- - `dbfs` - - Map - - This field is deprecated - -- - `file` - - Map - - destination needs to be provided, e.g. `{ "file": { "destination": "file:/my/local/file.sh" } }`. See [\_](#clustersnameinit_scriptsfile). - -- - `gcs` - - Map - - destination needs to be provided, e.g. `{ "gcs": { "destination": "gs://my-bucket/file.sh" } }`. See [\_](#clustersnameinit_scriptsgcs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#clustersnameinit_scriptss3). - -- - `volumes` - - Map - - destination needs to be provided. e.g. `{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }`. See [\_](#clustersnameinit_scriptsvolumes). - -- - `workspace` - - Map - - destination needs to be provided, e.g. `{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }`. See [\_](#clustersnameinit_scriptsworkspace). - -::: - - -### clusters._name_.init_scripts.abfss - -**`Type: Map`** - -Contains the Azure Data Lake Storage destination path - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - abfss destination, e.g. `abfss://@.dfs.core.windows.net/`. - -::: - - -### clusters._name_.init_scripts.file - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "file": { "destination": "file:/my/local/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - local file destination, e.g. `file:/my/local/file.sh` - -::: - - -### clusters._name_.init_scripts.gcs - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "gcs": { "destination": "gs://my-bucket/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - GCS destination/URI, e.g. `gs://my-bucket/some-prefix` - -::: - - -### clusters._name_.init_scripts.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### clusters._name_.init_scripts.volumes - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### clusters._name_.init_scripts.workspace - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - wsfs destination, e.g. `workspace:/cluster-init-scripts/setup-datadog.sh` - -::: - - -### clusters._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -- - `started` - - Boolean - - Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. - -::: - - -### clusters._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### clusters._name_.worker_node_type_flexibility - -**`Type: Map`** - -Flexible node type configuration for worker nodes. - - - -:::list-table - -- - 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. - -::: - - -### clusters._name_.workload_type - -**`Type: Map`** - -Cluster Attributes showing for clusters workload types. - - - -:::list-table - -- - Key - - Type - - Description - -- - `clients` - - Map - - defined what type of clients can use the cluster. E.g. Notebooks, Jobs. See [\_](#clustersnameworkload_typeclients). - -::: - - -### clusters._name_.workload_type.clients - -**`Type: Map`** - -defined what type of clients can use the cluster. E.g. Notebooks, Jobs - - - -:::list-table - -- - Key - - Type - - Description - -- - `jobs` - - Boolean - - With jobs set, the cluster can be used for jobs - -- - `notebooks` - - Boolean - - With notebooks set, this cluster can be used for notebooks - -::: - - -## dashboards - -**`Type: Map`** - -The dashboard resource allows you to manage [AI/BI dashboards](/api/workspace/lakeview/create) in a bundle. For information about AI/BI dashboards, see [_](/dashboards/index.md). - -```yaml -dashboards: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `create_time` - - String - - The timestamp of when the dashboard was created. - -- - `dashboard_id` - - String - - UUID identifying the dashboard. - -- - `dataset_catalog` - - String - - Sets the default catalog for all datasets in this dashboard. When set, this overrides the catalog specified in individual dataset definitions. - -- - `dataset_schema` - - String - - Sets the default schema for all datasets in this dashboard. When set, this overrides the schema specified in individual dataset definitions. - -- - `display_name` - - String - - The display name of the dashboard. - -- - `embed_credentials` - - Boolean - - - -- - `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. This field is excluded in List Dashboards responses. - -- - `file_path` - - String - - - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#dashboardsnamelifecycle). - -- - `lifecycle_state` - - String - - The state of the dashboard resource. Used for tracking trashed status. - -- - `parent_path` - - String - - The workspace path of the folder containing the dashboard. Includes leading slash and no trailing slash. This field is excluded in List Dashboards responses. - -- - `path` - - String - - The workspace path of the dashboard asset, including the file name. Exported dashboards always have the file extension `.lvdash.json`. This field is excluded in List Dashboards responses. - -- - `permissions` - - Sequence - - See [\_](#dashboardsnamepermissions). - -- - `serialized_dashboard` - - Any - - The contents of the dashboard in serialized string form. This field is excluded in List Dashboards responses. Use the [get dashboard API](https://docs.databricks.com/api/workspace/lakeview/get) to retrieve an example response, which includes the `serialized_dashboard` field. This field provides the structure of the JSON string that represents the dashboard's layout and components. - -- - `update_time` - - String - - The timestamp of when the dashboard was last updated by the user. This field is excluded in List Dashboards responses. - -- - `warehouse_id` - - String - - The warehouse ID used to run the dashboard. - -::: - - -**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} -``` -If you use the UI to modify the 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 [_](/dev-tools/cli/bundle-commands.md#generate). - -In addition, if you attempt to deploy a bundle 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 [_](/dev-tools/cli/bundle-commands.md#deploy). - -### dashboards._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### dashboards._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -## database_catalogs - -**`Type: Map`** - - - -```yaml -database_catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `create_database_if_not_exists` - - Boolean - - - -- - `database_instance_name` - - String - - The name of the DatabaseInstance housing the database. - -- - `database_name` - - String - - The name of the database (in a instance) associated with the catalog. - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#database_catalogsnamelifecycle). - -- - `name` - - String - - The name of the catalog in UC. - -::: - - -### database_catalogs._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## database_instances - -**`Type: Map`** - -A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage. - -```yaml -database_instances: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `capacity` - - String - - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8". - -- - `custom_tags` - - Sequence - - Custom tags associated with the instance. This field is only included on create and update responses. See [\_](#database_instancesnamecustom_tags). - -- - `enable_pg_native_login` - - Boolean - - Whether to enable PG native password login on the instance. Defaults to false. - -- - `enable_readable_secondaries` - - Boolean - - Whether to enable secondaries to serve read-only traffic. Defaults to false. - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#database_instancesnamelifecycle). - -- - `name` - - String - - The name of the instance. This is the unique identifier for the instance. - -- - `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. This field is input only, see effective_node_count for the output. - -- - `parent_instance_ref` - - Map - - The ref of the parent instance. This is only available if the instance is child instance. Input: For specifying the parent instance to create a child instance. Optional. Output: Only populated if provided as input to create a child instance. See [\_](#database_instancesnameparent_instance_ref). - -- - `permissions` - - Sequence - - See [\_](#database_instancesnamepermissions). - -- - `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. - -- - `stopped` - - Boolean - - Whether to stop the instance. An input only param, see effective_stopped for the output. - -- - `usage_policy_id` - - String - - The desired usage policy to associate with the instance. - -::: - - -### database_instances._name_.custom_tags - -**`Type: Sequence`** - -Custom tags associated with the instance. This field is only included on create and update responses. - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - The key of the custom tag. - -- - `value` - - String - - The value of the custom tag. - -::: - - -### database_instances._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### database_instances._name_.parent_instance_ref - -**`Type: Map`** - -The ref of the parent instance. This is only available if the instance is -child instance. -Input: For specifying the parent instance to create a child instance. Optional. -Output: Only populated if provided as input to create a child instance. - - - -:::list-table - -- - 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. Input: For specifying the point in time to create a child instance. Optional. Output: Only populated if provided as input to create a child instance. - -- - `lsn` - - String - - User-specified WAL LSN of the ref database instance. Input: For specifying the WAL LSN to create a child instance. Optional. Output: Only populated if provided as input to create a child instance. - -- - `name` - - String - - Name of the ref database instance. - -::: - - -### database_instances._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -## experiments - -**`Type: Map`** - -The experiment resource allows you to define [MLflow experiments](/api/workspace/experiments/createexperiment) in a bundle. For information about MLflow experiments, see [_](/mlflow/experiments.md). - -```yaml -experiments: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `artifact_location` - - String - - Location where all artifacts for the experiment are stored. If not provided, the remote server will select an appropriate default. - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#experimentsnamelifecycle). - -- - `name` - - String - - Experiment name. - -- - `permissions` - - Sequence - - See [\_](#experimentsnamepermissions). - -- - `tags` - - Sequence - - A collection of tags to set on the experiment. Maximum tag size and number of tags per request depends on the storage backend. All storage backends are guaranteed to support tag keys up to 250 bytes in size and tag values up to 5000 bytes in size. All storage backends are also guaranteed to support up to 20 tags per request. See [\_](#experimentsnametags). - -::: - - -**Example** - -The following example defines an experiment that all users can view: - -```yaml -resources: - experiments: - experiment: - name: my_ml_experiment - permissions: - - level: CAN_READ - group_name: users - description: MLflow experiment used to track runs -``` - -### experiments._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### experiments._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### experiments._name_.tags - -**`Type: Sequence`** - -A collection of tags to set on the experiment. Maximum tag size and number of tags per request -depends on the storage backend. All storage backends are guaranteed to support tag keys up -to 250 bytes in size and tag values up to 5000 bytes in size. All storage backends are also -guaranteed to support up to 20 tags per request. - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - The tag key. - -- - `value` - - String - - The tag value. - -::: - - -## external_locations - -**`Type: Map`** - - - -```yaml -external_locations: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `comment` - - String - - - -- - `credential_name` - - String - - - -- - `enable_file_events` - - Boolean - - - -- - `encryption_details` - - Map - - Encryption options that apply to clients connecting to cloud storage. See [\_](#external_locationsnameencryption_details). - -- - `fallback` - - Boolean - - - -- - `file_event_queue` - - Map - - See [\_](#external_locationsnamefile_event_queue). - -- - `grants` - - Sequence - - See [\_](#external_locationsnamegrants). - -- - `lifecycle` - - Map - - See [\_](#external_locationsnamelifecycle). - -- - `name` - - String - - - -- - `read_only` - - Boolean - - - -- - `skip_validation` - - Boolean - - - -- - `url` - - String - - - -::: - - -### external_locations._name_.encryption_details - -**`Type: Map`** - -Encryption options that apply to clients connecting to cloud storage. - - - -:::list-table - -- - Key - - Type - - Description - -- - `sse_encryption_details` - - Map - - Server-Side Encryption properties for clients communicating with AWS s3. See [\_](#external_locationsnameencryption_detailssse_encryption_details). - -::: - - -### external_locations._name_.encryption_details.sse_encryption_details - -**`Type: Map`** - -Server-Side Encryption properties for clients communicating with AWS s3. - - - -:::list-table - -- - Key - - Type - - Description - -- - `algorithm` - - String - - SSE algorithm to use for encrypting S3 objects - -- - `aws_kms_key_arn` - - String - - - -::: - - -### external_locations._name_.file_event_queue - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `managed_aqs` - - Map - - See [\_](#external_locationsnamefile_event_queuemanaged_aqs). - -- - `managed_pubsub` - - Map - - See [\_](#external_locationsnamefile_event_queuemanaged_pubsub). - -- - `managed_sqs` - - Map - - See [\_](#external_locationsnamefile_event_queuemanaged_sqs). - -- - `provided_aqs` - - Map - - See [\_](#external_locationsnamefile_event_queueprovided_aqs). - -- - `provided_pubsub` - - Map - - See [\_](#external_locationsnamefile_event_queueprovided_pubsub). - -- - `provided_sqs` - - Map - - See [\_](#external_locationsnamefile_event_queueprovided_sqs). - -::: - - -### external_locations._name_.file_event_queue.managed_aqs - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `queue_url` - - String - - - -- - `resource_group` - - String - - - -- - `subscription_id` - - String - - - -::: - - -### external_locations._name_.file_event_queue.managed_pubsub - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `subscription_name` - - String - - - -::: - - -### external_locations._name_.file_event_queue.managed_sqs - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `queue_url` - - String - - - -::: - - -### external_locations._name_.file_event_queue.provided_aqs - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `queue_url` - - String - - - -- - `resource_group` - - String - - - -- - `subscription_id` - - String - - - -::: - - -### external_locations._name_.file_event_queue.provided_pubsub - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `subscription_name` - - String - - - -::: - - -### external_locations._name_.file_event_queue.provided_sqs - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `queue_url` - - String - - - -::: - - -### external_locations._name_.grants - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `principal` - - String - - The principal (user email address or group name). For deleted principals, `principal` is empty while `principal_id` is populated. - -- - `privileges` - - Sequence - - The privileges assigned to the principal. - -::: - - -### external_locations._name_.grants.privileges - -**`Type: Sequence`** - -The privileges assigned to the principal. - - -### external_locations._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## genie_spaces - -**`Type: Map`** - - - -```yaml -genie_spaces: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `description` - - String - - Description of the Genie space shown alongside the title in the Databricks UI. - -- - `etag` - - String - - - -- - `file_path` - - String - - Local path to a `.geniespace.json` file holding the serialized Genie space definition. The contents are inlined into `serialized_space` at deploy time. Mutually exclusive with an inline `serialized_space`. - -- - `lifecycle` - - Map - - See [\_](#genie_spacesnamelifecycle). - -- - `parent_path` - - String - - Workspace folder under which to create the Genie space. Immutable: changing this field recreates the resource. - -- - `permissions` - - Sequence - - See [\_](#genie_spacesnamepermissions). - -- - `serialized_space` - - Any - - Serialized Genie space body. May be provided inline as a JSON string (or YAML that will be marshalled to JSON) or referenced via `file_path`. To round-trip an existing space into a bundle, use `databricks bundle generate genie-space`. - -- - `title` - - String - - Title of the Genie space shown in the Databricks UI. - -- - `warehouse_id` - - String - - ID of the SQL warehouse used to run queries for this Genie space. - -::: - - -### genie_spaces._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### genie_spaces._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -## jobs - -**`Type: Map`** - -The job resource allows you to define [jobs and their corresponding tasks](/api/workspace/jobs/create) in your bundle. For information about jobs, see [_](/jobs/index.md). For a tutorial that uses a Declarative Automation Bundles template to create a job, see [_](/dev-tools/bundles/jobs-tutorial.md). - -```yaml -jobs: - : - : -``` - - -:::list-table - -- - 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. - -- - `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. See [\_](#jobsnamecontinuous). - -- - `deployment` - - Map - - Deployment information for jobs managed by external sources. See [\_](#jobsnamedeployment). - -- - `description` - - String - - An optional description for the job. The maximum length is 27700 characters in UTF-8 encoding. - -- - `edit_mode` - - String - - Edit mode of the job. * `UI_LOCKED`: The job is in a locked UI state and cannot be modified. * `EDITABLE`: The job is in an editable state and can be modified. - -- - `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 [\_](#jobsnameemail_notifications). - -- - `environments` - - Sequence - - A list of task execution environment specifications that can be referenced by serverless tasks of this job. For serverless notebook tasks, if the environment_key is not specified, the notebook environment will be used if present. If a jobs environment is specified, it will override the notebook environment. For other serverless tasks, the task environment is required to be specified using environment_key in the task settings. See [\_](#jobsnameenvironments). - -- - `format` - - String - - This field is deprecated - -- - `git_source` - - Map - - An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks. If `git_source` is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting `source` to `WORKSPACE` on the task. Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, `git_source` must be defined on the job. See [\_](#jobsnamegit_source). - -- - `health` - - Map - - An optional set of health rules that can be defined for this job. See [\_](#jobsnamehealth). - -- - `job_clusters` - - 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. See [\_](#jobsnamejob_clusters). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#jobsnamelifecycle). - -- - `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. This is useful for example if you trigger your job on a frequent schedule and want to allow consecutive runs to overlap with each other, or if you want to trigger multiple runs which differ by their input parameters. This setting affects only new runs. For example, suppose the job’s concurrency is 4 and there are 4 concurrent active runs. Then setting the concurrency to 3 won’t kill any of the active runs. However, from then on, new runs are skipped unless there are fewer than 3 active runs. This value cannot exceed 1000. Setting this value to `0` causes all new runs to be skipped. - -- - `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 [\_](#jobsnamenotification_settings). - -- - `parameters` - - Sequence - - Job-level parameter definitions. See [\_](#jobsnameparameters). - -- - `performance_target` - - String - - The performance mode on a serverless job. This field determines the level of compute performance or cost-efficiency for the run. The performance target does not apply to tasks that run on Serverless GPU compute. * `STANDARD`: Enables cost-efficient execution of serverless workloads. * `PERFORMANCE_OPTIMIZED`: Prioritizes fast startup and execution times through rapid scaling and optimized cluster performance. - -- - `permissions` - - Sequence - - See [\_](#jobsnamepermissions). - -- - `queue` - - Map - - The queue settings of the job. See [\_](#jobsnamequeue). - -- - `run_as` - - Map - - Write-only setting. Specifies the user or service principal that the job runs as. If not specified, the job runs as the user who created the job. Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown. See [\_](#jobsnamerun_as). - -- - `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 [\_](#jobsnameschedule). - -- - `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. It supports up to 1000 elements in write endpoints (:method:jobs/create, :method:jobs/reset, :method:jobs/update, :method:jobs/submit). Read endpoints return only 100 tasks. If more than 100 tasks are available, you can paginate through them using :method:jobs/get. Use the `next_page_token` field at the object root to determine if more results are available. See [\_](#jobsnametasks). - -- - `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. The default behavior is that the job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`. See [\_](#jobsnametrigger). - -- - `webhook_notifications` - - Map - - A collection of system notification IDs to notify when runs of this job begin or complete. See [\_](#jobsnamewebhook_notifications). - -::: - - -**Example** - -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 -``` - -For information about defining job tasks and overriding job settings, see [_](/dev-tools/bundles/job-task-types.md), [_](/dev-tools/bundles/job-task-override.md), and [_](/dev-tools/bundles/cluster-override.md). - -### jobs._name_.continuous - -**`Type: 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. - - - -:::list-table - -- - Key - - Type - - Description - -- - `pause_status` - - String - - Indicate whether the continuous execution of the job is paused or not. Defaults to UNPAUSED. - -- - `task_retry_mode` - - String - - Indicate whether the continuous job is applying task level retries or not. Defaults to NEVER. - -::: - - -### jobs._name_.deployment - -**`Type: Map`** - -Deployment information for jobs managed by external sources. - - - -:::list-table - -- - Key - - Type - - Description - -- - `kind` - - String - - The kind of deployment that manages the job. * `BUNDLE`: The job is managed by Databricks Asset Bundle. * `SYSTEM_MANAGED`: The job is managed by Databricks and is read-only. - -- - `metadata_file_path` - - String - - Path of the file that contains deployment metadata. - -::: - - -### jobs._name_.email_notifications - -**`Type: 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. - - - -:::list-table - -- - Key - - Type - - Description - -- - `no_alert_for_skipped_runs` - - Boolean - - This field is deprecated - -- - `on_duration_warning_threshold_exceeded` - - Sequence - - A list of email addresses to be notified when the duration of a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is specified in the `health` field for the job, notifications are not sent. - -- - `on_failure` - - Sequence - - A list of email addresses to be notified when a run unsuccessfully completes. A run is considered to have completed unsuccessfully if it ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or `TIMED_OUT` result_state. If this is not specified on job creation, reset, or update the list is empty, and notifications are not sent. - -- - `on_start` - - Sequence - - A list of email addresses to be notified when a run begins. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent. - -- - `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_success` - - Sequence - - A list of email addresses to be notified when a run successfully completes. A run is considered to have completed successfully if it ends with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent. - -::: - - -### jobs._name_.environments - -**`Type: Sequence`** - -A list of task execution environment specifications that can be referenced by serverless tasks of this job. -For serverless notebook tasks, if the environment_key is not specified, the notebook environment will be used if present. If a jobs environment is specified, it will override the notebook environment. -For other serverless tasks, the task environment is required to be specified using environment_key in the task settings. - - - -:::list-table - -- - Key - - Type - - Description - -- - `environment_key` - - String - - The key of an environment. It has to be unique within a job. - -- - `spec` - - Map - - The environment entity used to preserve serverless environment side panel, jobs' environment for non-notebook task, and SDP's environment for classic and serverless pipelines. In this minimal environment spec, only pip and java dependencies are supported. See [\_](#jobsnameenvironmentsspec). - -::: - - -### jobs._name_.environments.spec - -**`Type: Map`** - -The environment entity used to preserve serverless environment side panel, jobs' environment for non-notebook task, and SDP's environment for classic and serverless pipelines. -In this minimal environment spec, only pip and java dependencies are supported. - - - -:::list-table - -- - Key - - Type - - Description - -- - `base_environment` - - String - - The base environment this environment is built on top of. A base environment defines the environment version and a list of dependencies for serverless compute. The value can be a file path to a custom `env.yaml` file (e.g., `/Workspace/path/to/env.yaml`). Support for a Databricks-provided base environment ID (e.g., `workspace-base-environments/databricks_ai_v4`) and workspace base environment ID (e.g., `workspace-base-environments/dbe_b849b66e-b31a-4cb5-b161-1f2b10877fb7`) is in Beta. Either `environment_version` or `base_environment` can be provided. For more information about Databricks-provided base environments, see the [list workspace base environments](:method:Environments/ListWorkspaceBaseEnvironments) API. For more information, see - -- - `client` - - String - - This field is deprecated - -- - `dependencies` - - Sequence - - List of pip dependencies, as supported by the version of pip in this environment. - -- - `environment_version` - - String - - Either `environment_version` or `base_environment` needs to be provided. 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. - -- - `java_dependencies` - - Sequence - - - -::: - - -### jobs._name_.git_source - -**`Type: Map`** - -An optional specification for a remote Git repository containing the source code used by tasks. Version-controlled source code is supported by notebook, dbt, Python script, and SQL File tasks. - -If `git_source` is set, these tasks retrieve the file from the remote repository by default. However, this behavior can be overridden by setting `source` to `WORKSPACE` on the task. - -Note: dbt and SQL File tasks support only version-controlled sources. If dbt or SQL File tasks are used, `git_source` must be defined on the job. - - - -:::list-table - -- - Key - - Type - - Description - -- - `git_branch` - - String - - 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. - -- - `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 [\_](#jobsnamegit_sourcegit_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 - - See [\_](#jobsnamegit_sourcesparse_checkout). - -::: - - -### jobs._name_.git_source.git_snapshot - -**`Type: Map`** - -Read-only state of the remote repository at the time the job was run. This field is only included on job runs. - - - -:::list-table - -- - 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. - -::: - - -### jobs._name_.git_source.sparse_checkout - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `patterns` - - Sequence - - List of patterns to include for sparse checkout. - -::: - - -### jobs._name_.health - -**`Type: Map`** - -An optional set of health rules that can be defined for this job. - - - -:::list-table - -- - Key - - Type - - Description - -- - `rules` - - Sequence - - See [\_](#jobsnamehealthrules). - -::: - - -### jobs._name_.health.rules - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `metric` - - String - - Specifies the health metric that is being evaluated for a particular health rule. * `RUN_DURATION_SECONDS`: Expected total time for a run in seconds. * `STREAMING_BACKLOG_BYTES`: An estimate of the maximum bytes of data waiting to be consumed across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset lag across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_SECONDS`: An estimate of the maximum consumer delay across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_FILES`: An estimate of the maximum number of outstanding files across all streams. This metric is in Public Preview. - -- - `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. - -::: - - -### jobs._name_.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. - - - -:::list-table - -- - 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 [\_](#jobsnamejob_clustersnew_cluster). - -::: - - -### jobs._name_.job_clusters.new_cluster - -**`Type: Map`** - -If new_cluster, a description of a cluster that is created for each task. - - - -:::list-table - -- - 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. Note: autoscaling works best with DB runtime versions 3.0 or later. See [\_](#jobsnamejob_clustersnew_clusterautoscale). - -- - `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 10000 minutes. 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 [\_](#jobsnamejob_clustersnew_clusteraws_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 [\_](#jobsnamejob_clustersnew_clusterazure_attributes). - -- - `cluster_log_conf` - - Map - - The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every `5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while the destination of executor logs is `$destination/$clusterId/executor`. See [\_](#jobsnamejob_clustersnew_clustercluster_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. For job clusters, the cluster name is automatically set based on the job and job run IDs. - -- - `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`. Notes: - Currently, Databricks allows at most 45 custom tags - Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags - -- - `data_security_mode` - - String - - Data security mode decides what data governance model to use when accessing data from a cluster. * `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate access mode depending on your compute configuration. * `DATA_SECURITY_MODE_STANDARD`: A secure cluster that can be shared by multiple users. Cluster users are fully isolated so that they cannot see each other’s data and credentials. Most data governance features are supported in this mode. But programming languages and cluster features might be limited. * `DATA_SECURITY_MODE_DEDICATED`: A secure cluster that can only be exclusively used by a single user specified in `single_user_name`. Most programming languages, cluster features and data governance features are available in this mode. The following modes are legacy aliases for the above modes: * `USER_ISOLATION`: Legacy alias for `DATA_SECURITY_MODE_STANDARD`. * `SINGLE_USER`: Legacy alias for `DATA_SECURITY_MODE_DEDICATED`. The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for future Databricks Runtime versions: * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating from legacy Passthrough on high concurrency clusters. * `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This mode provides a way that doesn’t have UC nor passthrough enabled. - -- - `docker_image` - - Map - - See [\_](#jobsnamejob_clustersnew_clusterdocker_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 [\_](#jobsnamejob_clustersnew_clusterdriver_node_type_flexibility). - -- - `driver_node_type_id` - - String - - The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as `node_type_id` defined above. This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence. - -- - `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. - -- - `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 [\_](#jobsnamejob_clustersnew_clustergcp_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. If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. See [\_](#jobsnamejob_clustersnew_clusterinit_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` - -- - `kind` - - String - - The kind of compute described by this compute specification. Depending on `kind`, different validations and default values will be applied. Clusters with `kind = CLASSIC_PREVIEW` support the following fields, whereas clusters with no specified `kind` do not. * [is_single_node](/api/workspace/clusters/create#is_single_node) * [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) By using the [simple form](https://docs.databricks.com/compute/simple-form.html), your clusters are automatically using `kind = CLASSIC_PREVIEW`. - -- - `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 :method:clusters/listNodeTypes API call. - -- - `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. Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in `spark_info` will gradually increase from 5 to 10 as the new nodes are provisioned. - -- - `policy_id` - - String - - The ID of the cluster policy used to create the cluster if applicable. - -- - `remote_disk_throughput` - - Integer - - If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks. - -- - `runtime_engine` - - String - - - -- - `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. Please note that key-value pair of the form (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the driver and workers. In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the example below. This ensures that all default databricks managed environmental variables are included as well. Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - -- - `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 :method:clusters/sparkVersions API call. - -- - `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. Currently only supported for GCP HYPERDISK_BALANCED disks. - -- - `use_ml_runtime` - - Boolean - - This field can only be used when `kind = CLASSIC_PREVIEW`. `effective_spark_version` is determined by `spark_version` (DBR release), this field `use_ml_runtime`, and whether `node_type_id` is gpu node or not. - -- - `worker_node_type_flexibility` - - Map - - Flexible node type configuration for worker nodes. See [\_](#jobsnamejob_clustersnew_clusterworker_node_type_flexibility). - -- - `workload_type` - - Map - - Cluster Attributes showing for clusters workload types. See [\_](#jobsnamejob_clustersnew_clusterworkload_type). - -::: - - -### jobs._name_.job_clusters.new_cluster.autoscale - -**`Type: Map`** - -Parameters needed in order to automatically scale clusters up and down based on load. -Note: autoscaling works best with DB runtime versions 3.0 or later. - - - -:::list-table - -- - Key - - Type - - Description - -- - `max_workers` - - Integer - - The maximum number of workers to which the cluster can scale up when overloaded. Note that `max_workers` must be strictly greater than `min_workers`. - -- - `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. - -::: - - -### jobs._name_.job_clusters.new_cluster.aws_attributes - -**`Type: Map`** - -Attributes related to clusters running on Amazon Web Services. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `ebs_volume_count` - - Integer - - The number of volumes launched for each instance. Users can choose up to 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster creation will fail. These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc. If EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for scratch storage because heterogenously sized scratch devices can lead to inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance store volumes. Please note that if EBS volumes are specified, then the Spark configuration `spark.local.dir` will be overridden. - -- - `ebs_volume_iops` - - Integer - - If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_size` - - Integer - - The size of each EBS volume (in GiB) launched for each instance. For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this value must be within the range 500 - 4096. - -- - `ebs_volume_throughput` - - Integer - - If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_type` - - String - - All EBS volume types that Databricks supports. See https://aws.amazon.com/ebs/details/ for details. - -- - `first_on_demand` - - Integer - - The first `first_on_demand` nodes of the cluster will be placed on on-demand instances. If this value is greater than 0, the cluster driver node in particular will be placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `instance_profile_arn` - - String - - Nodes for this cluster will only be placed on AWS instances with this instance profile. If ommitted, nodes will be placed on instances without an IAM 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. - -- - `spot_bid_price_percent` - - Integer - - 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 cluster needs a new `r3.xlarge` spot instance, then the bid price is half of the price of on-demand `r3.xlarge` instances. Similarly, if this field is set to 200, the bid price is twice the price of on-demand `r3.xlarge` instances. If not specified, the default value is 100. When spot instances are requested for this cluster, only spot instances whose bid price percentage matches this field will be considered. Note that, for safety, we enforce this field to be no more than 10000. - -- - `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". The provided availability zone must be in the same region as the Databricks deployment. For example, "us-west-2a" is not a valid zone id if the Databricks deployment resides in the "us-east-1" region. This is an optional field at cluster creation, and if not specified, the zone "auto" will be used. If the zone specified is "auto", will try to place cluster in a zone with high availability, and will retry placement in a different AZ if there is not enough capacity. The list of available zones as well as the default value can be found by using the `List Zones` method. - -::: - - -### jobs._name_.job_clusters.new_cluster.azure_attributes - -**`Type: Map`** - -Attributes related to clusters running on Microsoft Azure. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `log_analytics_info` - - Map - - Defines values necessary to configure and run Azure Log Analytics agent. See [\_](#jobsnamejob_clustersnew_clusterazure_attributeslog_analytics_info). - -- - `spot_bid_max_price` - - Any - - The max bid price to be used for Azure spot instances. The Max price for the bid cannot be higher than the on-demand price of the instance. If not specified, the default value is -1, which specifies that the instance cannot be evicted on the basis of price, and only on the basis of availability. Further, the value should > 0 or -1. - -::: - - -### jobs._name_.job_clusters.new_cluster.azure_attributes.log_analytics_info - -**`Type: Map`** - -Defines values necessary to configure and run Azure Log Analytics agent - - - -:::list-table - -- - Key - - Type - - Description - -- - `log_analytics_primary_key` - - String - - The primary key for the Azure Log Analytics agent configuration - -- - `log_analytics_workspace_id` - - String - - The workspace ID for the Azure Log Analytics agent configuration - -::: - - -### jobs._name_.job_clusters.new_cluster.cluster_log_conf - -**`Type: Map`** - -The configuration for delivering spark logs to a long-term storage destination. -Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified -for one cluster. If the conf is given, the logs will be delivered to the destination every -`5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while -the destination of executor logs is `$destination/$clusterId/executor`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `dbfs` - - Map - - destination needs to be provided. e.g. `{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }`. See [\_](#jobsnamejob_clustersnew_clustercluster_log_confdbfs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#jobsnamejob_clustersnew_clustercluster_log_confs3). - -- - `volumes` - - Map - - destination needs to be provided, e.g. `{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }`. See [\_](#jobsnamejob_clustersnew_clustercluster_log_confvolumes). - -::: - - -### jobs._name_.job_clusters.new_cluster.cluster_log_conf.dbfs - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - dbfs destination, e.g. `dbfs:/my/path` - -::: - - -### jobs._name_.job_clusters.new_cluster.cluster_log_conf.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### jobs._name_.job_clusters.new_cluster.cluster_log_conf.volumes - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### jobs._name_.job_clusters.new_cluster.docker_image - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `basic_auth` - - Map - - See [\_](#jobsnamejob_clustersnew_clusterdocker_imagebasic_auth). - -- - `url` - - String - - URL of the docker image. - -::: - - -### jobs._name_.job_clusters.new_cluster.docker_image.basic_auth - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `password` - - String - - Password of the user - -- - `username` - - String - - Name of the user - -::: - - -### jobs._name_.job_clusters.new_cluster.driver_node_type_flexibility - -**`Type: Map`** - -Flexible node type configuration for the driver node. - - - -:::list-table - -- - 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. - -::: - - -### jobs._name_.job_clusters.new_cluster.gcp_attributes - -**`Type: Map`** - -Attributes related to clusters running on Google Cloud Platform. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - This field determines whether the instance pool will contain preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. - -- - `boot_disk_size` - - Integer - - Boot disk size in GB - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `google_service_account` - - String - - If provided, the cluster will impersonate the google service account when accessing gcloud services (like GCS). The google service account must have previously been added to the Databricks environment by an account administrator. - -- - `local_ssd_count` - - Integer - - If provided, each node (workers and driver) in the cluster will have this number of local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP documentation](https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds) for the supported number of local SSDs for each instance type. - -- - `use_preemptible_executors` - - Boolean - - This field is deprecated - -- - `zone_id` - - String - - Identifier for the availability zone in which the cluster resides. This can be one of the following: - "HA" => High availability, spread nodes across availability zones for a Databricks deployment region [default]. - "AUTO" => Databricks picks an availability zone to schedule the cluster on. - A GCP availability zone => Pick One of the available zones for (machine type + region) from https://cloud.google.com/compute/docs/regions-zones. - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts - -**`Type: Sequence`** - -The configuration for storing init scripts. Any number of destinations can be specified. -The scripts are executed sequentially in the order provided. -If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `abfss` - - Map - - Contains the Azure Data Lake Storage destination path. See [\_](#jobsnamejob_clustersnew_clusterinit_scriptsabfss). - -- - `dbfs` - - Map - - This field is deprecated - -- - `file` - - Map - - destination needs to be provided, e.g. `{ "file": { "destination": "file:/my/local/file.sh" } }`. See [\_](#jobsnamejob_clustersnew_clusterinit_scriptsfile). - -- - `gcs` - - Map - - destination needs to be provided, e.g. `{ "gcs": { "destination": "gs://my-bucket/file.sh" } }`. See [\_](#jobsnamejob_clustersnew_clusterinit_scriptsgcs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#jobsnamejob_clustersnew_clusterinit_scriptss3). - -- - `volumes` - - Map - - destination needs to be provided. e.g. `{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }`. See [\_](#jobsnamejob_clustersnew_clusterinit_scriptsvolumes). - -- - `workspace` - - Map - - destination needs to be provided, e.g. `{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }`. See [\_](#jobsnamejob_clustersnew_clusterinit_scriptsworkspace). - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts.abfss - -**`Type: Map`** - -Contains the Azure Data Lake Storage destination path - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - abfss destination, e.g. `abfss://@.dfs.core.windows.net/`. - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts.file - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "file": { "destination": "file:/my/local/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - local file destination, e.g. `file:/my/local/file.sh` - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts.gcs - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "gcs": { "destination": "gs://my-bucket/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - GCS destination/URI, e.g. `gs://my-bucket/some-prefix` - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts.volumes - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### jobs._name_.job_clusters.new_cluster.init_scripts.workspace - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - wsfs destination, e.g. `workspace:/cluster-init-scripts/setup-datadog.sh` - -::: - - -### jobs._name_.job_clusters.new_cluster.worker_node_type_flexibility - -**`Type: Map`** - -Flexible node type configuration for worker nodes. - - - -:::list-table - -- - 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. - -::: - - -### jobs._name_.job_clusters.new_cluster.workload_type - -**`Type: Map`** - -Cluster Attributes showing for clusters workload types. - - - -:::list-table - -- - Key - - Type - - Description - -- - `clients` - - Map - - defined what type of clients can use the cluster. E.g. Notebooks, Jobs. See [\_](#jobsnamejob_clustersnew_clusterworkload_typeclients). - -::: - - -### jobs._name_.job_clusters.new_cluster.workload_type.clients - -**`Type: Map`** - -defined what type of clients can use the cluster. E.g. Notebooks, Jobs - - - -:::list-table - -- - Key - - Type - - Description - -- - `jobs` - - Boolean - - With jobs set, the cluster can be used for jobs - -- - `notebooks` - - Boolean - - With notebooks set, this cluster can be used for notebooks - -::: - - -### jobs._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### jobs._name_.notification_settings - -**`Type: Map`** - -Optional notification settings that are used when sending notifications to each of the `email_notifications` and `webhook_notifications` for this job. - - - -:::list-table - -- - Key - - Type - - Description - -- - `no_alert_for_canceled_runs` - - Boolean - - If true, do not send notifications to recipients specified in `on_failure` if the run is canceled. - -- - `no_alert_for_skipped_runs` - - Boolean - - If true, do not send notifications to recipients specified in `on_failure` if the run is skipped. - -::: - - -### jobs._name_.parameters - -**`Type: Sequence`** - -Job-level parameter definitions - - - -:::list-table - -- - Key - - Type - - Description - -- - `default` - - String - - Default value of the parameter. - -- - `name` - - String - - The name of the defined parameter. May only contain alphanumeric characters, `_`, `-`, and `.` - -::: - - -### jobs._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### jobs._name_.queue - -**`Type: Map`** - -The queue settings of the job. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - If true, enable queueing for the job. This is a required field. - -::: - - -### jobs._name_.run_as - -**`Type: Map`** - -Write-only setting. Specifies the user or service principal that the job runs as. If not specified, the job runs as the user who created the job. - -Either `user_name` or `service_principal_name` should be specified. If not, an error is thrown. - - - -:::list-table - -- - Key - - Type - - Description - -- - `service_principal_name` - - String - - The application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - -- - `user_name` - - String - - The email of an active workspace user. Non-admin users can only set this field to their own email. - -::: - - -### jobs._name_.schedule - -**`Type: 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`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `pause_status` - - String - - Indicate whether this schedule is paused or not. - -- - `quartz_cron_expression` - - String - - A Cron expression using Quartz syntax that describes the schedule for a job. See [Cron Trigger](http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) for details. This field is required. - -- - `timezone_id` - - String - - A Java timezone ID. The schedule for a job is resolved with respect to this timezone. See [Java TimeZone](https://docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html) for details. This field is required. - -::: - - -### jobs._name_.tasks - -**`Type: Sequence`** - -A list of task specifications to be executed by this job. -It supports up to 1000 elements in write endpoints (:method:jobs/create, :method:jobs/reset, :method:jobs/update, :method:jobs/submit). -Read endpoints return only 100 tasks. If more than 100 tasks are available, you can paginate through them using :method:jobs/get. Use the `next_page_token` field at the object root to determine if more results are available. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert_task` - - Map - - The task evaluates a Databricks alert and sends notifications to subscribers when the `alert_task` field is present. See [\_](#jobsnametasksalert_task). - -- - `clean_rooms_notebook_task` - - Map - - The task runs a [clean rooms](https://docs.databricks.com/clean-rooms/index.html) notebook when the `clean_rooms_notebook_task` field is present. See [\_](#jobsnametasksclean_rooms_notebook_task). - -- - `compute` - - Map - - Task level compute configuration. See [\_](#jobsnametaskscompute). - -- - `condition_task` - - Map - - The task evaluates a condition that can be used to control the execution of other tasks when the `condition_task` field is present. The condition task does not require a cluster to execute and does not support retries or notifications. See [\_](#jobsnametaskscondition_task). - -- - `dashboard_task` - - Map - - The task refreshes a dashboard and sends a snapshot to subscribers. See [\_](#jobsnametasksdashboard_task). - -- - `dbt_task` - - Map - - The task runs one or more dbt commands when the `dbt_task` field is present. The dbt task requires both Databricks SQL and the ability to use a serverless or a pro SQL warehouse. See [\_](#jobsnametasksdbt_task). - -- - `depends_on` - - Sequence - - An optional array of objects specifying the dependency graph of the task. All tasks specified in this field must complete before executing this task. The task will run only if the `run_if` condition is true. The key is `task_key`, and the value is the name assigned to the dependent task. See [\_](#jobsnametasksdepends_on). - -- - `description` - - String - - An optional description for this task. - -- - `disable_auto_optimization` - - Boolean - - An option to disable auto optimization in serverless - -- - `disabled` - - Boolean - - An optional flag to disable the task. If set to true, the task will not run even if it is part of a job. - -- - `email_notifications` - - Map - - An optional set of email addresses that is notified when runs of this task begin or complete as well as when this task is deleted. The default behavior is to not send any emails. See [\_](#jobsnametasksemail_notifications). - -- - `environment_key` - - String - - The key that references an environment spec in a job. This field is required for Python script, Python wheel and dbt tasks when using serverless compute. - -- - `existing_cluster_id` - - String - - If existing_cluster_id, the ID of an existing cluster that is used for all runs. When running jobs or tasks on an existing cluster, you may need to manually restart the cluster if it stops responding. We suggest running jobs and tasks on new clusters for greater reliability - -- - `for_each_task` - - Map - - The task executes a nested task for every input provided when the `for_each_task` field is present. See [\_](#jobsnametasksfor_each_task). - -- - `health` - - Map - - An optional set of health rules that can be defined for this job. See [\_](#jobsnametaskshealth). - -- - `job_cluster_key` - - String - - If job_cluster_key, this task is executed reusing the cluster specified in `job.settings.job_clusters`. - -- - `libraries` - - Sequence - - An optional list of libraries to be installed on the cluster. The default value is an empty list. See [\_](#jobsnametaskslibraries). - -- - `max_retries` - - Integer - - An optional maximum number of times to retry an unsuccessful run. A run is considered to be unsuccessful if it completes with the `FAILED` result_state or `INTERNAL_ERROR` `life_cycle_state`. The value `-1` means to retry indefinitely and the value `0` means to never retry. - -- - `min_retry_interval_millis` - - Integer - - An optional minimal interval in milliseconds between the start of the failed run and the subsequent retry run. The default behavior is that unsuccessful runs are immediately retried. - -- - `new_cluster` - - Map - - If new_cluster, a description of a new cluster that is created for each run. See [\_](#jobsnametasksnew_cluster). - -- - `notebook_task` - - Map - - The task runs a notebook when the `notebook_task` field is present. See [\_](#jobsnametasksnotebook_task). - -- - `notification_settings` - - Map - - Optional notification settings that are used when sending notifications to each of the `email_notifications` and `webhook_notifications` for this task. See [\_](#jobsnametasksnotification_settings). - -- - `pipeline_task` - - Map - - The task triggers a pipeline update when the `pipeline_task` field is present. Only pipelines configured to use triggered more are supported. See [\_](#jobsnametaskspipeline_task). - -- - `power_bi_task` - - Map - - The task triggers a Power BI semantic model update when the `power_bi_task` field is present. See [\_](#jobsnametaskspower_bi_task). - -- - `python_wheel_task` - - Map - - The task runs a Python wheel when the `python_wheel_task` field is present. See [\_](#jobsnametaskspython_wheel_task). - -- - `retry_on_timeout` - - Boolean - - An optional policy to specify whether to retry a job when it times out. The default behavior is to not retry on timeout. - -- - `run_if` - - String - - An optional value specifying the condition determining whether the task is run once its dependencies have been completed. * `ALL_SUCCESS`: All dependencies have executed and succeeded * `AT_LEAST_ONE_SUCCESS`: At least one dependency has succeeded * `NONE_FAILED`: None of the dependencies have failed and at least one was executed * `ALL_DONE`: All dependencies have been completed * `AT_LEAST_ONE_FAILED`: At least one dependency failed * `ALL_FAILED`: ALl dependencies have failed - -- - `run_job_task` - - Map - - The task triggers another job when the `run_job_task` field is present. See [\_](#jobsnametasksrun_job_task). - -- - `spark_jar_task` - - Map - - The task runs a JAR when the `spark_jar_task` field is present. See [\_](#jobsnametasksspark_jar_task). - -- - `spark_python_task` - - Map - - The task runs a Python file when the `spark_python_task` field is present. See [\_](#jobsnametasksspark_python_task). - -- - `spark_submit_task` - - Map - - This field is deprecated - -- - `sql_task` - - Map - - The task runs a SQL query or file, or it refreshes a SQL alert or a legacy SQL dashboard when the `sql_task` field is present. See [\_](#jobsnametaskssql_task). - -- - `task_key` - - String - - A unique name for the task. This field is used to refer to this task from other tasks. This field is required and must be unique within its parent job. On Update or Reset, this field is used to reference the tasks to be updated or reset. - -- - `timeout_seconds` - - Integer - - An optional timeout applied to each run of this job task. A value of `0` means no timeout. - -- - `webhook_notifications` - - Map - - A collection of system notification IDs to notify when runs of this task begin or complete. The default behavior is to not send any system notifications. See [\_](#jobsnametaskswebhook_notifications). - -::: - - -### jobs._name_.tasks.alert_task - -**`Type: Map`** - -The task evaluates a Databricks alert and sends notifications to subscribers -when the `alert_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert_id` - - String - - The alert_id is the canonical identifier of the alert. - -- - `subscribers` - - Sequence - - The subscribers receive alert evaluation result notifications after the alert task is completed. The number of subscriptions is limited to 100. See [\_](#jobsnametasksalert_tasksubscribers). - -- - `warehouse_id` - - String - - The warehouse_id identifies the warehouse settings used by the alert task. - -- - `workspace_path` - - String - - The workspace_path is the path to the alert file in the workspace. The path: * must start with "/Workspace" * must be a normalized path. User has to select only one of alert_id or workspace_path to identify the alert. - -::: - - -### jobs._name_.tasks.alert_task.subscribers - -**`Type: Sequence`** - -The subscribers receive alert evaluation result notifications after the alert task is completed. -The number of subscriptions is limited to 100. - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination_id` - - String - - - -- - `user_name` - - String - - A valid workspace email address. - -::: - - -### jobs._name_.tasks.clean_rooms_notebook_task - -**`Type: Map`** - -The task runs a [clean rooms](https://docs.databricks.com/clean-rooms/index.html) notebook -when the `clean_rooms_notebook_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `clean_room_name` - - String - - The clean room that the notebook belongs to. - -- - `etag` - - String - - Checksum to validate the freshness of the notebook resource (i.e. the notebook being run is the latest version). It can be fetched by calling the :method:cleanroomassets/get API. - -- - `notebook_base_parameters` - - Map - - Base parameters to be used for the clean room notebook job. - -- - `notebook_name` - - String - - Name of the notebook being run. - -::: - - -### jobs._name_.tasks.compute - -**`Type: Map`** - -Task level compute configuration. - - - -:::list-table - -- - Key - - Type - - Description - -- - `hardware_accelerator` - - String - - Hardware accelerator configuration for Serverless GPU workloads. - -::: - - -### jobs._name_.tasks.condition_task - -**`Type: Map`** - -The task evaluates a condition that can be used to control the execution of other tasks when the `condition_task` field is present. -The condition task does not require a cluster to execute and does not support retries or notifications. - - - -:::list-table - -- - Key - - Type - - Description - -- - `left` - - String - - The left operand of the condition task. Can be either a string value or a job state or parameter reference. - -- - `op` - - String - - * `EQUAL_TO`, `NOT_EQUAL` operators perform string comparison of their operands. This means that `“12.0” == “12”` will evaluate to `false`. * `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`, `LESS_THAN`, `LESS_THAN_OR_EQUAL` operators perform numeric comparison of their operands. `“12.0” >= “12”` will evaluate to `true`, `“10.0” >= “12”` will evaluate to `false`. The boolean comparison to task values can be implemented with operators `EQUAL_TO`, `NOT_EQUAL`. If a task value was set to a boolean value, it will be serialized to `“true”` or `“false”` for the comparison. - -- - `right` - - String - - The right operand of the condition task. Can be either a string value or a job state or parameter reference. - -::: - - -### jobs._name_.tasks.dashboard_task - -**`Type: Map`** - -The task refreshes a dashboard and sends a snapshot to subscribers. - - - -:::list-table - -- - Key - - Type - - Description - -- - `dashboard_id` - - String - - - -- - `subscription` - - Map - - See [\_](#jobsnametasksdashboard_tasksubscription). - -- - `warehouse_id` - - String - - Optional: The warehouse id to execute the dashboard with for the schedule. If not specified, the default warehouse of the dashboard will be used. - -::: - - -### jobs._name_.tasks.dashboard_task.subscription - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `custom_subject` - - String - - Optional: Allows users to specify a custom subject line on the email sent to subscribers. - -- - `paused` - - Boolean - - When true, the subscription will not send emails. - -- - `subscribers` - - Sequence - - See [\_](#jobsnametasksdashboard_tasksubscriptionsubscribers). - -::: - - -### jobs._name_.tasks.dashboard_task.subscription.subscribers - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination_id` - - String - - - -- - `user_name` - - String - - - -::: - - -### jobs._name_.tasks.dbt_task - -**`Type: Map`** - -The task runs one or more dbt commands when the `dbt_task` field is present. The dbt task requires both Databricks SQL and the ability to use a serverless or a pro SQL warehouse. - - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog` - - String - - Optional name of the catalog to use. The value is the top level in the 3-level namespace of Unity Catalog (catalog / schema / relation). The catalog value can only be specified if a warehouse_id is specified. Requires dbt-databricks >= 1.1.1. - -- - `commands` - - Sequence - - A list of dbt commands to execute. All commands must start with `dbt`. This parameter must not be empty. A maximum of up to 10 commands can be provided. - -- - `profiles_directory` - - String - - Optional (relative) path to the profiles directory. Can only be specified if no warehouse_id is specified. If no warehouse_id is specified and this folder is unset, the root directory is used. - -- - `project_directory` - - String - - Path to the project directory. Optional for Git sourced tasks, in which case if no value is provided, the root of the Git repository is used. - -- - `schema` - - String - - Optional schema to write to. This parameter is only used when a warehouse_id is also provided. If not provided, the `default` schema is used. - -- - `source` - - String - - Optional location type of the project directory. When set to `WORKSPACE`, the project will be retrieved from the local Databricks workspace. When set to `GIT`, the project will be retrieved from a Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: Project is located in Databricks workspace. * `GIT`: Project is located in cloud Git provider. - -- - `warehouse_id` - - String - - ID of the SQL warehouse to connect to. If provided, we automatically generate and provide the profile and connection details to dbt. It can be overridden on a per-command basis by using the `--profiles-dir` command line argument. - -::: - - -### jobs._name_.tasks.depends_on - -**`Type: Sequence`** - -An optional array of objects specifying the dependency graph of the task. All tasks specified in this field must complete before executing this task. The task will run only if the `run_if` condition is true. -The key is `task_key`, and the value is the name assigned to the dependent task. - - - -:::list-table - -- - Key - - Type - - Description - -- - `outcome` - - String - - Can only be specified on condition task dependencies. The outcome of the dependent task that must be met for this task to run. - -- - `task_key` - - String - - The name of the task this task depends on. - -::: - - -### jobs._name_.tasks.email_notifications - -**`Type: Map`** - -An optional set of email addresses that is notified when runs of this task begin or complete as well as when this task is deleted. The default behavior is to not send any emails. - - - -:::list-table - -- - Key - - Type - - Description - -- - `no_alert_for_skipped_runs` - - Boolean - - This field is deprecated - -- - `on_duration_warning_threshold_exceeded` - - Sequence - - A list of email addresses to be notified when the duration of a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. If no rule for the `RUN_DURATION_SECONDS` metric is specified in the `health` field for the job, notifications are not sent. - -- - `on_failure` - - Sequence - - A list of email addresses to be notified when a run unsuccessfully completes. A run is considered to have completed unsuccessfully if it ends with an `INTERNAL_ERROR` `life_cycle_state` or a `FAILED`, or `TIMED_OUT` result_state. If this is not specified on job creation, reset, or update the list is empty, and notifications are not sent. - -- - `on_start` - - Sequence - - A list of email addresses to be notified when a run begins. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent. - -- - `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_success` - - Sequence - - A list of email addresses to be notified when a run successfully completes. A run is considered to have completed successfully if it ends with a `TERMINATED` `life_cycle_state` and a `SUCCESS` result_state. If not specified on job creation, reset, or update, the list is empty, and notifications are not sent. - -::: - - -### jobs._name_.tasks.for_each_task - -**`Type: Map`** - -The task executes a nested task for every input provided when the `for_each_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `concurrency` - - Integer - - An optional maximum allowed number of concurrent runs of the task. Set this value if you want to be able to execute multiple runs of the task concurrently. - -- - `inputs` - - String - - Array for task to iterate on. This can be a JSON string or a reference to an array parameter. - -- - `task` - - Map - - Configuration for the task that will be run for each element in the array - -::: - - -### jobs._name_.tasks.health - -**`Type: Map`** - -An optional set of health rules that can be defined for this job. - - - -:::list-table - -- - Key - - Type - - Description - -- - `rules` - - Sequence - - See [\_](#jobsnametaskshealthrules). - -::: - - -### jobs._name_.tasks.health.rules - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `metric` - - String - - Specifies the health metric that is being evaluated for a particular health rule. * `RUN_DURATION_SECONDS`: Expected total time for a run in seconds. * `STREAMING_BACKLOG_BYTES`: An estimate of the maximum bytes of data waiting to be consumed across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_RECORDS`: An estimate of the maximum offset lag across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_SECONDS`: An estimate of the maximum consumer delay across all streams. This metric is in Public Preview. * `STREAMING_BACKLOG_FILES`: An estimate of the maximum number of outstanding files across all streams. This metric is in Public Preview. - -- - `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. - -::: - - -### jobs._name_.tasks.libraries - -**`Type: Sequence`** - -An optional list of libraries to be installed on the cluster. -The default value is an empty list. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cran` - - Map - - Specification of a CRAN library to be installed as part of the library. See [\_](#jobsnametaskslibrariescran). - -- - `egg` - - String - - This field is deprecated - -- - `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, please 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. - -- - `maven` - - Map - - Specification of a maven library to be installed. For example: `{ "coordinates": "org.jsoup:jsoup:1.7.2" }`. See [\_](#jobsnametaskslibrariesmaven). - -- - `pypi` - - Map - - Specification of a PyPi library to be installed. For example: `{ "package": "simplejson" }`. See [\_](#jobsnametaskslibrariespypi). - -- - `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" }` - -- - `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, please 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. - -::: - - -### jobs._name_.tasks.libraries.cran - -**`Type: Map`** - -Specification of a CRAN library to be installed as part of the library - - - -:::list-table - -- - Key - - Type - - Description - -- - `package` - - String - - The name of the CRAN package to install. - -- - `repo` - - String - - The repository where the package can be found. If not specified, the default CRAN repo is used. - -::: - - -### jobs._name_.tasks.libraries.maven - -**`Type: Map`** - -Specification of a maven library to be installed. For example: -`{ "coordinates": "org.jsoup:jsoup:1.7.2" }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `coordinates` - - String - - Gradle-style maven coordinates. For example: "org.jsoup:jsoup:1.7.2". - -- - `exclusions` - - Sequence - - List of dependences to exclude. For example: `["slf4j:slf4j", "*:hadoop-client"]`. Maven dependency exclusions: https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html. - -- - `repo` - - String - - Maven repo to install the Maven package from. If omitted, both Maven Central Repository and Spark Packages are searched. - -::: - - -### jobs._name_.tasks.libraries.pypi - -**`Type: Map`** - -Specification of a PyPi library to be installed. For example: -`{ "package": "simplejson" }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `package` - - String - - The name of the pypi package to install. An optional exact version specification is also supported. Examples: "simplejson" and "simplejson==3.8.0". - -- - `repo` - - String - - The repository where the package can be found. If not specified, the default pip index is used. - -::: - - -### jobs._name_.tasks.new_cluster - -**`Type: Map`** - -If new_cluster, a description of a new cluster that is created for each run. - - - -:::list-table - -- - 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. Note: autoscaling works best with DB runtime versions 3.0 or later. See [\_](#jobsnametasksnew_clusterautoscale). - -- - `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 10000 minutes. 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 [\_](#jobsnametasksnew_clusteraws_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 [\_](#jobsnametasksnew_clusterazure_attributes). - -- - `cluster_log_conf` - - Map - - The configuration for delivering spark logs to a long-term storage destination. Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every `5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while the destination of executor logs is `$destination/$clusterId/executor`. See [\_](#jobsnametasksnew_clustercluster_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. For job clusters, the cluster name is automatically set based on the job and job run IDs. - -- - `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`. Notes: - Currently, Databricks allows at most 45 custom tags - Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags - -- - `data_security_mode` - - String - - Data security mode decides what data governance model to use when accessing data from a cluster. * `DATA_SECURITY_MODE_AUTO`: Databricks will choose the most appropriate access mode depending on your compute configuration. * `DATA_SECURITY_MODE_STANDARD`: A secure cluster that can be shared by multiple users. Cluster users are fully isolated so that they cannot see each other’s data and credentials. Most data governance features are supported in this mode. But programming languages and cluster features might be limited. * `DATA_SECURITY_MODE_DEDICATED`: A secure cluster that can only be exclusively used by a single user specified in `single_user_name`. Most programming languages, cluster features and data governance features are available in this mode. The following modes are legacy aliases for the above modes: * `USER_ISOLATION`: Legacy alias for `DATA_SECURITY_MODE_STANDARD`. * `SINGLE_USER`: Legacy alias for `DATA_SECURITY_MODE_DEDICATED`. The following modes are deprecated starting with Databricks Runtime 15.0 and will be removed for future Databricks Runtime versions: * `LEGACY_TABLE_ACL`: This mode is for users migrating from legacy Table ACL clusters. * `LEGACY_PASSTHROUGH`: This mode is for users migrating from legacy Passthrough on high concurrency clusters. * `LEGACY_SINGLE_USER`: This mode is for users migrating from legacy Passthrough on standard clusters. * `LEGACY_SINGLE_USER_STANDARD`: This mode provides a way that doesn’t have UC nor passthrough enabled. - -- - `docker_image` - - Map - - See [\_](#jobsnametasksnew_clusterdocker_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 [\_](#jobsnametasksnew_clusterdriver_node_type_flexibility). - -- - `driver_node_type_id` - - String - - The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as `node_type_id` defined above. This field, along with node_type_id, should not be set if virtual_cluster_size is set. If both driver_node_type_id, node_type_id, and virtual_cluster_size are specified, driver_node_type_id and node_type_id take precedence. - -- - `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. - -- - `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 [\_](#jobsnametasksnew_clustergcp_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. If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. See [\_](#jobsnametasksnew_clusterinit_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` - -- - `kind` - - String - - The kind of compute described by this compute specification. Depending on `kind`, different validations and default values will be applied. Clusters with `kind = CLASSIC_PREVIEW` support the following fields, whereas clusters with no specified `kind` do not. * [is_single_node](/api/workspace/clusters/create#is_single_node) * [use_ml_runtime](/api/workspace/clusters/create#use_ml_runtime) By using the [simple form](https://docs.databricks.com/compute/simple-form.html), your clusters are automatically using `kind = CLASSIC_PREVIEW`. - -- - `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 :method:clusters/listNodeTypes API call. - -- - `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. Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in `spark_info` will gradually increase from 5 to 10 as the new nodes are provisioned. - -- - `policy_id` - - String - - The ID of the cluster policy used to create the cluster if applicable. - -- - `remote_disk_throughput` - - Integer - - If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks. - -- - `runtime_engine` - - String - - - -- - `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. Please note that key-value pair of the form (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the driver and workers. In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the example below. This ensures that all default databricks managed environmental variables are included as well. Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - -- - `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 :method:clusters/sparkVersions API call. - -- - `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. Currently only supported for GCP HYPERDISK_BALANCED disks. - -- - `use_ml_runtime` - - Boolean - - This field can only be used when `kind = CLASSIC_PREVIEW`. `effective_spark_version` is determined by `spark_version` (DBR release), this field `use_ml_runtime`, and whether `node_type_id` is gpu node or not. - -- - `worker_node_type_flexibility` - - Map - - Flexible node type configuration for worker nodes. See [\_](#jobsnametasksnew_clusterworker_node_type_flexibility). - -- - `workload_type` - - Map - - Cluster Attributes showing for clusters workload types. See [\_](#jobsnametasksnew_clusterworkload_type). - -::: - - -### jobs._name_.tasks.new_cluster.autoscale - -**`Type: Map`** - -Parameters needed in order to automatically scale clusters up and down based on load. -Note: autoscaling works best with DB runtime versions 3.0 or later. - - - -:::list-table - -- - Key - - Type - - Description - -- - `max_workers` - - Integer - - The maximum number of workers to which the cluster can scale up when overloaded. Note that `max_workers` must be strictly greater than `min_workers`. - -- - `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. - -::: - - -### jobs._name_.tasks.new_cluster.aws_attributes - -**`Type: Map`** - -Attributes related to clusters running on Amazon Web Services. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `ebs_volume_count` - - Integer - - The number of volumes launched for each instance. Users can choose up to 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster creation will fail. These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc. If EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for scratch storage because heterogenously sized scratch devices can lead to inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance store volumes. Please note that if EBS volumes are specified, then the Spark configuration `spark.local.dir` will be overridden. - -- - `ebs_volume_iops` - - Integer - - If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_size` - - Integer - - The size of each EBS volume (in GiB) launched for each instance. For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this value must be within the range 500 - 4096. - -- - `ebs_volume_throughput` - - Integer - - If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_type` - - String - - All EBS volume types that Databricks supports. See https://aws.amazon.com/ebs/details/ for details. - -- - `first_on_demand` - - Integer - - The first `first_on_demand` nodes of the cluster will be placed on on-demand instances. If this value is greater than 0, the cluster driver node in particular will be placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `instance_profile_arn` - - String - - Nodes for this cluster will only be placed on AWS instances with this instance profile. If ommitted, nodes will be placed on instances without an IAM 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. - -- - `spot_bid_price_percent` - - Integer - - 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 cluster needs a new `r3.xlarge` spot instance, then the bid price is half of the price of on-demand `r3.xlarge` instances. Similarly, if this field is set to 200, the bid price is twice the price of on-demand `r3.xlarge` instances. If not specified, the default value is 100. When spot instances are requested for this cluster, only spot instances whose bid price percentage matches this field will be considered. Note that, for safety, we enforce this field to be no more than 10000. - -- - `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". The provided availability zone must be in the same region as the Databricks deployment. For example, "us-west-2a" is not a valid zone id if the Databricks deployment resides in the "us-east-1" region. This is an optional field at cluster creation, and if not specified, the zone "auto" will be used. If the zone specified is "auto", will try to place cluster in a zone with high availability, and will retry placement in a different AZ if there is not enough capacity. The list of available zones as well as the default value can be found by using the `List Zones` method. - -::: - - -### jobs._name_.tasks.new_cluster.azure_attributes - -**`Type: Map`** - -Attributes related to clusters running on Microsoft Azure. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `log_analytics_info` - - Map - - Defines values necessary to configure and run Azure Log Analytics agent. See [\_](#jobsnametasksnew_clusterazure_attributeslog_analytics_info). - -- - `spot_bid_max_price` - - Any - - The max bid price to be used for Azure spot instances. The Max price for the bid cannot be higher than the on-demand price of the instance. If not specified, the default value is -1, which specifies that the instance cannot be evicted on the basis of price, and only on the basis of availability. Further, the value should > 0 or -1. - -::: - - -### jobs._name_.tasks.new_cluster.azure_attributes.log_analytics_info - -**`Type: Map`** - -Defines values necessary to configure and run Azure Log Analytics agent - - - -:::list-table - -- - Key - - Type - - Description - -- - `log_analytics_primary_key` - - String - - The primary key for the Azure Log Analytics agent configuration - -- - `log_analytics_workspace_id` - - String - - The workspace ID for the Azure Log Analytics agent configuration - -::: - - -### jobs._name_.tasks.new_cluster.cluster_log_conf - -**`Type: Map`** - -The configuration for delivering spark logs to a long-term storage destination. -Three kinds of destinations (DBFS, S3 and Unity Catalog volumes) are supported. Only one destination can be specified -for one cluster. If the conf is given, the logs will be delivered to the destination every -`5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while -the destination of executor logs is `$destination/$clusterId/executor`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `dbfs` - - Map - - destination needs to be provided. e.g. `{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }`. See [\_](#jobsnametasksnew_clustercluster_log_confdbfs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#jobsnametasksnew_clustercluster_log_confs3). - -- - `volumes` - - Map - - destination needs to be provided, e.g. `{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }`. See [\_](#jobsnametasksnew_clustercluster_log_confvolumes). - -::: - - -### jobs._name_.tasks.new_cluster.cluster_log_conf.dbfs - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - dbfs destination, e.g. `dbfs:/my/path` - -::: - - -### jobs._name_.tasks.new_cluster.cluster_log_conf.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### jobs._name_.tasks.new_cluster.cluster_log_conf.volumes - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### jobs._name_.tasks.new_cluster.docker_image - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `basic_auth` - - Map - - See [\_](#jobsnametasksnew_clusterdocker_imagebasic_auth). - -- - `url` - - String - - URL of the docker image. - -::: - - -### jobs._name_.tasks.new_cluster.docker_image.basic_auth - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `password` - - String - - Password of the user - -- - `username` - - String - - Name of the user - -::: - - -### jobs._name_.tasks.new_cluster.driver_node_type_flexibility - -**`Type: Map`** - -Flexible node type configuration for the driver node. - - - -:::list-table - -- - 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. - -::: - - -### jobs._name_.tasks.new_cluster.gcp_attributes - -**`Type: Map`** - -Attributes related to clusters running on Google Cloud Platform. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - This field determines whether the instance pool will contain preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. - -- - `boot_disk_size` - - Integer - - Boot disk size in GB - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `google_service_account` - - String - - If provided, the cluster will impersonate the google service account when accessing gcloud services (like GCS). The google service account must have previously been added to the Databricks environment by an account administrator. - -- - `local_ssd_count` - - Integer - - If provided, each node (workers and driver) in the cluster will have this number of local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP documentation](https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds) for the supported number of local SSDs for each instance type. - -- - `use_preemptible_executors` - - Boolean - - This field is deprecated - -- - `zone_id` - - String - - Identifier for the availability zone in which the cluster resides. This can be one of the following: - "HA" => High availability, spread nodes across availability zones for a Databricks deployment region [default]. - "AUTO" => Databricks picks an availability zone to schedule the cluster on. - A GCP availability zone => Pick One of the available zones for (machine type + region) from https://cloud.google.com/compute/docs/regions-zones. - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts - -**`Type: Sequence`** - -The configuration for storing init scripts. Any number of destinations can be specified. -The scripts are executed sequentially in the order provided. -If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `abfss` - - Map - - Contains the Azure Data Lake Storage destination path. See [\_](#jobsnametasksnew_clusterinit_scriptsabfss). - -- - `dbfs` - - Map - - This field is deprecated - -- - `file` - - Map - - destination needs to be provided, e.g. `{ "file": { "destination": "file:/my/local/file.sh" } }`. See [\_](#jobsnametasksnew_clusterinit_scriptsfile). - -- - `gcs` - - Map - - destination needs to be provided, e.g. `{ "gcs": { "destination": "gs://my-bucket/file.sh" } }`. See [\_](#jobsnametasksnew_clusterinit_scriptsgcs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#jobsnametasksnew_clusterinit_scriptss3). - -- - `volumes` - - Map - - destination needs to be provided. e.g. `{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }`. See [\_](#jobsnametasksnew_clusterinit_scriptsvolumes). - -- - `workspace` - - Map - - destination needs to be provided, e.g. `{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }`. See [\_](#jobsnametasksnew_clusterinit_scriptsworkspace). - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts.abfss - -**`Type: Map`** - -Contains the Azure Data Lake Storage destination path - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - abfss destination, e.g. `abfss://@.dfs.core.windows.net/`. - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts.file - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "file": { "destination": "file:/my/local/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - local file destination, e.g. `file:/my/local/file.sh` - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts.gcs - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "gcs": { "destination": "gs://my-bucket/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - GCS destination/URI, e.g. `gs://my-bucket/some-prefix` - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts.volumes - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### jobs._name_.tasks.new_cluster.init_scripts.workspace - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - wsfs destination, e.g. `workspace:/cluster-init-scripts/setup-datadog.sh` - -::: - - -### jobs._name_.tasks.new_cluster.worker_node_type_flexibility - -**`Type: Map`** - -Flexible node type configuration for worker nodes. - - - -:::list-table - -- - 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. - -::: - - -### jobs._name_.tasks.new_cluster.workload_type - -**`Type: Map`** - -Cluster Attributes showing for clusters workload types. - - - -:::list-table - -- - Key - - Type - - Description - -- - `clients` - - Map - - defined what type of clients can use the cluster. E.g. Notebooks, Jobs. See [\_](#jobsnametasksnew_clusterworkload_typeclients). - -::: - - -### jobs._name_.tasks.new_cluster.workload_type.clients - -**`Type: Map`** - -defined what type of clients can use the cluster. E.g. Notebooks, Jobs - - - -:::list-table - -- - Key - - Type - - Description - -- - `jobs` - - Boolean - - With jobs set, the cluster can be used for jobs - -- - `notebooks` - - Boolean - - With notebooks set, this cluster can be used for notebooks - -::: - - -### jobs._name_.tasks.notebook_task - -**`Type: Map`** - -The task runs a notebook when the `notebook_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `base_parameters` - - Map - - Base parameters to be used for each run of this job. If the run is initiated by a call to :method:jobs/run Now with parameters specified, the two parameters maps are merged. If the same key is specified in `base_parameters` and in `run-now`, the value from `run-now` is used. Use [Task parameter variables](https://docs.databricks.com/jobs.html#parameter-variables) to set parameters containing information about job runs. If the notebook takes a parameter that is not specified in the job’s `base_parameters` or the `run-now` override parameters, the default value from the notebook is used. Retrieve these parameters in a notebook using [dbutils.widgets.get](https://docs.databricks.com/dev-tools/databricks-utils.html#dbutils-widgets). The JSON representation of this field cannot exceed 1MB. - -- - `notebook_path` - - String - - The path of the notebook to be run in the Databricks workspace or remote repository. For notebooks stored in the Databricks workspace, the path must be absolute and begin with a slash. For notebooks stored in a remote repository, the path must be relative. This field is required. - -- - `source` - - String - - Optional location type of the notebook. When set to `WORKSPACE`, the notebook will be retrieved from the local Databricks workspace. When set to `GIT`, the notebook will be retrieved from a Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: Notebook is located in Databricks workspace. * `GIT`: Notebook is located in cloud Git provider. - -- - `warehouse_id` - - String - - Optional `warehouse_id` to run the notebook on a SQL warehouse. Classic SQL warehouses are NOT supported, please use serverless or pro SQL warehouses. Note that SQL warehouses only support SQL cells; if the notebook contains non-SQL cells, the run will fail. - -::: - - -### jobs._name_.tasks.notification_settings - -**`Type: Map`** - -Optional notification settings that are used when sending notifications to each of the `email_notifications` and `webhook_notifications` for this task. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert_on_last_attempt` - - Boolean - - If true, do not send notifications to recipients specified in `on_start` for the retried runs and do not send notifications to recipients specified in `on_failure` until the last retry of the run. - -- - `no_alert_for_canceled_runs` - - Boolean - - If true, do not send notifications to recipients specified in `on_failure` if the run is canceled. - -- - `no_alert_for_skipped_runs` - - Boolean - - If true, do not send notifications to recipients specified in `on_failure` if the run is skipped. - -::: - - -### jobs._name_.tasks.pipeline_task - -**`Type: Map`** - -The task triggers a pipeline update when the `pipeline_task` field is present. Only pipelines configured to use triggered more are supported. - - - -:::list-table - -- - Key - - Type - - Description - -- - `full_refresh` - - Boolean - - If true, triggers a full refresh on the spark declarative pipeline. - -- - `full_refresh_selection` - - Sequence - - A list of tables to update with fullRefresh. - -- - `parameters` - - Map - - Key/value-map of parameters passed to the pipeline execution. Limited to 10k characters in total. - -- - `pipeline_id` - - String - - The full name of the pipeline task to execute. - -- - `refresh_flow_selection` - - Sequence - - Flow names to selectively refresh. These are unioned with other selective refresh options (refresh_selection, full_refresh_selection) to determine the final set of flows to refresh. - -- - `refresh_selection` - - Sequence - - A list of tables to update without fullRefresh. - -- - `reset_checkpoint_selection` - - Sequence - - A list of streaming flows to reset checkpoints without clearing data. - -::: - - -### jobs._name_.tasks.power_bi_task - -**`Type: Map`** - -The task triggers a Power BI semantic model update when the `power_bi_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `connection_resource_name` - - String - - The resource name of the UC connection to authenticate from Databricks to Power BI - -- - `power_bi_model` - - Map - - The semantic model to update. See [\_](#jobsnametaskspower_bi_taskpower_bi_model). - -- - `refresh_after_update` - - Boolean - - Whether the model should be refreshed after the update - -- - `tables` - - Sequence - - The tables to be exported to Power BI. See [\_](#jobsnametaskspower_bi_tasktables). - -- - `warehouse_id` - - String - - The SQL warehouse ID to use as the Power BI data source - -::: - - -### jobs._name_.tasks.power_bi_task.power_bi_model - -**`Type: Map`** - -The semantic model to update - - - -:::list-table - -- - Key - - Type - - Description - -- - `authentication_method` - - String - - How the published Power BI model authenticates to Databricks - -- - `model_name` - - String - - The name of the Power BI model - -- - `overwrite_existing` - - Boolean - - Whether to overwrite existing Power BI models - -- - `storage_mode` - - String - - The default storage mode of the Power BI model - -- - `workspace_name` - - String - - The name of the Power BI workspace of the model - -::: - - -### jobs._name_.tasks.power_bi_task.tables - -**`Type: Sequence`** - -The tables to be exported to Power BI - - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog` - - String - - The catalog name in Databricks - -- - `name` - - String - - The table name in Databricks - -- - `schema` - - String - - The schema name in Databricks - -- - `storage_mode` - - String - - The Power BI storage mode of the table - -::: - - -### jobs._name_.tasks.python_wheel_task - -**`Type: Map`** - -The task runs a Python wheel when the `python_wheel_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `entry_point` - - String - - Named entry point to use, if it does not exist in the metadata of the package it executes the function from the package directly using `$packageName.$entryPoint()` - -- - `named_parameters` - - Map - - Command-line parameters passed to Python wheel task in the form of `["--name=task", "--data=dbfs:/path/to/data.json"]`. Leave it empty if `parameters` is not null. - -- - `package_name` - - String - - Name of the package to execute - -- - `parameters` - - Sequence - - Command-line parameters passed to Python wheel task. Leave it empty if `named_parameters` is not null. - -::: - - -### jobs._name_.tasks.run_job_task - -**`Type: Map`** - -The task triggers another job when the `run_job_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `job_id` - - Integer - - ID of the job to trigger. - -- - `job_parameters` - - Map - - Job-level parameters used to trigger the job. - -- - `pipeline_params` - - Map - - Controls whether the pipeline should perform a full refresh. See [\_](#jobsnametasksrun_job_taskpipeline_params). - -::: - - -### jobs._name_.tasks.run_job_task.pipeline_params - -**`Type: Map`** - -Controls whether the pipeline should perform a full refresh - - - -:::list-table - -- - Key - - Type - - Description - -- - `full_refresh` - - Boolean - - If true, triggers a full refresh on the spark declarative pipeline. - -- - `full_refresh_selection` - - Sequence - - A list of tables to update with fullRefresh. - -- - `refresh_flow_selection` - - Sequence - - Flow names to selectively refresh. These are unioned with other selective refresh options (refresh_selection, full_refresh_selection) to determine the final set of flows to refresh. - -- - `refresh_selection` - - Sequence - - A list of tables to update without fullRefresh. - -- - `reset_checkpoint_selection` - - Sequence - - A list of streaming flows to reset checkpoints without clearing data. - -::: - - -### jobs._name_.tasks.spark_jar_task - -**`Type: Map`** - -The task runs a JAR when the `spark_jar_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `jar_uri` - - String - - This field is deprecated - -- - `main_class_name` - - String - - The full name of the class containing the main method to be executed. This class must be contained in a JAR provided as a library. The code must use `SparkContext.getOrCreate` to obtain a Spark context; otherwise, runs of the job fail. - -- - `parameters` - - Sequence - - Parameters passed to the main method. Use [Task parameter variables](https://docs.databricks.com/jobs.html#parameter-variables) to set parameters containing information about job runs. - -- - `run_as_repl` - - Boolean - - This field is deprecated - -::: - - -### jobs._name_.tasks.spark_python_task - -**`Type: Map`** - -The task runs a Python file when the `spark_python_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `parameters` - - Sequence - - Command line parameters passed to the Python file. Use [Task parameter variables](https://docs.databricks.com/jobs.html#parameter-variables) to set parameters containing information about job runs. - -- - `python_file` - - String - - The Python file to be executed. Cloud file URIs (such as dbfs:/, s3:/, adls:/, gcs:/) and workspace paths are supported. For python files stored in the Databricks workspace, the path must be absolute and begin with `/`. For files stored in a remote repository, the path must be relative. This field is required. - -- - `source` - - String - - Optional location type of the Python file. When set to `WORKSPACE` or not specified, the file will be retrieved from the local Databricks workspace or cloud location (if the `python_file` has a URI format). When set to `GIT`, the Python file will be retrieved from a Git repository defined in `git_source`. * `WORKSPACE`: The Python file is located in a Databricks workspace or at a cloud filesystem URI. * `GIT`: The Python file is located in a remote Git repository. - -::: - - -### jobs._name_.tasks.sql_task - -**`Type: Map`** - -The task runs a SQL query or file, or it refreshes a SQL alert or a legacy SQL dashboard when the `sql_task` field is present. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert` - - Map - - If alert, indicates that this job must refresh a SQL alert. See [\_](#jobsnametaskssql_taskalert). - -- - `dashboard` - - Map - - If dashboard, indicates that this job must refresh a SQL dashboard. See [\_](#jobsnametaskssql_taskdashboard). - -- - `file` - - Map - - If file, indicates that this job runs a SQL file in a remote Git repository. See [\_](#jobsnametaskssql_taskfile). - -- - `parameters` - - Map - - Parameters to be used for each run of this job. The SQL alert task does not support custom parameters. - -- - `query` - - Map - - If query, indicates that this job must execute a SQL query. See [\_](#jobsnametaskssql_taskquery). - -- - `warehouse_id` - - String - - The canonical identifier of the SQL warehouse. Recommended to use with serverless or pro SQL warehouses. Classic SQL warehouses are only supported for SQL alert, dashboard and query tasks and are limited to scheduled single-task jobs. - -::: - - -### jobs._name_.tasks.sql_task.alert - -**`Type: Map`** - -If alert, indicates that this job must refresh a SQL alert. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alert_id` - - String - - The canonical identifier of the SQL alert. - -- - `pause_subscriptions` - - Boolean - - If true, the alert notifications are not sent to subscribers. - -- - `subscriptions` - - Sequence - - If specified, alert notifications are sent to subscribers. See [\_](#jobsnametaskssql_taskalertsubscriptions). - -::: - - -### jobs._name_.tasks.sql_task.alert.subscriptions - -**`Type: Sequence`** - -If specified, alert notifications are sent to subscribers. - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination_id` - - String - - The canonical identifier of the destination to receive email notification. This parameter is mutually exclusive with user_name. You cannot set both destination_id and user_name for subscription notifications. - -- - `user_name` - - String - - The user name to receive the subscription email. This parameter is mutually exclusive with destination_id. You cannot set both destination_id and user_name for subscription notifications. - -::: - - -### jobs._name_.tasks.sql_task.dashboard - -**`Type: Map`** - -If dashboard, indicates that this job must refresh a SQL dashboard. - - - -:::list-table - -- - Key - - Type - - Description - -- - `custom_subject` - - String - - Subject of the email sent to subscribers of this task. - -- - `dashboard_id` - - String - - The canonical identifier of the SQL dashboard. - -- - `pause_subscriptions` - - Boolean - - If true, the dashboard snapshot is not taken, and emails are not sent to subscribers. - -- - `subscriptions` - - Sequence - - If specified, dashboard snapshots are sent to subscriptions. See [\_](#jobsnametaskssql_taskdashboardsubscriptions). - -::: - - -### jobs._name_.tasks.sql_task.dashboard.subscriptions - -**`Type: Sequence`** - -If specified, dashboard snapshots are sent to subscriptions. - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination_id` - - String - - The canonical identifier of the destination to receive email notification. This parameter is mutually exclusive with user_name. You cannot set both destination_id and user_name for subscription notifications. - -- - `user_name` - - String - - The user name to receive the subscription email. This parameter is mutually exclusive with destination_id. You cannot set both destination_id and user_name for subscription notifications. - -::: - - -### jobs._name_.tasks.sql_task.file - -**`Type: Map`** - -If file, indicates that this job runs a SQL file in a remote Git repository. - - - -:::list-table - -- - Key - - Type - - Description - -- - `path` - - String - - Path of the SQL file. Must be relative if the source is a remote Git repository and absolute for workspace paths. - -- - `source` - - String - - Optional location type of the SQL file. When set to `WORKSPACE`, the SQL file will be retrieved from the local Databricks workspace. When set to `GIT`, the SQL file will be retrieved from a Git repository defined in `git_source`. If the value is empty, the task will use `GIT` if `git_source` is defined and `WORKSPACE` otherwise. * `WORKSPACE`: SQL file is located in Databricks workspace. * `GIT`: SQL file is located in cloud Git provider. - -::: - - -### jobs._name_.tasks.sql_task.query - -**`Type: Map`** - -If query, indicates that this job must execute a SQL query. - - - -:::list-table - -- - Key - - Type - - Description - -- - `query_id` - - String - - The canonical identifier of the SQL query. - -::: - - -### jobs._name_.tasks.webhook_notifications - -**`Type: Map`** - -A collection of system notification IDs to notify when runs of this task begin or complete. The default behavior is to not send any system notifications. - - - -:::list-table - -- - Key - - Type - - Description - -- - `on_duration_warning_threshold_exceeded` - - Sequence - - An optional list of system notification IDs to call when the duration of a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. A maximum of 3 destinations can be specified for the `on_duration_warning_threshold_exceeded` property. See [\_](#jobsnametaskswebhook_notificationson_duration_warning_threshold_exceeded). - -- - `on_failure` - - Sequence - - An optional list of system notification IDs to call when the run fails. A maximum of 3 destinations can be specified for the `on_failure` property. See [\_](#jobsnametaskswebhook_notificationson_failure). - -- - `on_start` - - Sequence - - An optional list of system notification IDs to call when the run starts. A maximum of 3 destinations can be specified for the `on_start` property. See [\_](#jobsnametaskswebhook_notificationson_start). - -- - `on_streaming_backlog_exceeded` - - Sequence - - An optional 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 for the `on_streaming_backlog_exceeded` property. See [\_](#jobsnametaskswebhook_notificationson_streaming_backlog_exceeded). - -- - `on_success` - - Sequence - - An optional list of system notification IDs to call when the run completes successfully. A maximum of 3 destinations can be specified for the `on_success` property. See [\_](#jobsnametaskswebhook_notificationson_success). - -::: - - -### jobs._name_.tasks.webhook_notifications.on_duration_warning_threshold_exceeded - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the duration of a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. A maximum of 3 destinations can be specified for the `on_duration_warning_threshold_exceeded` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.tasks.webhook_notifications.on_failure - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the run fails. A maximum of 3 destinations can be specified for the `on_failure` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.tasks.webhook_notifications.on_start - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the run starts. A maximum of 3 destinations can be specified for the `on_start` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.tasks.webhook_notifications.on_streaming_backlog_exceeded - -**`Type: Sequence`** - -An optional 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 for the `on_streaming_backlog_exceeded` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.tasks.webhook_notifications.on_success - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the run completes successfully. A maximum of 3 destinations can be specified for the `on_success` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.trigger - -**`Type: Map`** - -A configuration to trigger a run when certain conditions are met. The default behavior is that the job runs only when triggered by clicking “Run Now” in the Jobs UI or sending an API request to `runNow`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `file_arrival` - - Map - - File arrival trigger settings. See [\_](#jobsnametriggerfile_arrival). - -- - `pause_status` - - String - - Whether this trigger is paused or not. - -- - `periodic` - - Map - - Periodic trigger settings. See [\_](#jobsnametriggerperiodic). - -- - `table_update` - - Map - - See [\_](#jobsnametriggertable_update). - -::: - - -### jobs._name_.trigger.file_arrival - -**`Type: Map`** - -File arrival trigger settings. - - - -:::list-table - -- - Key - - Type - - Description - -- - `min_time_between_triggers_seconds` - - Integer - - If set, the trigger starts a run only after the specified amount of time passed since the last time the trigger fired. The minimum allowed value is 60 seconds - -- - `url` - - String - - URL to be monitored for file arrivals. The path must point to the root or a subpath of the external location. - -- - `wait_after_last_change_seconds` - - Integer - - If set, the trigger starts a run only after no file activity has occurred for the specified amount of time. This makes it possible to wait for a batch of incoming files to arrive before triggering a run. The minimum allowed value is 60 seconds. - -::: - - -### jobs._name_.trigger.periodic - -**`Type: Map`** - -Periodic trigger settings. - - - -:::list-table - -- - Key - - Type - - Description - -- - `interval` - - Integer - - The interval at which the trigger should run. - -- - `unit` - - String - - The unit of time for the interval. - -::: - - -### jobs._name_.trigger.table_update - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `condition` - - String - - The table(s) condition based on which to trigger a job run. - -- - `min_time_between_triggers_seconds` - - Integer - - If set, the trigger starts a run only after the specified amount of time has passed since the last time the trigger fired. The minimum allowed value is 60 seconds. - -- - `table_names` - - Sequence - - A list of tables to monitor for changes. The table name must be in the format `catalog_name.schema_name.table_name`. - -- - `wait_after_last_change_seconds` - - Integer - - If set, the trigger starts a run only after no table updates have occurred for the specified time and can be used to wait for a series of table updates before triggering a run. The minimum allowed value is 60 seconds. - -::: - - -### jobs._name_.webhook_notifications - -**`Type: Map`** - -A collection of system notification IDs to notify when runs of this job begin or complete. - - - -:::list-table - -- - Key - - Type - - Description - -- - `on_duration_warning_threshold_exceeded` - - Sequence - - An optional list of system notification IDs to call when the duration of a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. A maximum of 3 destinations can be specified for the `on_duration_warning_threshold_exceeded` property. See [\_](#jobsnamewebhook_notificationson_duration_warning_threshold_exceeded). - -- - `on_failure` - - Sequence - - An optional list of system notification IDs to call when the run fails. A maximum of 3 destinations can be specified for the `on_failure` property. See [\_](#jobsnamewebhook_notificationson_failure). - -- - `on_start` - - Sequence - - An optional list of system notification IDs to call when the run starts. A maximum of 3 destinations can be specified for the `on_start` property. See [\_](#jobsnamewebhook_notificationson_start). - -- - `on_streaming_backlog_exceeded` - - Sequence - - An optional 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 for the `on_streaming_backlog_exceeded` property. See [\_](#jobsnamewebhook_notificationson_streaming_backlog_exceeded). - -- - `on_success` - - Sequence - - An optional list of system notification IDs to call when the run completes successfully. A maximum of 3 destinations can be specified for the `on_success` property. See [\_](#jobsnamewebhook_notificationson_success). - -::: - - -### jobs._name_.webhook_notifications.on_duration_warning_threshold_exceeded - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the duration of a run exceeds the threshold specified for the `RUN_DURATION_SECONDS` metric in the `health` field. A maximum of 3 destinations can be specified for the `on_duration_warning_threshold_exceeded` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.webhook_notifications.on_failure - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the run fails. A maximum of 3 destinations can be specified for the `on_failure` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.webhook_notifications.on_start - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the run starts. A maximum of 3 destinations can be specified for the `on_start` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.webhook_notifications.on_streaming_backlog_exceeded - -**`Type: Sequence`** - -An optional 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 for the `on_streaming_backlog_exceeded` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -### jobs._name_.webhook_notifications.on_success - -**`Type: Sequence`** - -An optional list of system notification IDs to call when the run completes successfully. A maximum of 3 destinations can be specified for the `on_success` property. - - - -:::list-table - -- - Key - - Type - - Description - -- - `id` - - String - - - -::: - - -## model_serving_endpoints - -**`Type: Map`** - -The model_serving_endpoint resource allows you to define [model serving endpoints](/api/workspace/servingendpoints/create). See [_](/machine-learning/model-serving/manage-serving-endpoints.md). - -```yaml -model_serving_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `ai_gateway` - - Map - - The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only support inference tables. See [\_](#model_serving_endpointsnameai_gateway). - -- - `budget_policy_id` - - String - - The budget policy to be applied to the serving endpoint. - -- - `config` - - Map - - The core config of the serving endpoint. See [\_](#model_serving_endpointsnameconfig). - -- - `description` - - String - - - -- - `email_notifications` - - Map - - Email notification settings. See [\_](#model_serving_endpointsnameemail_notifications). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#model_serving_endpointsnamelifecycle). - -- - `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 - - See [\_](#model_serving_endpointsnamepermissions). - -- - `rate_limits` - - Sequence - - This field is deprecated - -- - `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. See [\_](#model_serving_endpointsnametags). - -::: - - -**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" -``` - -### model_serving_endpoints._name_.ai_gateway - -**`Type: Map`** - -The AI Gateway configuration for the serving endpoint. NOTE: External model, provisioned throughput, and pay-per-token endpoints are fully supported; agent endpoints currently only support inference tables. - - - -:::list-table - -- - 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 [\_](#model_serving_endpointsnameai_gatewayfallback_config). - -- - `guardrails` - - Map - - Configuration for AI Guardrails to prevent unwanted data and unsafe data in requests and responses. See [\_](#model_serving_endpointsnameai_gatewayguardrails). - -- - `inference_table_config` - - Map - - Configuration for payload logging using inference tables. Use these tables to monitor and audit data being sent to and received from model APIs and to improve model quality. See [\_](#model_serving_endpointsnameai_gatewayinference_table_config). - -- - `rate_limits` - - Sequence - - Configuration for rate limits which can be set to limit endpoint traffic. See [\_](#model_serving_endpointsnameai_gatewayrate_limits). - -- - `usage_tracking_config` - - Map - - Configuration to enable usage tracking using system tables. These tables allow you to monitor operational usage on endpoints and their associated costs. See [\_](#model_serving_endpointsnameai_gatewayusage_tracking_config). - -::: - - -### model_serving_endpoints._name_.ai_gateway.fallback_config - -**`Type: 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. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - Whether to enable traffic fallback. When a served entity in the serving endpoint returns specific error codes (e.g. 500), the request will automatically be round-robin attempted with other served entities in the same endpoint, following the order of served entity list, until a successful response is returned. If all attempts fail, return the last response with the error code. - -::: - - -### model_serving_endpoints._name_.ai_gateway.guardrails - -**`Type: Map`** - -Configuration for AI Guardrails to prevent unwanted data and unsafe data in requests and responses. - - - -:::list-table - -- - Key - - Type - - Description - -- - `input` - - Map - - Configuration for input guardrail filters. See [\_](#model_serving_endpointsnameai_gatewayguardrailsinput). - -- - `output` - - Map - - Configuration for output guardrail filters. See [\_](#model_serving_endpointsnameai_gatewayguardrailsoutput). - -::: - - -### model_serving_endpoints._name_.ai_gateway.guardrails.input - -**`Type: Map`** - -Configuration for input guardrail filters. - - - -:::list-table - -- - Key - - Type - - Description - -- - `invalid_keywords` - - Sequence - - This field is deprecated - -- - `pii` - - Map - - Configuration for guardrail PII filter. See [\_](#model_serving_endpointsnameai_gatewayguardrailsinputpii). - -- - `safety` - - Boolean - - Indicates whether the safety filter is enabled. - -- - `valid_topics` - - Sequence - - This field is deprecated - -::: - - -### model_serving_endpoints._name_.ai_gateway.guardrails.input.pii - -**`Type: Map`** - -Configuration for guardrail PII filter. - - - -:::list-table - -- - Key - - Type - - Description - -- - `behavior` - - String - - Configuration for input guardrail filters. - -::: - - -### model_serving_endpoints._name_.ai_gateway.guardrails.output - -**`Type: Map`** - -Configuration for output guardrail filters. - - - -:::list-table - -- - Key - - Type - - Description - -- - `invalid_keywords` - - Sequence - - This field is deprecated - -- - `pii` - - Map - - Configuration for guardrail PII filter. See [\_](#model_serving_endpointsnameai_gatewayguardrailsoutputpii). - -- - `safety` - - Boolean - - Indicates whether the safety filter is enabled. - -- - `valid_topics` - - Sequence - - This field is deprecated - -::: - - -### model_serving_endpoints._name_.ai_gateway.guardrails.output.pii - -**`Type: Map`** - -Configuration for guardrail PII filter. - - - -:::list-table - -- - Key - - Type - - Description - -- - `behavior` - - String - - Configuration for input guardrail filters. - -::: - - -### model_serving_endpoints._name_.ai_gateway.inference_table_config - -**`Type: Map`** - -Configuration for payload logging using inference tables. -Use these tables to monitor and audit data being sent to and received from model APIs and to improve model quality. - - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog_name` - - String - - The name of the catalog in Unity Catalog. Required when enabling inference tables. NOTE: On update, you have to disable inference table first in order to change the catalog name. - -- - `enabled` - - Boolean - - Indicates whether the inference table is enabled. - -- - `schema_name` - - String - - The name of the schema in Unity Catalog. Required when enabling inference tables. NOTE: On update, you have to disable inference table first in order to change the schema name. - -- - `table_name_prefix` - - String - - The prefix of the table in Unity Catalog. NOTE: On update, you have to disable inference table first in order to change the prefix name. - -::: - - -### model_serving_endpoints._name_.ai_gateway.rate_limits - -**`Type: Sequence`** - -Configuration for rate limits which can be set to limit endpoint traffic. - - - -:::list-table - -- - Key - - Type - - Description - -- - `calls` - - Integer - - Used to specify how many calls are allowed for a key within the renewal_period. - -- - `key` - - String - - Key field for a rate limit. Currently, 'user', 'user_group, 'service_principal', and 'endpoint' are supported, with 'endpoint' being the default if not specified. - -- - `principal` - - String - - Principal field for a user, user group, or service principal to apply rate limiting to. Accepts a user email, group name, or service principal application ID. - -- - `renewal_period` - - String - - Renewal period field for a rate limit. Currently, only 'minute' is supported. - -- - `tokens` - - Integer - - Used to specify how many tokens are allowed for a key within the renewal_period. - -::: - - -### model_serving_endpoints._name_.ai_gateway.usage_tracking_config - -**`Type: Map`** - -Configuration to enable usage tracking using system tables. -These tables allow you to monitor operational usage on endpoints and their associated costs. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - Whether to enable usage tracking. - -::: - - -### model_serving_endpoints._name_.config - -**`Type: Map`** - -The core config of the serving endpoint. - - - -:::list-table - -- - Key - - Type - - Description - -- - `auto_capture_config` - - Map - - This field is deprecated - -- - `served_entities` - - Sequence - - The list of served entities under the serving endpoint config. See [\_](#model_serving_endpointsnameconfigserved_entities). - -- - `served_models` - - Sequence - - (Deprecated, use served_entities instead) The list of served models under the serving endpoint config. See [\_](#model_serving_endpointsnameconfigserved_models). - -- - `traffic_config` - - Map - - The traffic configuration associated with the serving endpoint config. See [\_](#model_serving_endpointsnameconfigtraffic_config). - -::: - - -### model_serving_endpoints._name_.config.served_entities - -**`Type: Sequence`** - -The list of served entities under the serving endpoint config. - - - -:::list-table - -- - Key - - Type - - Description - -- - `burst_scaling_enabled` - - Boolean - - Whether burst scaling is enabled. When enabled (default), the endpoint can automatically scale up beyond provisioned capacity to handle traffic spikes. When disabled, the endpoint maintains fixed capacity at provisioned_model_units. - -- - `entity_name` - - String - - The name of the entity to be served. The entity may be a model in the Databricks Model Registry, a model in the Unity Catalog (UC), or a function of type FEATURE_SPEC in the UC. If it is a UC object, the full name of the object should be given in the form of **catalog_name.schema_name.model_name**. - -- - `entity_version` - - String - - - -- - `environment_vars` - - Map - - An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity. Note: this is an experimental feature and subject to change. Example entity environment variables that refer to Databricks secrets: `{"OPENAI_API_KEY": "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": "{{secrets/my_scope2/my_key2}}"}` - -- - `external_model` - - Map - - The external model to be served. NOTE: Only one of external_model and (entity_name, entity_version, workload_size, workload_type, and scale_to_zero_enabled) can be specified with the latter set being used for custom model serving for a Databricks registered model. For an existing endpoint with external_model, it cannot be updated to an endpoint without external_model. If the endpoint is created without external_model, users cannot update it to add external_model later. The task type of all external models within an endpoint must be the same. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_model). - -- - `instance_profile_arn` - - String - - ARN of the instance profile that the served entity uses to access AWS resources. - -- - `max_provisioned_concurrency` - - Integer - - The maximum provisioned concurrency that the endpoint can scale up to. Do not use if workload_size is specified. - -- - `max_provisioned_throughput` - - Integer - - The maximum tokens per second that the endpoint can scale up to. - -- - `min_provisioned_concurrency` - - Integer - - The minimum provisioned concurrency that the endpoint can scale down to. Do not use if workload_size is specified. - -- - `min_provisioned_throughput` - - Integer - - The minimum tokens per second that the endpoint can scale down to. - -- - `name` - - String - - The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores. If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other entities, it defaults to entity_name-entity_version. - -- - `provisioned_model_units` - - Integer - - The number of model units provisioned. - -- - `scale_to_zero_enabled` - - Boolean - - Whether the compute resources for the served entity should scale down to zero. - -- - `workload_size` - - String - - The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency). Additional custom workload sizes can also be used when available in the workspace. If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0. Do not use if min_provisioned_concurrency and max_provisioned_concurrency are specified. - -- - `workload_type` - - String - - The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is "CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others. See the available [GPU types](https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types). - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model - -**`Type: Map`** - -The external model to be served. NOTE: Only one of external_model and (entity_name, entity_version, workload_size, workload_type, and scale_to_zero_enabled) can be specified with the latter set being used for custom model serving for a Databricks registered model. For an existing endpoint with external_model, it cannot be updated to an endpoint without external_model. If the endpoint is created without external_model, users cannot update it to add external_model later. The task type of all external models within an endpoint must be the same. - - - -:::list-table - -- - Key - - Type - - Description - -- - `ai21labs_config` - - Map - - AI21Labs Config. Only required if the provider is 'ai21labs'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelai21labs_config). - -- - `amazon_bedrock_config` - - Map - - Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelamazon_bedrock_config). - -- - `anthropic_config` - - Map - - Anthropic Config. Only required if the provider is 'anthropic'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelanthropic_config). - -- - `cohere_config` - - Map - - Cohere Config. Only required if the provider is 'cohere'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelcohere_config). - -- - `custom_provider_config` - - Map - - Custom Provider Config. Only required if the provider is 'custom'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelcustom_provider_config). - -- - `databricks_model_serving_config` - - Map - - Databricks Model Serving Config. Only required if the provider is 'databricks-model-serving'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modeldatabricks_model_serving_config). - -- - `google_cloud_vertex_ai_config` - - Map - - Google Cloud Vertex AI Config. Only required if the provider is 'google-cloud-vertex-ai'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelgoogle_cloud_vertex_ai_config). - -- - `name` - - String - - The name of the external model. - -- - `openai_config` - - Map - - OpenAI Config. Only required if the provider is 'openai'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelopenai_config). - -- - `palm_config` - - Map - - PaLM Config. Only required if the provider is 'palm'. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelpalm_config). - -- - `provider` - - String - - The name of the provider for the external model. Currently, the supported providers are 'ai21labs', 'anthropic', 'amazon-bedrock', 'cohere', 'databricks-model-serving', 'google-cloud-vertex-ai', 'openai', 'palm', and 'custom'. - -- - `task` - - String - - The task type of the external model. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.ai21labs_config - -**`Type: Map`** - -AI21Labs Config. Only required if the provider is 'ai21labs'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `ai21labs_api_key` - - String - - The Databricks secret key reference for an AI21 Labs API key. If you prefer to paste your API key directly, see `ai21labs_api_key_plaintext`. You must provide an API key using one of the following fields: `ai21labs_api_key` or `ai21labs_api_key_plaintext`. - -- - `ai21labs_api_key_plaintext` - - String - - An AI21 Labs API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `ai21labs_api_key`. You must provide an API key using one of the following fields: `ai21labs_api_key` or `ai21labs_api_key_plaintext`. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.amazon_bedrock_config - -**`Type: Map`** - -Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `aws_access_key_id` - - String - - The Databricks secret key reference for an AWS access key ID with permissions to interact with Bedrock services. If you prefer to paste your API key directly, see `aws_access_key_id_plaintext`. You must provide an API key using one of the following fields: `aws_access_key_id` or `aws_access_key_id_plaintext`. - -- - `aws_access_key_id_plaintext` - - String - - An AWS access key ID with permissions to interact with Bedrock services provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `aws_access_key_id`. You must provide an API key using one of the following fields: `aws_access_key_id` or `aws_access_key_id_plaintext`. - -- - `aws_region` - - String - - The AWS region to use. Bedrock has to be enabled there. - -- - `aws_secret_access_key` - - String - - The Databricks secret key reference for an AWS secret access key paired with the access key ID, with permissions to interact with Bedrock services. If you prefer to paste your API key directly, see `aws_secret_access_key_plaintext`. You must provide an API key using one of the following fields: `aws_secret_access_key` or `aws_secret_access_key_plaintext`. - -- - `aws_secret_access_key_plaintext` - - String - - An AWS secret access key paired with the access key ID, with permissions to interact with Bedrock services provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `aws_secret_access_key`. You must provide an API key using one of the following fields: `aws_secret_access_key` or `aws_secret_access_key_plaintext`. - -- - `bedrock_provider` - - String - - The underlying provider in Amazon Bedrock. Supported values (case insensitive) include: Anthropic, Cohere, AI21Labs, Amazon. - -- - `instance_profile_arn` - - String - - ARN of the instance profile that the external model will use to access AWS resources. You must authenticate using an instance profile or access keys. If you prefer to authenticate using access keys, see `aws_access_key_id`, `aws_access_key_id_plaintext`, `aws_secret_access_key` and `aws_secret_access_key_plaintext`. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.anthropic_config - -**`Type: Map`** - -Anthropic Config. Only required if the provider is 'anthropic'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `anthropic_api_key` - - String - - The Databricks secret key reference for an Anthropic API key. If you prefer to paste your API key directly, see `anthropic_api_key_plaintext`. You must provide an API key using one of the following fields: `anthropic_api_key` or `anthropic_api_key_plaintext`. - -- - `anthropic_api_key_plaintext` - - String - - The Anthropic API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `anthropic_api_key`. You must provide an API key using one of the following fields: `anthropic_api_key` or `anthropic_api_key_plaintext`. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.cohere_config - -**`Type: Map`** - -Cohere Config. Only required if the provider is 'cohere'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cohere_api_base` - - String - - This is an optional field to provide a customized base URL for the Cohere API. If left unspecified, the standard Cohere base URL is used. - -- - `cohere_api_key` - - String - - The Databricks secret key reference for a Cohere API key. If you prefer to paste your API key directly, see `cohere_api_key_plaintext`. You must provide an API key using one of the following fields: `cohere_api_key` or `cohere_api_key_plaintext`. - -- - `cohere_api_key_plaintext` - - String - - The Cohere API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `cohere_api_key`. You must provide an API key using one of the following fields: `cohere_api_key` or `cohere_api_key_plaintext`. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.custom_provider_config - -**`Type: Map`** - -Custom Provider Config. Only required if the provider is 'custom'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `api_key_auth` - - Map - - This is a field to provide API key authentication for the custom provider API. You can only specify one authentication method. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelcustom_provider_configapi_key_auth). - -- - `bearer_token_auth` - - Map - - This is a field to provide bearer token authentication for the custom provider API. You can only specify one authentication method. See [\_](#model_serving_endpointsnameconfigserved_entitiesexternal_modelcustom_provider_configbearer_token_auth). - -- - `custom_provider_url` - - String - - This is a field to provide the URL of the custom provider API. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.custom_provider_config.api_key_auth - -**`Type: Map`** - -This is a field to provide API key authentication for the custom provider API. -You can only specify one authentication method. - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - The name of the API key parameter used for authentication. - -- - `value` - - String - - The Databricks secret key reference for an API Key. If you prefer to paste your token directly, see `value_plaintext`. - -- - `value_plaintext` - - String - - The API Key provided as a plaintext string. If you prefer to reference your token using Databricks Secrets, see `value`. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.custom_provider_config.bearer_token_auth - -**`Type: Map`** - -This is a field to provide bearer token authentication for the custom provider API. -You can only specify one authentication method. - - - -:::list-table - -- - Key - - Type - - Description - -- - `token` - - String - - The Databricks secret key reference for a token. If you prefer to paste your token directly, see `token_plaintext`. - -- - `token_plaintext` - - String - - The token provided as a plaintext string. If you prefer to reference your token using Databricks Secrets, see `token`. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.databricks_model_serving_config - -**`Type: Map`** - -Databricks Model Serving Config. Only required if the provider is 'databricks-model-serving'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `databricks_api_token` - - String - - The Databricks secret key reference for a Databricks API token that corresponds to a user or service principal with Can Query access to the model serving endpoint pointed to by this external model. If you prefer to paste your API key directly, see `databricks_api_token_plaintext`. You must provide an API key using one of the following fields: `databricks_api_token` or `databricks_api_token_plaintext`. - -- - `databricks_api_token_plaintext` - - String - - The Databricks API token that corresponds to a user or service principal with Can Query access to the model serving endpoint pointed to by this external model provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `databricks_api_token`. You must provide an API key using one of the following fields: `databricks_api_token` or `databricks_api_token_plaintext`. - -- - `databricks_workspace_url` - - String - - The URL of the Databricks workspace containing the model serving endpoint pointed to by this external model. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.google_cloud_vertex_ai_config - -**`Type: Map`** - -Google Cloud Vertex AI Config. Only required if the provider is 'google-cloud-vertex-ai'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `private_key` - - String - - The Databricks secret key reference for a private key for the service account which has access to the Google Cloud Vertex AI Service. See [Best practices for managing service account keys]. If you prefer to paste your API key directly, see `private_key_plaintext`. You must provide an API key using one of the following fields: `private_key` or `private_key_plaintext` [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys - -- - `private_key_plaintext` - - String - - The private key for the service account which has access to the Google Cloud Vertex AI Service provided as a plaintext secret. See [Best practices for managing service account keys]. If you prefer to reference your key using Databricks Secrets, see `private_key`. You must provide an API key using one of the following fields: `private_key` or `private_key_plaintext`. [Best practices for managing service account keys]: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys - -- - `project_id` - - String - - This is the Google Cloud project id that the service account is associated with. - -- - `region` - - String - - This is the region for the Google Cloud Vertex AI Service. See [supported regions] for more details. Some models are only available in specific regions. [supported regions]: https://cloud.google.com/vertex-ai/docs/general/locations - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.openai_config - -**`Type: Map`** - -OpenAI Config. Only required if the provider is 'openai'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `microsoft_entra_client_id` - - String - - This field is only required for Azure AD OpenAI and is the Microsoft Entra Client ID. - -- - `microsoft_entra_client_secret` - - String - - The Databricks secret key reference for a client secret used for Microsoft Entra ID authentication. If you prefer to paste your client secret directly, see `microsoft_entra_client_secret_plaintext`. You must provide an API key using one of the following fields: `microsoft_entra_client_secret` or `microsoft_entra_client_secret_plaintext`. - -- - `microsoft_entra_client_secret_plaintext` - - String - - The client secret used for Microsoft Entra ID authentication provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `microsoft_entra_client_secret`. You must provide an API key using one of the following fields: `microsoft_entra_client_secret` or `microsoft_entra_client_secret_plaintext`. - -- - `microsoft_entra_tenant_id` - - String - - This field is only required for Azure AD OpenAI and is the Microsoft Entra Tenant ID. - -- - `openai_api_base` - - String - - This is a field to provide a customized base URl for the OpenAI API. For Azure OpenAI, this field is required, and is the base URL for the Azure OpenAI API service provided by Azure. For other OpenAI API types, this field is optional, and if left unspecified, the standard OpenAI base URL is used. - -- - `openai_api_key` - - String - - The Databricks secret key reference for an OpenAI API key using the OpenAI or Azure service. If you prefer to paste your API key directly, see `openai_api_key_plaintext`. You must provide an API key using one of the following fields: `openai_api_key` or `openai_api_key_plaintext`. - -- - `openai_api_key_plaintext` - - String - - The OpenAI API key using the OpenAI or Azure service provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `openai_api_key`. You must provide an API key using one of the following fields: `openai_api_key` or `openai_api_key_plaintext`. - -- - `openai_api_type` - - String - - This is an optional field to specify the type of OpenAI API to use. For Azure OpenAI, this field is required, and adjust this parameter to represent the preferred security access validation protocol. For access token validation, use azure. For authentication using Azure Active Directory (Azure AD) use, azuread. - -- - `openai_api_version` - - String - - This is an optional field to specify the OpenAI API version. For Azure OpenAI, this field is required, and is the version of the Azure OpenAI service to utilize, specified by a date. - -- - `openai_deployment_name` - - String - - This field is only required for Azure OpenAI and is the name of the deployment resource for the Azure OpenAI service. - -- - `openai_organization` - - String - - This is an optional field to specify the organization in OpenAI or Azure OpenAI. - -::: - - -### model_serving_endpoints._name_.config.served_entities.external_model.palm_config - -**`Type: Map`** - -PaLM Config. Only required if the provider is 'palm'. - - - -:::list-table - -- - Key - - Type - - Description - -- - `palm_api_key` - - String - - The Databricks secret key reference for a PaLM API key. If you prefer to paste your API key directly, see `palm_api_key_plaintext`. You must provide an API key using one of the following fields: `palm_api_key` or `palm_api_key_plaintext`. - -- - `palm_api_key_plaintext` - - String - - The PaLM API key provided as a plaintext string. If you prefer to reference your key using Databricks Secrets, see `palm_api_key`. You must provide an API key using one of the following fields: `palm_api_key` or `palm_api_key_plaintext`. - -::: - - -### model_serving_endpoints._name_.config.served_models - -**`Type: Sequence`** - -(Deprecated, use served_entities instead) The list of served models under the serving endpoint config. - - - -:::list-table - -- - Key - - Type - - Description - -- - `burst_scaling_enabled` - - Boolean - - Whether burst scaling is enabled. When enabled (default), the endpoint can automatically scale up beyond provisioned capacity to handle traffic spikes. When disabled, the endpoint maintains fixed capacity at provisioned_model_units. - -- - `environment_vars` - - Map - - An object containing a set of optional, user-specified environment variable key-value pairs used for serving this entity. Note: this is an experimental feature and subject to change. Example entity environment variables that refer to Databricks secrets: `{"OPENAI_API_KEY": "{{secrets/my_scope/my_key}}", "DATABRICKS_TOKEN": "{{secrets/my_scope2/my_key2}}"}` - -- - `instance_profile_arn` - - String - - ARN of the instance profile that the served entity uses to access AWS resources. - -- - `max_provisioned_concurrency` - - Integer - - The maximum provisioned concurrency that the endpoint can scale up to. Do not use if workload_size is specified. - -- - `max_provisioned_throughput` - - Integer - - The maximum tokens per second that the endpoint can scale up to. - -- - `min_provisioned_concurrency` - - Integer - - The minimum provisioned concurrency that the endpoint can scale down to. Do not use if workload_size is specified. - -- - `min_provisioned_throughput` - - Integer - - The minimum tokens per second that the endpoint can scale down to. - -- - `model_name` - - String - - - -- - `model_version` - - String - - - -- - `name` - - String - - The name of a served entity. It must be unique across an endpoint. A served entity name can consist of alphanumeric characters, dashes, and underscores. If not specified for an external model, this field defaults to external_model.name, with '.' and ':' replaced with '-', and if not specified for other entities, it defaults to entity_name-entity_version. - -- - `provisioned_model_units` - - Integer - - The number of model units provisioned. - -- - `scale_to_zero_enabled` - - Boolean - - Whether the compute resources for the served entity should scale down to zero. - -- - `workload_size` - - String - - The workload size of the served entity. The workload size corresponds to a range of provisioned concurrency that the compute autoscales between. A single unit of provisioned concurrency can process one request at a time. Valid workload sizes are "Small" (4 - 4 provisioned concurrency), "Medium" (8 - 16 provisioned concurrency), and "Large" (16 - 64 provisioned concurrency). Additional custom workload sizes can also be used when available in the workspace. If scale-to-zero is enabled, the lower bound of the provisioned concurrency for each workload size is 0. Do not use if min_provisioned_concurrency and max_provisioned_concurrency are specified. - -- - `workload_type` - - String - - The workload type of the served entity. The workload type selects which type of compute to use in the endpoint. The default value for this parameter is "CPU". For deep learning workloads, GPU acceleration is available by selecting workload types like GPU_SMALL and others. See the available [GPU types](https://docs.databricks.com/en/machine-learning/model-serving/create-manage-serving-endpoints.html#gpu-workload-types). - -::: - - -### model_serving_endpoints._name_.config.traffic_config - -**`Type: Map`** - -The traffic configuration associated with the serving endpoint config. - - - -:::list-table - -- - Key - - Type - - Description - -- - `routes` - - Sequence - - The list of routes that define traffic to each served entity. See [\_](#model_serving_endpointsnameconfigtraffic_configroutes). - -::: - - -### model_serving_endpoints._name_.config.traffic_config.routes - -**`Type: Sequence`** - -The list of routes that define traffic to each served entity. - - - -:::list-table - -- - Key - - Type - - Description - -- - `served_entity_name` - - String - - - -- - `served_model_name` - - String - - The name of the served model this route configures traffic for. - -- - `traffic_percentage` - - Integer - - The percentage of endpoint traffic to send to this route. It must be an integer between 0 and 100 inclusive. - -::: - - -### model_serving_endpoints._name_.email_notifications - -**`Type: Map`** - -Email notification settings. - - - -:::list-table - -- - 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. - -::: - - -### model_serving_endpoints._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### model_serving_endpoints._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### model_serving_endpoints._name_.tags - -**`Type: Sequence`** - -Tags to be attached to the serving endpoint and automatically propagated to billing logs. - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - Key field for a serving endpoint tag. - -- - `value` - - String - - Optional value field for a serving endpoint tag. - -::: - - -## models - -**`Type: Map`** - -The model resource allows you to define [legacy models](/api/workspace/modelregistry/createmodel) in bundles. Databricks recommends you use Unity Catalog [registered models](#registered-model) instead. - -```yaml -models: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `description` - - String - - Optional description for registered model. - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#modelsnamelifecycle). - -- - `name` - - String - - Register models under this name - -- - `permissions` - - Sequence - - See [\_](#modelsnamepermissions). - -- - `tags` - - Sequence - - Additional metadata for registered model. See [\_](#modelsnametags). - -::: - - -### models._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### models._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### models._name_.tags - -**`Type: Sequence`** - -Additional metadata for registered model. - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - The tag key. - -- - `value` - - String - - The tag value. - -::: - - -## pipelines - -**`Type: Map`** - -This resource allows you to create [pipelines](/api/workspace/pipelines/create). For information about pipelines, see [_](/dlt/index.md). For a tutorial that uses the Declarative Automation Bundles template to create a pipeline, see [_](/dev-tools/bundles/pipelines-tutorial.md). - -```yaml -pipelines: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `allow_duplicate_names` - - Boolean - - If false, deployment will fail if name conflicts with that of another pipeline. - -- - `budget_policy_id` - - String - - Budget policy of this pipeline. - -- - `catalog` - - String - - A catalog in Unity Catalog to publish data from this pipeline to. If `target` is specified, tables in this pipeline are published to a `target` schema inside `catalog` (for example, `catalog`.`target`.`table`). If `target` is not specified, no data is published to Unity Catalog. - -- - `channel` - - String - - SDP Release Channel that specifies which version to use. - -- - `clusters` - - Sequence - - Cluster settings for this pipeline deployment. See [\_](#pipelinesnameclusters). - -- - `configuration` - - Map - - String-String configuration for this pipeline execution. - -- - `continuous` - - Boolean - - Whether the pipeline is continuous or triggered. This replaces `trigger`. - -- - `deployment` - - Map - - Deployment type of this pipeline. See [\_](#pipelinesnamedeployment). - -- - `development` - - Boolean - - Whether the pipeline is in Development mode. Defaults to false. - -- - `dry_run` - - Boolean - - - -- - `edition` - - String - - Pipeline product edition. - -- - `environment` - - Map - - Environment specification for this pipeline used to install dependencies. See [\_](#pipelinesnameenvironment). - -- - `event_log` - - Map - - Event log configuration for this pipeline. See [\_](#pipelinesnameevent_log). - -- - `filters` - - Map - - Filters on which Pipeline packages to include in the deployed graph. See [\_](#pipelinesnamefilters). - -- - `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 [\_](#pipelinesnameingestion_definition). - -- - `libraries` - - Sequence - - Libraries or code needed by this deployment. See [\_](#pipelinesnamelibraries). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#pipelinesnamelifecycle). - -- - `name` - - String - - Friendly identifier for this pipeline. - -- - `notifications` - - Sequence - - List of notification settings for this pipeline. See [\_](#pipelinesnamenotifications). - -- - `parameters` - - Map - - - -- - `permissions` - - Sequence - - See [\_](#pipelinesnamepermissions). - -- - `photon` - - Boolean - - Whether Photon is enabled for this pipeline. - -- - `root_path` - - String - - 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. - -- - `run_as` - - Map - - Write-only setting, available only in Create/Update calls. Specifies the user or service principal that the pipeline runs as. If not specified, the pipeline runs as the user who created the pipeline. Only `user_name` or `service_principal_name` can be specified. If both are specified, an error is thrown. See [\_](#pipelinesnamerun_as). - -- - `schema` - - String - - The default schema (database) where tables are read from or published to. - -- - `serverless` - - Boolean - - Whether serverless compute is enabled for this pipeline. - -- - `storage` - - String - - 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. - -- - `target` - - String - - This field is deprecated - -- - `trigger` - - Map - - Use continuous instead - -::: - - -**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 -``` - -### pipelines._name_.clusters - -**`Type: Sequence`** - -Cluster settings for this pipeline deployment. - - - -:::list-table - -- - Key - - Type - - Description - -- - `apply_policy_default_values` - - Boolean - - Note: This field won't be persisted. Only API users will check this field. - -- - `autoscale` - - Map - - Parameters needed in order to automatically scale clusters up and down based on load. Note: autoscaling works best with DB runtime versions 3.0 or later. See [\_](#pipelinesnameclustersautoscale). - -- - `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 [\_](#pipelinesnameclustersaws_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 [\_](#pipelinesnameclustersazure_attributes). - -- - `cluster_log_conf` - - Map - - The configuration for delivering spark logs to a long-term storage destination. Only dbfs destinations are supported. Only one destination can be specified for one cluster. If the conf is given, the logs will be delivered to the destination every `5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while the destination of executor logs is `$destination/$clusterId/executor`. See [\_](#pipelinesnameclusterscluster_log_conf). - -- - `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`. Notes: - Currently, Databricks allows at most 45 custom tags - Clusters can only reuse cloud resources if the resources' tags are a subset of the cluster tags - -- - `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_id` - - String - - The node type of the Spark driver. Note that this field is optional; if unset, the driver node type will be set as the same value as `node_type_id` defined above. - -- - `enable_local_disk_encryption` - - Boolean - - Whether to enable local disk encryption for the cluster. - -- - `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 [\_](#pipelinesnameclustersgcp_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. If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. See [\_](#pipelinesnameclustersinit_scripts). - -- - `instance_pool_id` - - String - - The optional ID of the instance pool to which the cluster belongs. - -- - `label` - - String - - A label for the cluster specification, either `default` to configure the default cluster, or `maintenance` to configure the maintenance cluster. This field is optional. The default value is `default`. - -- - `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 :method:clusters/listNodeTypes API call. - -- - `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. Note: When reading the properties of a cluster, this field reflects the desired number of workers rather than the actual current number of workers. For instance, if a cluster is resized from 5 to 10 workers, this field will immediately be updated to reflect the target size of 10 workers, whereas the workers listed in `spark_info` will gradually increase from 5 to 10 as the new nodes are provisioned. - -- - `policy_id` - - String - - The ID of the cluster policy used to create the cluster if applicable. - -- - `spark_conf` - - Map - - An object containing a set of optional, user-specified Spark configuration key-value pairs. See :method:clusters/create for more details. - -- - `spark_env_vars` - - Map - - An object containing a set of optional, user-specified environment variable key-value pairs. Please note that key-value pair of the form (X,Y) will be exported as is (i.e., `export X='Y'`) while launching the driver and workers. In order to specify an additional set of `SPARK_DAEMON_JAVA_OPTS`, we recommend appending them to `$SPARK_DAEMON_JAVA_OPTS` as shown in the example below. This ensures that all default databricks managed environmental variables are included as well. Example Spark environment variables: `{"SPARK_WORKER_MEMORY": "28000m", "SPARK_LOCAL_DIRS": "/local_disk0"}` or `{"SPARK_DAEMON_JAVA_OPTS": "$SPARK_DAEMON_JAVA_OPTS -Dspark.shuffle.service.enabled=true"}` - -- - `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. - -::: - - -### pipelines._name_.clusters.autoscale - -**`Type: Map`** - -Parameters needed in order to automatically scale clusters up and down based on load. -Note: autoscaling works best with DB runtime versions 3.0 or later. - - - -:::list-table - -- - Key - - Type - - Description - -- - `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`. - -- - `min_workers` - - Integer - - The minimum number of workers the cluster can scale down to when underutilized. It is also the initial number of workers the cluster will have after creation. - -- - `mode` - - String - - Databricks Enhanced Autoscaling optimizes cluster utilization by automatically allocating cluster resources based on workload volume, with minimal impact to the data processing latency of your pipelines. Enhanced Autoscaling is available for `updates` clusters only. The legacy autoscaling feature is used for `maintenance` clusters. - -::: - - -### pipelines._name_.clusters.aws_attributes - -**`Type: Map`** - -Attributes related to clusters running on Amazon Web Services. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `ebs_volume_count` - - Integer - - The number of volumes launched for each instance. Users can choose up to 10 volumes. This feature is only enabled for supported node types. Legacy node types cannot specify custom EBS volumes. For node types with no instance store, at least one EBS volume needs to be specified; otherwise, cluster creation will fail. These EBS volumes will be mounted at `/ebs0`, `/ebs1`, and etc. Instance store volumes will be mounted at `/local_disk0`, `/local_disk1`, and etc. If EBS volumes are attached, Databricks will configure Spark to use only the EBS volumes for scratch storage because heterogenously sized scratch devices can lead to inefficient disk utilization. If no EBS volumes are attached, Databricks will configure Spark to use instance store volumes. Please note that if EBS volumes are specified, then the Spark configuration `spark.local.dir` will be overridden. - -- - `ebs_volume_iops` - - Integer - - If using gp3 volumes, what IOPS to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_size` - - Integer - - The size of each EBS volume (in GiB) launched for each instance. For general purpose SSD, this value must be within the range 100 - 4096. For throughput optimized HDD, this value must be within the range 500 - 4096. - -- - `ebs_volume_throughput` - - Integer - - If using gp3 volumes, what throughput to use for the disk. If this is not set, the maximum performance of a gp2 volume with the same volume size will be used. - -- - `ebs_volume_type` - - String - - All EBS volume types that Databricks supports. See https://aws.amazon.com/ebs/details/ for details. - -- - `first_on_demand` - - Integer - - The first `first_on_demand` nodes of the cluster will be placed on on-demand instances. If this value is greater than 0, the cluster driver node in particular will be placed on an on-demand instance. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `instance_profile_arn` - - String - - Nodes for this cluster will only be placed on AWS instances with this instance profile. If ommitted, nodes will be placed on instances without an IAM 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. - -- - `spot_bid_price_percent` - - Integer - - 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 cluster needs a new `r3.xlarge` spot instance, then the bid price is half of the price of on-demand `r3.xlarge` instances. Similarly, if this field is set to 200, the bid price is twice the price of on-demand `r3.xlarge` instances. If not specified, the default value is 100. When spot instances are requested for this cluster, only spot instances whose bid price percentage matches this field will be considered. Note that, for safety, we enforce this field to be no more than 10000. - -- - `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". The provided availability zone must be in the same region as the Databricks deployment. For example, "us-west-2a" is not a valid zone id if the Databricks deployment resides in the "us-east-1" region. This is an optional field at cluster creation, and if not specified, the zone "auto" will be used. If the zone specified is "auto", will try to place cluster in a zone with high availability, and will retry placement in a different AZ if there is not enough capacity. The list of available zones as well as the default value can be found by using the `List Zones` method. - -::: - - -### pipelines._name_.clusters.azure_attributes - -**`Type: Map`** - -Attributes related to clusters running on Microsoft Azure. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - Availability type used for all subsequent nodes past the `first_on_demand` ones. Note: If `first_on_demand` is zero, this availability type will be used for the entire cluster. - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `log_analytics_info` - - Map - - Defines values necessary to configure and run Azure Log Analytics agent. See [\_](#pipelinesnameclustersazure_attributeslog_analytics_info). - -- - `spot_bid_max_price` - - Any - - The max bid price to be used for Azure spot instances. The Max price for the bid cannot be higher than the on-demand price of the instance. If not specified, the default value is -1, which specifies that the instance cannot be evicted on the basis of price, and only on the basis of availability. Further, the value should > 0 or -1. - -::: - - -### pipelines._name_.clusters.azure_attributes.log_analytics_info - -**`Type: Map`** - -Defines values necessary to configure and run Azure Log Analytics agent - - - -:::list-table - -- - Key - - Type - - Description - -- - `log_analytics_primary_key` - - String - - The primary key for the Azure Log Analytics agent configuration - -- - `log_analytics_workspace_id` - - String - - The workspace ID for the Azure Log Analytics agent configuration - -::: - - -### pipelines._name_.clusters.cluster_log_conf - -**`Type: Map`** - -The configuration for delivering spark logs to a long-term storage destination. -Only dbfs destinations are supported. Only one destination can be specified -for one cluster. If the conf is given, the logs will be delivered to the destination every -`5 mins`. The destination of driver logs is `$destination/$clusterId/driver`, while -the destination of executor logs is `$destination/$clusterId/executor`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `dbfs` - - Map - - destination needs to be provided. e.g. `{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }`. See [\_](#pipelinesnameclusterscluster_log_confdbfs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#pipelinesnameclusterscluster_log_confs3). - -- - `volumes` - - Map - - destination needs to be provided, e.g. `{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }`. See [\_](#pipelinesnameclusterscluster_log_confvolumes). - -::: - - -### pipelines._name_.clusters.cluster_log_conf.dbfs - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - dbfs destination, e.g. `dbfs:/my/path` - -::: - - -### pipelines._name_.clusters.cluster_log_conf.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ "s3": { "destination" : "s3://cluster_log_bucket/prefix", "region" : "us-west-2" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### pipelines._name_.clusters.cluster_log_conf.volumes - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### pipelines._name_.clusters.gcp_attributes - -**`Type: Map`** - -Attributes related to clusters running on Google Cloud Platform. -If not specified at cluster creation, a set of default values will be used. - - - -:::list-table - -- - Key - - Type - - Description - -- - `availability` - - String - - This field determines whether the instance pool will contain preemptible VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. - -- - `boot_disk_size` - - Integer - - Boot disk size in GB - -- - `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. If this value is greater than or equal to the current cluster size, all nodes will be placed on on-demand instances. If this value is less than the current cluster size, `first_on_demand` nodes will be placed on on-demand instances and the remainder will be placed on `availability` instances. Note that this value does not affect cluster size and cannot currently be mutated over the lifetime of a cluster. - -- - `google_service_account` - - String - - If provided, the cluster will impersonate the google service account when accessing gcloud services (like GCS). The google service account must have previously been added to the Databricks environment by an account administrator. - -- - `local_ssd_count` - - Integer - - If provided, each node (workers and driver) in the cluster will have this number of local SSDs attached. Each local SSD is 375GB in size. Refer to [GCP documentation](https://cloud.google.com/compute/docs/disks/local-ssd#choose_number_local_ssds) for the supported number of local SSDs for each instance type. - -- - `use_preemptible_executors` - - Boolean - - This field is deprecated - -- - `zone_id` - - String - - Identifier for the availability zone in which the cluster resides. This can be one of the following: - "HA" => High availability, spread nodes across availability zones for a Databricks deployment region [default]. - "AUTO" => Databricks picks an availability zone to schedule the cluster on. - A GCP availability zone => Pick One of the available zones for (machine type + region) from https://cloud.google.com/compute/docs/regions-zones. - -::: - - -### pipelines._name_.clusters.init_scripts - -**`Type: Sequence`** - -The configuration for storing init scripts. Any number of destinations can be specified. The scripts are executed sequentially in the order provided. If `cluster_log_conf` is specified, init script logs are sent to `//init_scripts`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `abfss` - - Map - - Contains the Azure Data Lake Storage destination path. See [\_](#pipelinesnameclustersinit_scriptsabfss). - -- - `dbfs` - - Map - - This field is deprecated - -- - `file` - - Map - - destination needs to be provided, e.g. `{ "file": { "destination": "file:/my/local/file.sh" } }`. See [\_](#pipelinesnameclustersinit_scriptsfile). - -- - `gcs` - - Map - - destination needs to be provided, e.g. `{ "gcs": { "destination": "gs://my-bucket/file.sh" } }`. See [\_](#pipelinesnameclustersinit_scriptsgcs). - -- - `s3` - - Map - - destination and either the region or endpoint need to be provided. e.g. `{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` Cluster iam role is used to access s3, please make sure the cluster iam role in `instance_profile_arn` has permission to write data to the s3 destination. See [\_](#pipelinesnameclustersinit_scriptss3). - -- - `volumes` - - Map - - destination needs to be provided. e.g. `{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }`. See [\_](#pipelinesnameclustersinit_scriptsvolumes). - -- - `workspace` - - Map - - destination needs to be provided, e.g. `{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }`. See [\_](#pipelinesnameclustersinit_scriptsworkspace). - -::: - - -### pipelines._name_.clusters.init_scripts.abfss - -**`Type: Map`** - -Contains the Azure Data Lake Storage destination path - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - abfss destination, e.g. `abfss://@.dfs.core.windows.net/`. - -::: - - -### pipelines._name_.clusters.init_scripts.file - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "file": { "destination": "file:/my/local/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - local file destination, e.g. `file:/my/local/file.sh` - -::: - - -### pipelines._name_.clusters.init_scripts.gcs - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "gcs": { "destination": "gs://my-bucket/file.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - GCS destination/URI, e.g. `gs://my-bucket/some-prefix` - -::: - - -### pipelines._name_.clusters.init_scripts.s3 - -**`Type: Map`** - -destination and either the region or endpoint need to be provided. e.g. -`{ \"s3\": { \"destination\": \"s3://cluster_log_bucket/prefix\", \"region\": \"us-west-2\" } }` -Cluster iam role is used to access s3, please make sure the cluster iam role in -`instance_profile_arn` has permission to write data to the s3 destination. - - - -:::list-table - -- - Key - - Type - - Description - -- - `canned_acl` - - String - - (Optional) Set canned access control list for the logs, e.g. `bucket-owner-full-control`. If `canned_cal` is set, please make sure the cluster iam role has `s3:PutObjectAcl` permission on the destination bucket and prefix. The full list of possible canned acl can be found at http://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl. Please also note that by default only the object owner gets full controls. If you are using cross account role for writing data, you may want to set `bucket-owner-full-control` to make bucket owner able to read the logs. - -- - `destination` - - String - - S3 destination, e.g. `s3://my-bucket/some-prefix` Note that logs will be delivered using cluster iam role, please make sure you set cluster iam role and the role has write access to the destination. Please also note that you cannot use AWS keys to deliver logs. - -- - `enable_encryption` - - Boolean - - (Optional) Flag to enable server side encryption, `false` by default. - -- - `encryption_type` - - String - - (Optional) The encryption type, it could be `sse-s3` or `sse-kms`. It will be used only when encryption is enabled and the default type is `sse-s3`. - -- - `endpoint` - - String - - S3 endpoint, e.g. `https://s3-us-west-2.amazonaws.com`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -- - `kms_key` - - String - - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - -- - `region` - - String - - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, endpoint will be used. - -::: - - -### pipelines._name_.clusters.init_scripts.volumes - -**`Type: Map`** - -destination needs to be provided. e.g. -`{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - UC Volumes destination, e.g. `/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` or `dbfs:/Volumes/catalog/schema/vol1/init-scripts/setup-datadog.sh` - -::: - - -### pipelines._name_.clusters.init_scripts.workspace - -**`Type: Map`** - -destination needs to be provided, e.g. -`{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }` - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination` - - String - - wsfs destination, e.g. `workspace:/cluster-init-scripts/setup-datadog.sh` - -::: - - -### pipelines._name_.deployment - -**`Type: Map`** - -Deployment type of this pipeline. - - - -:::list-table - -- - Key - - Type - - Description - -- - `kind` - - String - - The deployment method that manages the pipeline. - -- - `metadata_file_path` - - String - - The path to the file containing metadata about the deployment. - -::: - - -### pipelines._name_.environment - -**`Type: Map`** - -Environment specification for this pipeline used to install dependencies. - - - -:::list-table - -- - Key - - Type - - Description - -- - `dependencies` - - Sequence - - 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/ Allowed dependency could be , , (WSFS or Volumes in Databricks), - -::: - - -### pipelines._name_.event_log - -**`Type: Map`** - -Event log configuration for this pipeline - - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog` - - String - - The UC catalog the event log is published under. - -- - `name` - - String - - The name the event log is published to in UC. - -- - `schema` - - String - - The UC schema the event log is published under. - -::: - - -### pipelines._name_.filters - -**`Type: Map`** - -Filters on which Pipeline packages to include in the deployed graph. - - - -:::list-table - -- - Key - - Type - - Description - -- - `exclude` - - Sequence - - Paths to exclude. - -- - `include` - - Sequence - - Paths to include. - -::: - - -### pipelines._name_.ingestion_definition - -**`Type: Map`** - -The configuration for a managed ingestion pipeline. These settings cannot be used with the 'libraries', 'schema', 'target', or 'catalog' settings. - - - -:::list-table - -- - Key - - Type - - Description - -- - `connection_name` - - String - - The Unity Catalog connection that this ingestion pipeline uses to communicate with the source. This is used with both connectors for applications like Salesforce, Workday, and so on, and also database connectors like Oracle, (connector_type = QUERY_BASED OR connector_type = CDC). If connection name corresponds to database connectors like Oracle, and connector_type is not provided then connector_type defaults to QUERY_BASED. If connector_type is passed as CDC we use Combined Cdc Managed Ingestion pipeline. Under certain conditions, this can be replaced with ingestion_gateway_id to change the connector to Cdc Managed Ingestion Pipeline with Gateway pipeline. - -- - `connector_type` - - String - - (Optional) Connector Type for sources. Ex: CDC, Query Based. - -- - `data_staging_options` - - Map - - (Optional) Location of staged data storage. This is required for migration from Cdc Managed Ingestion Pipeline with Gateway pipeline to Combined Cdc Managed Ingestion Pipeline. If not specified, the volume for staged data will be created in catalog and schema/target specified in the top level pipeline definition. See [\_](#pipelinesnameingestion_definitiondata_staging_options). - -- - `full_refresh_window` - - Map - - (Optional) A window that specifies a set of time ranges for snapshot queries in CDC. See [\_](#pipelinesnameingestion_definitionfull_refresh_window). - -- - `ingest_from_uc_foreign_catalog` - - Boolean - - Immutable. If set to true, the pipeline will ingest tables from the UC foreign catalogs directly without the need to specify a UC connection or ingestion gateway. The `source_catalog` fields in objects of IngestionConfig are interpreted as the UC foreign catalogs to ingest from. - -- - `ingestion_gateway_id` - - String - - Identifier for the gateway that is used by this ingestion pipeline to communicate with the source database. This is used with CDC connectors to databases like SQL Server using a gateway pipeline (connector_type = CDC). Under certain conditions, this can be replaced with connection_name to change the connector to Combined Cdc Managed Ingestion Pipeline. - -- - `objects` - - Sequence - - Required. Settings specifying tables to replicate and the destination for the replicated tables. See [\_](#pipelinesnameingestion_definitionobjects). - -- - `source_configurations` - - Sequence - - Top-level source configurations. See [\_](#pipelinesnameingestion_definitionsource_configurations). - -- - `table_configuration` - - Map - - Configuration settings to control the ingestion of tables. These settings are applied to all tables in the pipeline. See [\_](#pipelinesnameingestion_definitiontable_configuration). - -::: - - -### pipelines._name_.ingestion_definition.data_staging_options - -**`Type: Map`** - -(Optional) Location of staged data storage. This is required for migration from Cdc Managed Ingestion Pipeline -with Gateway pipeline to Combined Cdc Managed Ingestion Pipeline. -If not specified, the volume for staged data will be created in catalog and schema/target specified in the -top level pipeline definition. - - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog_name` - - String - - (Required, Immutable) The name of the catalog for the connector's staging storage location. - -- - `schema_name` - - String - - (Required, Immutable) The name of the schema for the connector's staging storage location. - -- - `volume_name` - - String - - (Optional) The Unity Catalog-compatible name for the storage location. This is the volume to use for the data that is extracted by the connector. Spark Declarative Pipelines system will automatically create the volume under the catalog and schema. For Combined Cdc Managed Ingestion pipelines default name for the volume would be : __databricks_ingestion_gateway_staging_data-$pipelineId - -::: - - -### pipelines._name_.ingestion_definition.full_refresh_window - -**`Type: Map`** - -(Optional) A window that specifies a set of time ranges for snapshot queries in CDC. - - - -:::list-table - -- - Key - - Type - - Description - -- - `days_of_week` - - Sequence - - Days of week in which the window is allowed to happen If not specified all days of the week will be used. - -- - `start_hour` - - Integer - - An integer between 0 and 23 denoting the start hour for the window in the 24-hour day. - -- - `time_zone_id` - - String - - Time zone id of window. See https://docs.databricks.com/sql/language-manual/sql-ref-syntax-aux-conf-mgmt-set-timezone.html for details. If not specified, UTC will be used. - -::: - - -### pipelines._name_.ingestion_definition.full_refresh_window.days_of_week - -**`Type: Sequence`** - -Days of week in which the window is allowed to happen -If not specified all days of the week will be used. - - -### pipelines._name_.ingestion_definition.objects - -**`Type: Sequence`** - -Required. Settings specifying tables to replicate and the destination for the replicated tables. - - - -:::list-table - -- - Key - - Type - - Description - -- - `report` - - Map - - Select a specific source report. See [\_](#pipelinesnameingestion_definitionobjectsreport). - -- - `schema` - - Map - - Select all tables from a specific source schema. See [\_](#pipelinesnameingestion_definitionobjectsschema). - -- - `table` - - Map - - Select a specific source table. See [\_](#pipelinesnameingestion_definitionobjectstable). - -::: - - -### pipelines._name_.ingestion_definition.objects.report - -**`Type: Map`** - -Select a specific source report. - - - -:::list-table - -- - Key - - Type - - Description - -- - `destination_catalog` - - String - - Required. Destination catalog to store table. - -- - `destination_schema` - - String - - Required. Destination schema to store table. - -- - `destination_table` - - String - - Required. Destination table name. The pipeline fails if a table with that name already exists. - -- - `source_url` - - String - - Required. Report URL in the source system. - -- - `table_configuration` - - Map - - Configuration settings to control the ingestion of tables. These settings override the table_configuration defined in the IngestionPipelineDefinition object. See [\_](#pipelinesnameingestion_definitionobjectsreporttable_configuration). - -::: - - -### pipelines._name_.ingestion_definition.objects.report.table_configuration - -**`Type: Map`** - -Configuration settings to control the ingestion of tables. These settings override the table_configuration defined in the IngestionPipelineDefinition object. - - - -:::list-table - -- - Key - - Type - - Description - -- - `auto_full_refresh_policy` - - Map - - (Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy in table configuration will override the above level auto_full_refresh_policy. For example, { "auto_full_refresh_policy": { "enabled": true, "min_interval_hours": 23, } } If unspecified, auto full refresh is disabled. See [\_](#pipelinesnameingestion_definitionobjectsreporttable_configurationauto_full_refresh_policy). - -- - `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 - - The primary key of the table used to apply changes. - -- - `query_based_connector_config` - - Map - - Configurations that are only applicable for query-based ingestion connectors. See [\_](#pipelinesnameingestion_definitionobjectsreporttable_configurationquery_based_connector_config). - -- - `row_filter` - - String - - (Optional, Immutable) The row filter condition to be applied to the table. It must not contain the WHERE keyword, only the actual filter condition. It must be in DBSQL format. - -- - `scd_type` - - String - - The SCD type to use to ingest the table. - -- - `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. - -::: - - -### pipelines._name_.ingestion_definition.objects.report.table_configuration.auto_full_refresh_policy - -**`Type: Map`** - -(Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try -to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy -in table configuration will override the above level auto_full_refresh_policy. -For example, -{ -"auto_full_refresh_policy": { -"enabled": true, -"min_interval_hours": 23, -} -} -If unspecified, auto full refresh is disabled. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - (Required, Mutable) Whether to enable auto full refresh or not. - -- - `min_interval_hours` - - Integer - - (Optional, Mutable) Specify the minimum interval in hours between the timestamp at which a table was last full refreshed and the current timestamp for triggering auto full If unspecified and autoFullRefresh is enabled then by default min_interval_hours is 24 hours. - -::: - - -### pipelines._name_.ingestion_definition.objects.report.table_configuration.query_based_connector_config - -**`Type: Map`** - -Configurations that are only applicable for query-based ingestion connectors. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cursor_columns` - - Sequence - - The names of the monotonically increasing columns in the source table that are used to enable the table to be read and ingested incrementally through structured streaming. The columns are allowed to have repeated values but have to be non-decreasing. If the source data is merged into the destination (e.g., using SCD Type 1 or Type 2), these columns will implicitly define the `sequence_by` behavior. You can still explicitly set `sequence_by` to override this default. - -- - `deletion_condition` - - String - - Specifies a SQL WHERE condition that specifies that the source row has been deleted. This is sometimes referred to as "soft-deletes". For example: "Operation = 'DELETE'" or "is_deleted = true". This field is orthogonal to `hard_deletion_sync_interval_in_seconds`, one for soft-deletes and the other for hard-deletes. See also the hard_deletion_sync_min_interval_in_seconds field for handling of "hard deletes" where the source rows are physically removed from the table. - -- - `hard_deletion_sync_min_interval_in_seconds` - - Integer - - Specifies the minimum interval (in seconds) between snapshots on primary keys for detecting and synchronizing hard deletions—i.e., rows that have been physically removed from the source table. This interval acts as a lower bound. If ingestion runs less frequently than this value, hard deletion synchronization will align with the actual ingestion frequency instead of happening more often. If not set, hard deletion synchronization via snapshots is disabled. This field is mutable and can be updated without triggering a full snapshot. - -::: - - -### pipelines._name_.ingestion_definition.objects.schema - -**`Type: Map`** - -Select all tables from a specific source schema. - - - -:::list-table - -- - Key - - Type - - Description - -- - `connector_options` - - Map - - (Optional) Source Specific Connector Options. See [\_](#pipelinesnameingestion_definitionobjectsschemaconnector_options). - -- - `destination_catalog` - - String - - Required. Destination catalog to store tables. - -- - `destination_schema` - - String - - Required. Destination schema to store tables in. Tables with the same name as the source tables are created in this destination schema. The pipeline fails If a table with the same name already exists. - -- - `source_catalog` - - String - - The source catalog name. Might be optional depending on the type of source. - -- - `source_schema` - - String - - Required. Schema name in the source database. - -- - `table_configuration` - - Map - - Configuration settings to control the ingestion of tables. These settings are applied to all tables in this schema and override the table_configuration defined in the IngestionPipelineDefinition object. See [\_](#pipelinesnameingestion_definitionobjectsschematable_configuration). - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.connector_options - -**`Type: Map`** - -(Optional) Source Specific Connector Options - - - -:::list-table - -- - Key - - Type - - Description - -- - `confluence_options` - - Map - - Confluence specific options for ingestion. See [\_](#pipelinesnameingestion_definitionobjectsschemaconnector_optionsconfluence_options). - -- - `jira_options` - - Map - - Jira specific options for ingestion. See [\_](#pipelinesnameingestion_definitionobjectsschemaconnector_optionsjira_options). - -- - `meta_ads_options` - - Map - - Meta Marketing (Meta Ads) specific options for ingestion. See [\_](#pipelinesnameingestion_definitionobjectsschemaconnector_optionsmeta_ads_options). - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.connector_options.confluence_options - -**`Type: Map`** - -Confluence specific options for ingestion - - - -:::list-table - -- - Key - - Type - - Description - -- - `include_confluence_spaces` - - Sequence - - (Optional) Spaces to filter Confluence data on - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.connector_options.jira_options - -**`Type: Map`** - -Jira specific options for ingestion - - - -:::list-table - -- - Key - - Type - - Description - -- - `include_jira_spaces` - - Sequence - - (Optional) Projects to filter Jira data on - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.connector_options.meta_ads_options - -**`Type: Map`** - -Meta Marketing (Meta Ads) specific options for ingestion - - - -:::list-table - -- - Key - - Type - - Description - -- - `action_attribution_windows` - - Sequence - - (Optional) Action attribution windows for insights reporting (e.g. "28d_click", "1d_view") - -- - `action_breakdowns` - - Sequence - - (Optional) Action breakdowns to configure for data aggregation - -- - `action_report_time` - - String - - (Optional) Timing used to report action statistics (impression, conversion, mixed, or lifetime) - -- - `breakdowns` - - Sequence - - (Optional) Breakdowns to configure for data aggregation - -- - `custom_insights_lookback_window` - - Integer - - (Optional) Window in days to revisit data during sync to capture updated conversion data from the API. - -- - `level` - - String - - (Optional) Granularity of data to pull (account, ad, adset, campaign) - -- - `start_date` - - String - - (Optional) Start date in yyyy-MM-dd format (e.g. 2025-01-15). Data added after this date will be ingested - -- - `time_increment` - - String - - (Optional) Value in string by which to aggregate statistics (can take all_days, monthly or number of days) - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.table_configuration - -**`Type: Map`** - -Configuration settings to control the ingestion of tables. These settings are applied to all tables in this schema and override the table_configuration defined in the IngestionPipelineDefinition object. - - - -:::list-table - -- - Key - - Type - - Description - -- - `auto_full_refresh_policy` - - Map - - (Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy in table configuration will override the above level auto_full_refresh_policy. For example, { "auto_full_refresh_policy": { "enabled": true, "min_interval_hours": 23, } } If unspecified, auto full refresh is disabled. See [\_](#pipelinesnameingestion_definitionobjectsschematable_configurationauto_full_refresh_policy). - -- - `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 - - The primary key of the table used to apply changes. - -- - `query_based_connector_config` - - Map - - Configurations that are only applicable for query-based ingestion connectors. See [\_](#pipelinesnameingestion_definitionobjectsschematable_configurationquery_based_connector_config). - -- - `row_filter` - - String - - (Optional, Immutable) The row filter condition to be applied to the table. It must not contain the WHERE keyword, only the actual filter condition. It must be in DBSQL format. - -- - `scd_type` - - String - - The SCD type to use to ingest the table. - -- - `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. - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.table_configuration.auto_full_refresh_policy - -**`Type: Map`** - -(Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try -to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy -in table configuration will override the above level auto_full_refresh_policy. -For example, -{ -"auto_full_refresh_policy": { -"enabled": true, -"min_interval_hours": 23, -} -} -If unspecified, auto full refresh is disabled. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - (Required, Mutable) Whether to enable auto full refresh or not. - -- - `min_interval_hours` - - Integer - - (Optional, Mutable) Specify the minimum interval in hours between the timestamp at which a table was last full refreshed and the current timestamp for triggering auto full If unspecified and autoFullRefresh is enabled then by default min_interval_hours is 24 hours. - -::: - - -### pipelines._name_.ingestion_definition.objects.schema.table_configuration.query_based_connector_config - -**`Type: Map`** - -Configurations that are only applicable for query-based ingestion connectors. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cursor_columns` - - Sequence - - The names of the monotonically increasing columns in the source table that are used to enable the table to be read and ingested incrementally through structured streaming. The columns are allowed to have repeated values but have to be non-decreasing. If the source data is merged into the destination (e.g., using SCD Type 1 or Type 2), these columns will implicitly define the `sequence_by` behavior. You can still explicitly set `sequence_by` to override this default. - -- - `deletion_condition` - - String - - Specifies a SQL WHERE condition that specifies that the source row has been deleted. This is sometimes referred to as "soft-deletes". For example: "Operation = 'DELETE'" or "is_deleted = true". This field is orthogonal to `hard_deletion_sync_interval_in_seconds`, one for soft-deletes and the other for hard-deletes. See also the hard_deletion_sync_min_interval_in_seconds field for handling of "hard deletes" where the source rows are physically removed from the table. - -- - `hard_deletion_sync_min_interval_in_seconds` - - Integer - - Specifies the minimum interval (in seconds) between snapshots on primary keys for detecting and synchronizing hard deletions—i.e., rows that have been physically removed from the source table. This interval acts as a lower bound. If ingestion runs less frequently than this value, hard deletion synchronization will align with the actual ingestion frequency instead of happening more often. If not set, hard deletion synchronization via snapshots is disabled. This field is mutable and can be updated without triggering a full snapshot. - -::: - - -### pipelines._name_.ingestion_definition.objects.table - -**`Type: Map`** - -Select a specific source table. - - - -:::list-table - -- - Key - - Type - - Description - -- - `connector_options` - - Map - - (Optional) Source Specific Connector Options. See [\_](#pipelinesnameingestion_definitionobjectstableconnector_options). - -- - `destination_catalog` - - String - - Required. Destination catalog to store table. - -- - `destination_schema` - - String - - Required. Destination schema to store table. - -- - `destination_table` - - String - - Optional. Destination table name. The pipeline fails if a table with that name already exists. If not set, the source table name is used. - -- - `source_catalog` - - String - - Source catalog name. Might be optional depending on the type of source. - -- - `source_schema` - - String - - Schema name in the source database. Might be optional depending on the type of source. - -- - `source_table` - - String - - Required. Table name in the source database. - -- - `table_configuration` - - Map - - Configuration settings to control the ingestion of tables. These settings override the table_configuration defined in the IngestionPipelineDefinition object and the SchemaSpec. See [\_](#pipelinesnameingestion_definitionobjectstabletable_configuration). - -::: - - -### pipelines._name_.ingestion_definition.objects.table.connector_options - -**`Type: Map`** - -(Optional) Source Specific Connector Options - - - -:::list-table - -- - Key - - Type - - Description - -- - `confluence_options` - - Map - - Confluence specific options for ingestion. See [\_](#pipelinesnameingestion_definitionobjectstableconnector_optionsconfluence_options). - -- - `jira_options` - - Map - - Jira specific options for ingestion. See [\_](#pipelinesnameingestion_definitionobjectstableconnector_optionsjira_options). - -- - `meta_ads_options` - - Map - - Meta Marketing (Meta Ads) specific options for ingestion. See [\_](#pipelinesnameingestion_definitionobjectstableconnector_optionsmeta_ads_options). - -::: - - -### pipelines._name_.ingestion_definition.objects.table.connector_options.confluence_options - -**`Type: Map`** - -Confluence specific options for ingestion - - - -:::list-table - -- - Key - - Type - - Description - -- - `include_confluence_spaces` - - Sequence - - (Optional) Spaces to filter Confluence data on - -::: - - -### pipelines._name_.ingestion_definition.objects.table.connector_options.jira_options - -**`Type: Map`** - -Jira specific options for ingestion - - - -:::list-table - -- - Key - - Type - - Description - -- - `include_jira_spaces` - - Sequence - - (Optional) Projects to filter Jira data on - -::: - - -### pipelines._name_.ingestion_definition.objects.table.connector_options.meta_ads_options - -**`Type: Map`** - -Meta Marketing (Meta Ads) specific options for ingestion - - - -:::list-table - -- - Key - - Type - - Description - -- - `action_attribution_windows` - - Sequence - - (Optional) Action attribution windows for insights reporting (e.g. "28d_click", "1d_view") - -- - `action_breakdowns` - - Sequence - - (Optional) Action breakdowns to configure for data aggregation - -- - `action_report_time` - - String - - (Optional) Timing used to report action statistics (impression, conversion, mixed, or lifetime) - -- - `breakdowns` - - Sequence - - (Optional) Breakdowns to configure for data aggregation - -- - `custom_insights_lookback_window` - - Integer - - (Optional) Window in days to revisit data during sync to capture updated conversion data from the API. - -- - `level` - - String - - (Optional) Granularity of data to pull (account, ad, adset, campaign) - -- - `start_date` - - String - - (Optional) Start date in yyyy-MM-dd format (e.g. 2025-01-15). Data added after this date will be ingested - -- - `time_increment` - - String - - (Optional) Value in string by which to aggregate statistics (can take all_days, monthly or number of days) - -::: - - -### pipelines._name_.ingestion_definition.objects.table.table_configuration - -**`Type: Map`** - -Configuration settings to control the ingestion of tables. These settings override the table_configuration defined in the IngestionPipelineDefinition object and the SchemaSpec. - - - -:::list-table - -- - Key - - Type - - Description - -- - `auto_full_refresh_policy` - - Map - - (Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy in table configuration will override the above level auto_full_refresh_policy. For example, { "auto_full_refresh_policy": { "enabled": true, "min_interval_hours": 23, } } If unspecified, auto full refresh is disabled. See [\_](#pipelinesnameingestion_definitionobjectstabletable_configurationauto_full_refresh_policy). - -- - `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 - - The primary key of the table used to apply changes. - -- - `query_based_connector_config` - - Map - - Configurations that are only applicable for query-based ingestion connectors. See [\_](#pipelinesnameingestion_definitionobjectstabletable_configurationquery_based_connector_config). - -- - `row_filter` - - String - - (Optional, Immutable) The row filter condition to be applied to the table. It must not contain the WHERE keyword, only the actual filter condition. It must be in DBSQL format. - -- - `scd_type` - - String - - The SCD type to use to ingest the table. - -- - `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. - -::: - - -### pipelines._name_.ingestion_definition.objects.table.table_configuration.auto_full_refresh_policy - -**`Type: Map`** - -(Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try -to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy -in table configuration will override the above level auto_full_refresh_policy. -For example, -{ -"auto_full_refresh_policy": { -"enabled": true, -"min_interval_hours": 23, -} -} -If unspecified, auto full refresh is disabled. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - (Required, Mutable) Whether to enable auto full refresh or not. - -- - `min_interval_hours` - - Integer - - (Optional, Mutable) Specify the minimum interval in hours between the timestamp at which a table was last full refreshed and the current timestamp for triggering auto full If unspecified and autoFullRefresh is enabled then by default min_interval_hours is 24 hours. - -::: - - -### pipelines._name_.ingestion_definition.objects.table.table_configuration.query_based_connector_config - -**`Type: Map`** - -Configurations that are only applicable for query-based ingestion connectors. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cursor_columns` - - Sequence - - The names of the monotonically increasing columns in the source table that are used to enable the table to be read and ingested incrementally through structured streaming. The columns are allowed to have repeated values but have to be non-decreasing. If the source data is merged into the destination (e.g., using SCD Type 1 or Type 2), these columns will implicitly define the `sequence_by` behavior. You can still explicitly set `sequence_by` to override this default. - -- - `deletion_condition` - - String - - Specifies a SQL WHERE condition that specifies that the source row has been deleted. This is sometimes referred to as "soft-deletes". For example: "Operation = 'DELETE'" or "is_deleted = true". This field is orthogonal to `hard_deletion_sync_interval_in_seconds`, one for soft-deletes and the other for hard-deletes. See also the hard_deletion_sync_min_interval_in_seconds field for handling of "hard deletes" where the source rows are physically removed from the table. - -- - `hard_deletion_sync_min_interval_in_seconds` - - Integer - - Specifies the minimum interval (in seconds) between snapshots on primary keys for detecting and synchronizing hard deletions—i.e., rows that have been physically removed from the source table. This interval acts as a lower bound. If ingestion runs less frequently than this value, hard deletion synchronization will align with the actual ingestion frequency instead of happening more often. If not set, hard deletion synchronization via snapshots is disabled. This field is mutable and can be updated without triggering a full snapshot. - -::: - - -### pipelines._name_.ingestion_definition.source_configurations - -**`Type: Sequence`** - -Top-level source configurations - - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog` - - Map - - Catalog-level source configuration parameters. See [\_](#pipelinesnameingestion_definitionsource_configurationscatalog). - -::: - - -### pipelines._name_.ingestion_definition.source_configurations.catalog - -**`Type: Map`** - -Catalog-level source configuration parameters - - - -:::list-table - -- - Key - - Type - - Description - -- - `postgres` - - Map - - Postgres-specific catalog-level configuration parameters. See [\_](#pipelinesnameingestion_definitionsource_configurationscatalogpostgres). - -- - `source_catalog` - - String - - Source catalog name - -::: - - -### pipelines._name_.ingestion_definition.source_configurations.catalog.postgres - -**`Type: Map`** - -Postgres-specific catalog-level configuration parameters - - - -:::list-table - -- - Key - - Type - - Description - -- - `slot_config` - - Map - - Optional. The Postgres slot configuration to use for logical replication. See [\_](#pipelinesnameingestion_definitionsource_configurationscatalogpostgresslot_config). - -::: - - -### pipelines._name_.ingestion_definition.source_configurations.catalog.postgres.slot_config - -**`Type: Map`** - -Optional. The Postgres slot configuration to use for logical replication - - - -:::list-table - -- - Key - - Type - - Description - -- - `publication_name` - - String - - The name of the publication to use for the Postgres source - -- - `slot_name` - - String - - The name of the logical replication slot to use for the Postgres source - -::: - - -### pipelines._name_.ingestion_definition.table_configuration - -**`Type: Map`** - -Configuration settings to control the ingestion of tables. These settings are applied to all tables in the pipeline. - - - -:::list-table - -- - Key - - Type - - Description - -- - `auto_full_refresh_policy` - - Map - - (Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy in table configuration will override the above level auto_full_refresh_policy. For example, { "auto_full_refresh_policy": { "enabled": true, "min_interval_hours": 23, } } If unspecified, auto full refresh is disabled. See [\_](#pipelinesnameingestion_definitiontable_configurationauto_full_refresh_policy). - -- - `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 - - The primary key of the table used to apply changes. - -- - `query_based_connector_config` - - Map - - Configurations that are only applicable for query-based ingestion connectors. See [\_](#pipelinesnameingestion_definitiontable_configurationquery_based_connector_config). - -- - `row_filter` - - String - - (Optional, Immutable) The row filter condition to be applied to the table. It must not contain the WHERE keyword, only the actual filter condition. It must be in DBSQL format. - -- - `scd_type` - - String - - The SCD type to use to ingest the table. - -- - `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. - -::: - - -### pipelines._name_.ingestion_definition.table_configuration.auto_full_refresh_policy - -**`Type: Map`** - -(Optional, Mutable) Policy for auto full refresh, if enabled pipeline will automatically try -to fix issues by doing a full refresh on the table in the retry run. auto_full_refresh_policy -in table configuration will override the above level auto_full_refresh_policy. -For example, -{ -"auto_full_refresh_policy": { -"enabled": true, -"min_interval_hours": 23, -} -} -If unspecified, auto full refresh is disabled. - - - -:::list-table - -- - Key - - Type - - Description - -- - `enabled` - - Boolean - - (Required, Mutable) Whether to enable auto full refresh or not. - -- - `min_interval_hours` - - Integer - - (Optional, Mutable) Specify the minimum interval in hours between the timestamp at which a table was last full refreshed and the current timestamp for triggering auto full If unspecified and autoFullRefresh is enabled then by default min_interval_hours is 24 hours. - -::: - - -### pipelines._name_.ingestion_definition.table_configuration.query_based_connector_config - -**`Type: Map`** - -Configurations that are only applicable for query-based ingestion connectors. - - - -:::list-table - -- - Key - - Type - - Description - -- - `cursor_columns` - - Sequence - - The names of the monotonically increasing columns in the source table that are used to enable the table to be read and ingested incrementally through structured streaming. The columns are allowed to have repeated values but have to be non-decreasing. If the source data is merged into the destination (e.g., using SCD Type 1 or Type 2), these columns will implicitly define the `sequence_by` behavior. You can still explicitly set `sequence_by` to override this default. - -- - `deletion_condition` - - String - - Specifies a SQL WHERE condition that specifies that the source row has been deleted. This is sometimes referred to as "soft-deletes". For example: "Operation = 'DELETE'" or "is_deleted = true". This field is orthogonal to `hard_deletion_sync_interval_in_seconds`, one for soft-deletes and the other for hard-deletes. See also the hard_deletion_sync_min_interval_in_seconds field for handling of "hard deletes" where the source rows are physically removed from the table. - -- - `hard_deletion_sync_min_interval_in_seconds` - - Integer - - Specifies the minimum interval (in seconds) between snapshots on primary keys for detecting and synchronizing hard deletions—i.e., rows that have been physically removed from the source table. This interval acts as a lower bound. If ingestion runs less frequently than this value, hard deletion synchronization will align with the actual ingestion frequency instead of happening more often. If not set, hard deletion synchronization via snapshots is disabled. This field is mutable and can be updated without triggering a full snapshot. - -::: - - -### pipelines._name_.libraries - -**`Type: Sequence`** - -Libraries or code needed by this deployment. - - - -:::list-table - -- - Key - - Type - - Description - -- - `file` - - Map - - The path to a file that defines a pipeline and is stored in the Databricks Repos. See [\_](#pipelinesnamelibrariesfile). - -- - `glob` - - Map - - The unified field to include source codes. 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 [\_](#pipelinesnamelibrariesglob). - -- - `notebook` - - Map - - The path to a notebook that defines a pipeline and is stored in the Databricks workspace. See [\_](#pipelinesnamelibrariesnotebook). - -- - `whl` - - String - - This field is deprecated - -::: - - -### pipelines._name_.libraries.file - -**`Type: Map`** - -The path to a file that defines a pipeline and is stored in the Databricks Repos. - - - -:::list-table - -- - Key - - Type - - Description - -- - `path` - - String - - The absolute path of the source code. - -::: - - -### pipelines._name_.libraries.glob - -**`Type: Map`** - -The unified field to include source codes. -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`. - - - -:::list-table - -- - Key - - Type - - Description - -- - `include` - - String - - The source code to include for pipelines - -::: - - -### pipelines._name_.libraries.notebook - -**`Type: Map`** - -The path to a notebook that defines a pipeline and is stored in the Databricks workspace. - - - -:::list-table - -- - Key - - Type - - Description - -- - `path` - - String - - The absolute path of the source code. - -::: - - -### pipelines._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### pipelines._name_.notifications - -**`Type: Sequence`** - -List of notification settings for this pipeline. - - - -:::list-table - -- - Key - - Type - - Description - -- - `alerts` - - Sequence - - A list of alerts that trigger the sending of notifications to the configured destinations. The supported alerts are: * `on-update-success`: A pipeline update completes successfully. * `on-update-failure`: Each time a pipeline update fails. * `on-update-fatal-failure`: A pipeline update fails with a non-retryable (fatal) error. * `on-flow-failure`: A single data flow fails. - -- - `email_recipients` - - Sequence - - A list of email addresses notified when a configured alert is triggered. - -::: - - -### pipelines._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### pipelines._name_.run_as - -**`Type: Map`** - -Write-only setting, available only in Create/Update calls. Specifies the user or service principal that the pipeline runs as. If not specified, the pipeline runs as the user who created the pipeline. - -Only `user_name` or `service_principal_name` can be specified. If both are specified, an error is thrown. - - - -:::list-table - -- - Key - - Type - - Description - -- - `service_principal_name` - - String - - Application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - -- - `user_name` - - String - - The email of an active workspace user. Users can only set this field to their own email. - -::: - - -## postgres_branches - -**`Type: Map`** - - - -```yaml -postgres_branches: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch_id` - - String - - - -- - `expire_time` - - Map - - - -- - `is_protected` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#postgres_branchesnamelifecycle). - -- - `no_expiry` - - Boolean - - - -- - `parent` - - String - - - -- - `replace_existing` - - Boolean - - - -- - `source_branch` - - String - - - -- - `source_branch_lsn` - - String - - - -- - `source_branch_time` - - Map - - - -- - `ttl` - - String - - - -::: - - -### postgres_branches._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## postgres_catalogs - -**`Type: Map`** - -The Postgres catalog definitions for the bundle, where each key is the name of the catalog. Each entry binds a Unity Catalog catalog to a Postgres database on a Lakebase Autoscaling branch. - -```yaml -postgres_catalogs: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `catalog_id` - - String - - - -- - `create_database_if_missing` - - Boolean - - - -- - `lifecycle` - - Map - - See [\_](#postgres_catalogsnamelifecycle). - -- - `postgres_database` - - String - - - -::: - - -### postgres_catalogs._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## postgres_endpoints - -**`Type: Map`** - - - -```yaml -postgres_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `autoscaling_limit_max_cu` - - Any - - - -- - `autoscaling_limit_min_cu` - - Any - - - -- - `disabled` - - Boolean - - - -- - `endpoint_id` - - String - - - -- - `endpoint_type` - - String - - The compute endpoint type. Either `read_write` or `read_only`. - -- - `group` - - Map - - See [\_](#postgres_endpointsnamegroup). - -- - `lifecycle` - - Map - - See [\_](#postgres_endpointsnamelifecycle). - -- - `no_suspension` - - Boolean - - - -- - `parent` - - String - - - -- - `replace_existing` - - Boolean - - - -- - `settings` - - Map - - A collection of settings for a compute endpoint. See [\_](#postgres_endpointsnamesettings). - -- - `suspend_timeout_duration` - - String - - - -::: - - -### postgres_endpoints._name_.group - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `enable_readable_secondaries` - - Boolean - - Whether to allow read-only connections to read-write endpoints. Only relevant for read-write endpoints where size.max > 1. - -- - `max` - - Integer - - 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 HA. To manually suspend all computes in an endpoint group, set disabled to true on the EndpointSpec. - -- - `min` - - Integer - - 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. - -::: - - -### postgres_endpoints._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### postgres_endpoints._name_.settings - -**`Type: Map`** - -A collection of settings for a compute endpoint. - - - -:::list-table - -- - Key - - Type - - Description - -- - `pg_settings` - - Map - - A raw representation of Postgres settings. - -::: - - -## postgres_projects - -**`Type: Map`** - - - -```yaml -postgres_projects: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `custom_tags` - - Sequence - - See [\_](#postgres_projectsnamecustom_tags). - -- - `default_branch` - - String - - - -- - `default_endpoint_settings` - - Map - - A collection of settings for a compute endpoint. See [\_](#postgres_projectsnamedefault_endpoint_settings). - -- - `display_name` - - String - - - -- - `enable_pg_native_login` - - Boolean - - - -- - `history_retention_duration` - - String - - - -- - `lifecycle` - - Map - - See [\_](#postgres_projectsnamelifecycle). - -- - `permissions` - - Sequence - - See [\_](#postgres_projectsnamepermissions). - -- - `pg_version` - - Integer - - - -- - `project_id` - - String - - - -- - `purge_on_delete` - - Boolean - - - -::: - - -### postgres_projects._name_.custom_tags - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - The key of the custom tag. - -- - `value` - - String - - The value of the custom tag. - -::: - - -### postgres_projects._name_.default_endpoint_settings - -**`Type: Map`** - -A collection of settings for a compute endpoint. - - - -:::list-table - -- - Key - - Type - - Description - -- - `autoscaling_limit_max_cu` - - Any - - The maximum number of Compute Units. Minimum value is 0.5. - -- - `autoscaling_limit_min_cu` - - Any - - 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`. When updating, use `spec.project_default_settings.suspension` in the update_mask. - -- - `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`. When updating, use `spec.project_default_settings.suspension` in the update_mask. - -::: - - -### postgres_projects._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### postgres_projects._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -## postgres_synced_tables - -**`Type: Map`** - -The Postgres synced table definitions for the bundle, where each key is the name of the synced table. Each entry continuously replicates a Unity Catalog Delta source table into a Postgres table on a Lakebase Autoscaling instance. - -```yaml -postgres_synced_tables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `branch` - - String - - - -- - `create_database_objects_if_missing` - - Boolean - - - -- - `existing_pipeline_id` - - String - - - -- - `lifecycle` - - Map - - See [\_](#postgres_synced_tablesnamelifecycle). - -- - `new_pipeline_spec` - - Map - - See [\_](#postgres_synced_tablesnamenew_pipeline_spec). - -- - `postgres_database` - - String - - - -- - `primary_key_columns` - - Sequence - - - -- - `scheduling_policy` - - String - - Scheduling policy of the synced table's underlying pipeline. - -- - `source_table_full_name` - - String - - - -- - `synced_table_id` - - String - - - -- - `timeseries_key` - - String - - - -::: - - -### postgres_synced_tables._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### postgres_synced_tables._name_.new_pipeline_spec - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - Budget policy to set on the newly created pipeline. - -- - `storage_catalog` - - String - - UC catalog for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be a standard catalog where the user has permissions to create Delta tables. - -- - `storage_schema` - - String - - UC schema for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be in the standard catalog where the user has permissions to create Delta tables. - -::: - - -## quality_monitors - -**`Type: Map`** - -The quality_monitor resource allows you to define a Unity Catalog [table monitor](/api/workspace/qualitymonitors/create). For information about monitors, see [_](/machine-learning/model-serving/monitor-diagnose-endpoints.md). - -```yaml -quality_monitors: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `assets_dir` - - String - - [Create:REQ Update:IGN] Field for specifying the absolute path to a custom directory to store data-monitoring assets. Normally prepopulated to a default user location via UI and Python APIs. - -- - `baseline_table_name` - - String - - [Create:OPT Update:OPT] Baseline table name. Baseline data is used to compute drift from the data in the monitored `table_name`. The baseline table and the monitored table shall have the same schema. - -- - `custom_metrics` - - Sequence - - [Create:OPT Update:OPT] Custom metrics. See [\_](#quality_monitorsnamecustom_metrics). - -- - `inference_log` - - Map - - See [\_](#quality_monitorsnameinference_log). - -- - `latest_monitor_failure_msg` - - String - - [Create:ERR Update:IGN] The latest error message for a monitor failure. - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#quality_monitorsnamelifecycle). - -- - `notifications` - - Map - - [Create:OPT Update:OPT] Field for specifying notification settings. See [\_](#quality_monitorsnamenotifications). - -- - `output_schema_name` - - String - - [Create:REQ Update:REQ] Schema where output tables are created. Needs to be in 2-level format {catalog}.{schema} - -- - `schedule` - - Map - - [Create:OPT Update:OPT] The monitor schedule. See [\_](#quality_monitorsnameschedule). - -- - `skip_builtin_dashboard` - - Boolean - - Whether to skip creating a default dashboard summarizing data quality metrics. - -- - `slicing_exprs` - - Sequence - - [Create:OPT Update:OPT] 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”]` will generate the following slices: two slices for `col_2 > 10` (True and False), and one slice per unique value in `col1`. For high-cardinality columns, only the top 100 unique values by frequency will generate slices. - -- - `snapshot` - - Map - - Configuration for monitoring snapshot tables. - -- - `table_name` - - String - - - -- - `time_series` - - Map - - Configuration for monitoring time series tables. See [\_](#quality_monitorsnametime_series). - -- - `warehouse_id` - - String - - Optional argument to specify the warehouse for dashboard creation. If not specified, the first running warehouse will be used. - -::: - - -**Example** - -The following example defines a quality monitor: - -```yaml -resources: - quality_monitors: - my_quality_monitor: - table_name: dev.mlops_schema.predictions - output_schema_name: ${bundle.target}.mlops_schema - assets_dir: /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 -``` - -### quality_monitors._name_.custom_metrics - -**`Type: Sequence`** - -[Create:OPT Update:OPT] Custom metrics. - - - -:::list-table - -- - 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. - CUSTOM_METRIC_TYPE_AGGREGATE: only depend on the existing columns in your table - CUSTOM_METRIC_TYPE_DERIVED: depend on previously computed aggregate metrics - CUSTOM_METRIC_TYPE_DRIFT: depend on previously computed aggregate or derived metrics - -::: - - -### quality_monitors._name_.inference_log - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `granularities` - - Sequence - - Granularities for aggregating data into time windows based on their timestamp. Valid values are 5 minutes, 30 minutes, 1 hour, 1 day, n weeks, 1 month, or 1 year. - -- - `label_col` - - String - - Column for the label. - -- - `model_id_col` - - String - - Column for the model identifier. - -- - `prediction_col` - - String - - Column for the prediction. - -- - `prediction_proba_col` - - String - - Column for prediction probabilities - -- - `problem_type` - - String - - Problem type the model aims to solve. - -- - `timestamp_col` - - String - - Column for the timestamp. - -::: - - -### quality_monitors._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### quality_monitors._name_.notifications - -**`Type: Map`** - -[Create:OPT Update:OPT] Field for specifying notification settings. - - - -:::list-table - -- - Key - - Type - - Description - -- - `on_failure` - - Map - - Destinations to send notifications on failure/timeout. See [\_](#quality_monitorsnamenotificationson_failure). - -::: - - -### quality_monitors._name_.notifications.on_failure - -**`Type: Map`** - -Destinations to send notifications on failure/timeout. - - - -:::list-table - -- - Key - - Type - - Description - -- - `email_addresses` - - Sequence - - The list of email addresses to send the notification to. A maximum of 5 email addresses is supported. - -::: - - -### quality_monitors._name_.schedule - -**`Type: Map`** - -[Create:OPT Update:OPT] The monitor schedule. - - - -:::list-table - -- - Key - - Type - - Description - -- - `pause_status` - - String - - Read only field that indicates whether a schedule is paused or not. - -- - `quartz_cron_expression` - - String - - The expression that determines when to run the monitor. See [examples](https://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html). - -- - `timezone_id` - - String - - The timezone id (e.g., ``PST``) in which to evaluate the quartz expression. - -::: - - -### quality_monitors._name_.snapshot - -**`Type: Map`** - -Configuration for monitoring snapshot tables. - - -### quality_monitors._name_.time_series - -**`Type: Map`** - -Configuration for monitoring time series tables. - - - -:::list-table - -- - Key - - Type - - Description - -- - `granularities` - - Sequence - - Granularities for aggregating data into time windows based on their timestamp. Valid values are 5 minutes, 30 minutes, 1 hour, 1 day, n weeks, 1 month, or 1 year. - -- - `timestamp_col` - - String - - Column for the timestamp. - -::: - - -## registered_models - -**`Type: Map`** - -The registered model resource allows you to define models in Unity Catalog. For information about Unity Catalog [registered models](/api/workspace/registeredmodels/create), see [_](/machine-learning/manage-model-lifecycle/index.md). - -```yaml -registered_models: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `aliases` - - Sequence - - See [\_](#registered_modelsnamealiases). - -- - `browse_only` - - Boolean - - - -- - `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 - - - -- - `created_by` - - String - - - -- - `full_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#registered_modelsnamegrants). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#registered_modelsnamelifecycle). - -- - `metastore_id` - - String - - - -- - `name` - - String - - The name of the registered model - -- - `owner` - - String - - - -- - `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` - - Integer - - - -- - `updated_by` - - String - - - -::: - - -**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 -``` - -### registered_models._name_.aliases - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `alias_name` - - String - - Name of the alias, e.g. 'champion' or 'latest_stable' - -- - `catalog_name` - - String - - - -- - `id` - - String - - - -- - `model_name` - - String - - - -- - `schema_name` - - String - - - -- - `version_num` - - Integer - - Integer version number of the model version to which this alias points. - -::: - - -### registered_models._name_.grants - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `principal` - - String - - The principal (user email address or group name). For deleted principals, `principal` is empty while `principal_id` is populated. - -- - `privileges` - - Sequence - - The privileges assigned to the principal. - -::: - - -### registered_models._name_.grants.privileges - -**`Type: Sequence`** - -The privileges assigned to the principal. - - -### registered_models._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## schemas - -**`Type: Map`** - -The schema resource type allows you to define Unity Catalog [schemas](/api/workspace/schemas/create) for tables and other assets in your jobs 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](/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](/api/workspace/schemas/update). - -```yaml -schemas: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog_name` - - String - - Name of parent catalog. - -- - `comment` - - String - - User-provided free-form text description. - -- - `grants` - - Sequence - - See [\_](#schemasnamegrants). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#schemasnamelifecycle). - -- - `name` - - String - - Name of schema, relative to parent catalog. - -- - `properties` - - Map - - - -- - `storage_root` - - String - - Storage root URL for managed tables within schema. - -::: - - -**Example** - -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: - -```yaml -resources: - pipelines: - my_pipeline: - name: test-pipeline-{{.unique_id}} - libraries: - - notebook: - path: ./nb.sql - development: true - catalog: main - target: ${resources.schemas.my_schema.id} - - schemas: - my_schema: - name: test-schema-{{.unique_id}} - catalog_name: main - comment: This schema was created by DABs. -``` - -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 [_](/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: - - CAN_MANAGE - - principal: my_team - privileges: - - CAN_READ - catalog_name: main - ``` - -### schemas._name_.grants - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `principal` - - String - - The principal (user email address or group name). For deleted principals, `principal` is empty while `principal_id` is populated. - -- - `privileges` - - Sequence - - The privileges assigned to the principal. - -::: - - -### schemas._name_.grants.privileges - -**`Type: Sequence`** - -The privileges assigned to the principal. - - -### schemas._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## secret_scopes - -**`Type: Map`** - -The secret scope definitions for the bundle, where each key is the name of the secret scope. See [\_](/dev-tools/bundles/resources.md#secret_scopes). - -```yaml -secret_scopes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `backend_type` - - String - - The backend type the scope will be created with. If not specified, will default to `DATABRICKS` - -- - `keyvault_metadata` - - Map - - The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT`. See [\_](#secret_scopesnamekeyvault_metadata). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#secret_scopesnamelifecycle). - -- - `name` - - String - - Scope name requested by the user. Scope names are unique. - -- - `permissions` - - Sequence - - The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. See [\_](#secret_scopesnamepermissions). - -::: - - -### secret_scopes._name_.keyvault_metadata - -**`Type: Map`** - -The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT` - - - -:::list-table - -- - Key - - Type - - Description - -- - `dns_name` - - String - - The DNS of the KeyVault - -- - `resource_id` - - String - - The resource id of the azure KeyVault that user wants to associate the scope with. - -::: - - -### secret_scopes._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### secret_scopes._name_.permissions - -**`Type: Sequence`** - -The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The application ID of an active service principal. This field translates to a `principal` field in secret scope ACL. - -- - `user_name` - - String - - The name of the user that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - -::: - - -## sql_warehouses - -**`Type: Map`** - -Creates a new SQL warehouse. - -```yaml -sql_warehouses: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `auto_stop_mins` - - Integer - - The amount of time in minutes that a SQL warehouse must be idle (i.e., no RUNNING queries) before it is automatically stopped. Supported values: - Must be == 0 or >= 10 mins - 0 indicates no autostop. Defaults to 120 mins - -- - `channel` - - Map - - Channel Details. See [\_](#sql_warehousesnamechannel). - -- - `cluster_size` - - String - - 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, please tune max_num_clusters. Supported values: - 2X-Small - X-Small - Small - Medium - Large - X-Large - 2X-Large - 3X-Large - 4X-Large - 5X-Large - -- - `creator_name` - - String - - warehouse creator name - -- - `enable_photon` - - Boolean - - Configures whether the warehouse should use Photon optimized clusters. Defaults to true. - -- - `enable_serverless_compute` - - Boolean - - Configures whether the warehouse should use serverless compute - -- - `instance_profile_arn` - - String - - This field is deprecated - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#sql_warehousesnamelifecycle). - -- - `max_num_clusters` - - Integer - - Maximum number of clusters that the autoscaler will create to handle concurrent queries. Supported values: - Must be >= min_num_clusters - Must be <= 40. Defaults to min_clusters if unset. - -- - `min_num_clusters` - - Integer - - 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. Supported values: - Must be > 0 - Must be <= min(max_num_clusters, 30) Defaults to 1 - -- - `name` - - String - - Logical name for the cluster. Supported values: - Must be unique within an org. - Must be less than 100 characters. - -- - `permissions` - - Sequence - - See [\_](#sql_warehousesnamepermissions). - -- - `spot_instance_policy` - - String - - EndpointSpotInstancePolicy configures whether the endpoint should use spot instances. The breakdown of how the EndpointSpotInstancePolicy converts to per cloud configurations is: +-------+--------------------------------------+--------------------------------+ | Cloud | COST_OPTIMIZED | RELIABILITY_OPTIMIZED | +-------+--------------------------------------+--------------------------------+ | AWS | On Demand Driver with Spot Executors | On Demand Driver and Executors | | AZURE | On Demand Driver and Executors | On Demand Driver and Executors | +-------+--------------------------------------+--------------------------------+ While including "spot" in the enum name may limit the the future extensibility of this field because it limits this enum to denoting "spot or not", this is the field that PM recommends after discussion with customers per SC-48783. - -- - `tags` - - Map - - A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated with this SQL warehouse. Supported values: - Number of tags < 45. See [\_](#sql_warehousesnametags). - -- - `warehouse_type` - - String - - - -::: - - -### sql_warehouses._name_.channel - -**`Type: Map`** - -Channel Details - - - -:::list-table - -- - Key - - Type - - Description - -- - `dbsql_version` - - String - - - -- - `name` - - String - - - -::: - - -### sql_warehouses._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -- - `started` - - Boolean - - Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. - -::: - - -### sql_warehouses._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - - -- - `level` - - String - - Permission level - -- - `service_principal_name` - - String - - - -- - `user_name` - - String - - - -::: - - -### sql_warehouses._name_.tags - -**`Type: Map`** - -A set of key-value pairs that will be tagged on all resources (e.g., AWS instances and EBS volumes) associated -with this SQL warehouse. - -Supported values: -- Number of tags < 45. - - - -:::list-table - -- - Key - - Type - - Description - -- - `custom_tags` - - Sequence - - See [\_](#sql_warehousesnametagscustom_tags). - -::: - - -### sql_warehouses._name_.tags.custom_tags - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `key` - - String - - - -- - `value` - - String - - - -::: - - -## synced_database_tables - -**`Type: Map`** - - - -```yaml -synced_database_tables: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `database_instance_name` - - String - - - -- - `lifecycle` - - Map - - See [\_](#synced_database_tablesnamelifecycle). - -- - `logical_database_name` - - String - - - -- - `name` - - String - - - -- - `spec` - - Map - - Specification of a synced database table. See [\_](#synced_database_tablesnamespec). - -::: - - -### synced_database_tables._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### synced_database_tables._name_.spec - -**`Type: Map`** - -Specification of a synced database table. - - - -:::list-table - -- - Key - - Type - - Description - -- - `create_database_objects_if_missing` - - Boolean - - If true, the synced table's logical database and schema resources in PG will be created if they do not already exist. - -- - `existing_pipeline_id` - - String - - At most one of existing_pipeline_id and new_pipeline_spec should be defined. If existing_pipeline_id is defined, 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. - -- - `new_pipeline_spec` - - Map - - At most one of existing_pipeline_id and new_pipeline_spec should be defined. If new_pipeline_spec is defined, a new pipeline is created for this synced table. The location pointed to is used to store intermediate files (checkpoints, event logs etc). The caller must have write permissions to create Delta tables in the specified catalog and schema. Again, note this requires write permissions, whereas the source table only requires read permissions. See [\_](#synced_database_tablesnamespecnew_pipeline_spec). - -- - `primary_key_columns` - - Sequence - - Primary Key columns to be used for data insert/update in the destination. - -- - `scheduling_policy` - - String - - Scheduling policy of the underlying pipeline. - -- - `source_table_full_name` - - String - - Three-part (catalog, schema, table) name of the source Delta table. - -- - `timeseries_key` - - String - - Time series key to deduplicate (tie-break) rows with the same primary key. - -::: - - -### synced_database_tables._name_.spec.new_pipeline_spec - -**`Type: Map`** - -At most one of existing_pipeline_id and new_pipeline_spec should be defined. - -If new_pipeline_spec is defined, a new pipeline is created for this synced table. The location pointed to is used -to store intermediate files (checkpoints, event logs etc). The caller must have write permissions to create Delta -tables in the specified catalog and schema. Again, note this requires write permissions, whereas the source table -only requires read permissions. - - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - Budget policy to set on the newly created pipeline. - -- - `storage_catalog` - - String - - This field needs to be specified if the destination catalog is a managed postgres catalog. UC catalog for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be a standard catalog where the user has permissions to create Delta tables. - -- - `storage_schema` - - String - - This field needs to be specified if the destination catalog is a managed postgres catalog. UC schema for the pipeline to store intermediate files (checkpoints, event logs etc). This needs to be in the standard catalog where the user has permissions to create Delta tables. - -::: - - -## vector_search_endpoints - -**`Type: Map`** - - - -```yaml -vector_search_endpoints: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `budget_policy_id` - - String - - - -- - `endpoint_type` - - String - - Type of endpoint. - -- - `lifecycle` - - Map - - See [\_](#vector_search_endpointsnamelifecycle). - -- - `name` - - String - - - -- - `permissions` - - Sequence - - See [\_](#vector_search_endpointsnamepermissions). - -- - `target_qps` - - Integer - - - -::: - - -### vector_search_endpoints._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -### vector_search_endpoints._name_.permissions - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `group_name` - - String - - The name of the group that has the permission set in level. - -- - `level` - - String - - The allowed permission for user, group, service principal defined for this permission. - -- - `service_principal_name` - - String - - The name of the service principal that has the permission set in level. - -- - `user_name` - - String - - The name of the user that has the permission set in level. - -::: - - -## vector_search_indexes - -**`Type: Map`** - - - -```yaml -vector_search_indexes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `delta_sync_index_spec` - - Map - - See [\_](#vector_search_indexesnamedelta_sync_index_spec). - -- - `direct_access_index_spec` - - Map - - See [\_](#vector_search_indexesnamedirect_access_index_spec). - -- - `endpoint_name` - - String - - - -- - `grants` - - Sequence - - See [\_](#vector_search_indexesnamegrants). - -- - `index_subtype` - - String - - The subtype of the AI Search index, determining the indexing and retrieval strategy. - `VECTOR`: Not supported. Use `HYBRID` instead. - `FULL_TEXT`: An index that uses full-text search without vector embeddings. - `HYBRID`: An index that uses vector embeddings for similarity search and hybrid search. - -- - `index_type` - - String - - There are 2 types of AI Search indexes: - `DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index that supports direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates. - -- - `lifecycle` - - Map - - See [\_](#vector_search_indexesnamelifecycle). - -- - `name` - - String - - - -- - `primary_key` - - String - - - -::: - - -### vector_search_indexes._name_.delta_sync_index_spec - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `columns_to_index` - - Sequence - - [Optional] Alias for columns_to_sync. Select the columns to include in the vector index. If you leave this field 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 - - - -- - `embedding_source_columns` - - Sequence - - See [\_](#vector_search_indexesnamedelta_sync_index_specembedding_source_columns). - -- - `embedding_vector_columns` - - Sequence - - See [\_](#vector_search_indexesnamedelta_sync_index_specembedding_vector_columns). - -- - `embedding_writeback_table` - - String - - - -- - `pipeline_type` - - String - - Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the triggered execution mode, 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. - `CONTINUOUS`: If the pipeline uses continuous execution, the pipeline processes new data as it arrives in the source table to keep vector index fresh. - -- - `source_table` - - String - - - -::: - - -### vector_search_indexes._name_.delta_sync_index_spec.embedding_source_columns - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `embedding_model_endpoint_name` - - String - - - -- - `model_endpoint_name_for_query` - - String - - - -- - `name` - - String - - - -::: - - -### vector_search_indexes._name_.delta_sync_index_spec.embedding_vector_columns - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `embedding_dimension` - - Integer - - - -- - `name` - - String - - - -::: - - -### vector_search_indexes._name_.direct_access_index_spec - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `embedding_source_columns` - - Sequence - - See [\_](#vector_search_indexesnamedirect_access_index_specembedding_source_columns). - -- - `embedding_vector_columns` - - Sequence - - See [\_](#vector_search_indexesnamedirect_access_index_specembedding_vector_columns). - -- - `schema_json` - - String - - - -::: - - -### vector_search_indexes._name_.direct_access_index_spec.embedding_source_columns - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `embedding_model_endpoint_name` - - String - - - -- - `model_endpoint_name_for_query` - - String - - - -- - `name` - - String - - - -::: - - -### vector_search_indexes._name_.direct_access_index_spec.embedding_vector_columns - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `embedding_dimension` - - Integer - - - -- - `name` - - String - - - -::: - - -### vector_search_indexes._name_.grants - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `principal` - - String - - The principal (user email address or group name). For deleted principals, `principal` is empty while `principal_id` is populated. - -- - `privileges` - - Sequence - - The privileges assigned to the principal. - -::: - - -### vector_search_indexes._name_.grants.privileges - -**`Type: Sequence`** - -The privileges assigned to the principal. - - -### vector_search_indexes._name_.lifecycle - -**`Type: Map`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - - -## volumes - -**`Type: Map`** - -The volume resource type allows you to define and create Unity Catalog [volumes](/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 [_](/dev-tools/bundles/deployment-modes.md#custom-presets). - -```yaml -volumes: - : - : -``` - - -:::list-table - -- - Key - - Type - - Description - -- - `catalog_name` - - String - - The name of the catalog where the schema and the volume are - -- - `comment` - - String - - The comment attached to the volume - -- - `grants` - - Sequence - - See [\_](#volumesnamegrants). - -- - `lifecycle` - - Map - - Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. See [\_](#volumesnamelifecycle). - -- - `name` - - String - - The name of the volume - -- - `schema_name` - - String - - The name of the schema where the volume is - -- - `storage_location` - - String - - The storage location on the cloud - -- - `volume_type` - - String - - - -::: - - -**Example** - -The following example creates a Unity Catalog volume with the key `my_volume`: - -```yaml -resources: - volumes: - my_volume: - 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). - -### volumes._name_.grants - -**`Type: Sequence`** - - - - - -:::list-table - -- - Key - - Type - - Description - -- - `principal` - - String - - The principal (user email address or group name). For deleted principals, `principal` is empty while `principal_id` is populated. - -- - `privileges` - - Sequence - - The privileges assigned to the principal. - -::: - - -### volumes._name_.grants.privileges - -**`Type: Sequence`** - -The privileges assigned to the principal. - - -### volumes._name_.lifecycle - -**`Type: Map`** - -Lifecycle is a struct that contains the lifecycle settings for a resource. It controls the behavior of the resource when it is deployed or destroyed. - - - -:::list-table - -- - Key - - Type - - Description - -- - `prevent_destroy` - - Boolean - - Lifecycle setting to prevent the resource from being destroyed. - -::: - \ No newline at end of file diff --git a/bundle/docsgen/refs.go b/bundle/docsgen/refs.go deleted file mode 100644 index 5092dcd664b..00000000000 --- a/bundle/docsgen/refs.go +++ /dev/null @@ -1,110 +0,0 @@ -package main - -import ( - "log" - "strings" - - "github.com/databricks/cli/libs/jsonschema" -) - -func isReferenceType(v *jsonschema.Schema, refs map[string]*jsonschema.Schema, ownFields map[string]bool) bool { - if v.Type != "object" && v.Type != "array" { - return false - } - if len(v.Properties) > 0 { - return true - } - if v.Items != nil { - items := resolveRefs(v.Items, refs) - if items != nil && items.Type == "object" { - return true - } - } - props := resolveAdditionalProperties(v) - if !isInOwnFields(props, ownFields) { - return false - } - if props != nil { - propsResolved := resolveRefs(props, refs) - return propsResolved.Type == "object" - } - - return false -} - -func isInOwnFields(node *jsonschema.Schema, ownFields map[string]bool) bool { - if node != nil && node.Reference != nil { - return ownFields[getRefType(node)] - } - return true -} - -func resolveAdditionalProperties(v *jsonschema.Schema) *jsonschema.Schema { - if v.AdditionalProperties == nil { - return nil - } - additionalProps, ok := v.AdditionalProperties.(*jsonschema.Schema) - if !ok { - return nil - } - return additionalProps -} - -func resolveRefs(s *jsonschema.Schema, schemas map[string]*jsonschema.Schema) *jsonschema.Schema { - if s == nil { - return nil - } - - node := s - description := s.Description - markdownDescription := s.MarkdownDescription - examples := getExamples(s.Examples) - deprecated := s.Deprecated - deprecationMessage := s.DeprecationMessage - doNotSuggest := s.DoNotSuggest - - for node.Reference != nil { - ref := getRefType(node) - newNode, ok := schemas[ref] - if !ok { - log.Printf("schema %s not found", ref) - break - } - - if description == "" { - description = newNode.Description - } - if markdownDescription == "" { - markdownDescription = newNode.MarkdownDescription - } - if len(examples) == 0 { - examples = getExamples(newNode.Examples) - } - - node = newNode - } - - newNode := *node - newNode.Description = description - newNode.MarkdownDescription = markdownDescription - newNode.Examples = examples - newNode.Deprecated = deprecated - newNode.DeprecationMessage = deprecationMessage - newNode.DoNotSuggest = doNotSuggest - return &newNode -} - -func getExamples(examples any) []string { - typedExamples, ok := examples.([]string) - if !ok { - return []string{} - } - return typedExamples -} - -func getRefType(node *jsonschema.Schema) string { - if node.Reference == nil { - return "" - } - return strings.TrimPrefix(*node.Reference, "#/$defs/") -} diff --git a/bundle/docsgen/renderer.go b/bundle/docsgen/renderer.go deleted file mode 100644 index 5f6c77258bd..00000000000 --- a/bundle/docsgen/renderer.go +++ /dev/null @@ -1,51 +0,0 @@ -package main - -import ( - "fmt" - "runtime" - "strings" -) - -type markdownRenderer struct { - nodes []string -} - -func newMardownRenderer() *markdownRenderer { - return &markdownRenderer{} -} - -func (m *markdownRenderer) add(s string) *markdownRenderer { - m.nodes = append(m.nodes, s) - return m -} - -func (m *markdownRenderer) PlainText(s string) *markdownRenderer { - return m.add(s) -} - -func (m *markdownRenderer) LF() *markdownRenderer { - return m.add(" ") -} - -func (m *markdownRenderer) H2(s string) *markdownRenderer { - return m.add("## " + s) -} - -func (m *markdownRenderer) H3(s string) *markdownRenderer { - return m.add("### " + s) -} - -func (m *markdownRenderer) CodeBlocks(lang, s string) *markdownRenderer { - return m.add(fmt.Sprintf("```%s%s%s%s```", lang, lineFeed(), s, lineFeed())) -} - -func (m *markdownRenderer) String() string { - return strings.Join(m.nodes, lineFeed()) -} - -func lineFeed() string { - if runtime.GOOS == "windows" { - return "\r\n" - } - return "\n" -} diff --git a/bundle/docsgen/templates/reference.md b/bundle/docsgen/templates/reference.md deleted file mode 100644 index 7c92355aa59..00000000000 --- a/bundle/docsgen/templates/reference.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -description: 'Configuration reference for databricks.yml' ---- - - - -# Configuration reference - -This article provides reference for keys supported by :re[DABS] configuration (YAML). See [\_](/dev-tools/bundles/index.md). - -For complete bundle examples, see [\_](/dev-tools/bundles/resource-examples.md) and the [bundle-examples GitHub repository](https://github.com/databricks/bundle-examples). diff --git a/bundle/docsgen/templates/resources.md b/bundle/docsgen/templates/resources.md deleted file mode 100644 index 9706ef925b5..00000000000 --- a/bundle/docsgen/templates/resources.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -description: 'Learn about resources supported by Declarative Automation Bundles and how to configure them.' ---- - - - -# :re[DABS] resources - -:re[DABS] allows you to specify information about the :re[Databricks] resources used by the bundle in the `resources` mapping in the bundle configuration. See [resources mapping](/dev-tools/bundles/settings.md#resources) and [resources key reference](/dev-tools/bundles/reference.md#resources). - -This article outlines supported resource types for bundles and provides details and an example for each supported type. For additional examples, see [\_](/dev-tools/bundles/resource-examples.md). - -:::tip - -To generate YAML for any existing resource, use the `databricks bundle generate` command. See [\_](/dev-tools/cli/bundle-commands.md#generate). - -::: - -## Supported resources - -The following table lists supported resource types for bundles. Some resources can be created by defining them in a bundle and deploying the bundle, and some resources only support referencing an existing resource to include in the bundle. - -Resources are defined using the corresponding [Databricks REST API](/api/workspace/introduction) object’s create operation request payload, where the object’s supported fields, expressed as YAML, are the resource’s supported properties. Links to documentation for each resource’s corresponding payloads are listed in the table. - -:::tip - -The `databricks bundle validate` command returns warnings if unknown resource properties are found in bundle configuration files. - -::: - -::::aws-azure - -:::list-table - -- - Resource - - Create support - - Corresponding REST API object -- - [app](#apps) - - ✓ - - [App object](/api/workspace/apps/create) -- - [cluster](#clusters) - - ✓ - - [Cluster object](/api/workspace/clusters/create) -- - [dashboard](#dashboards) - - - - [Dashboard object](/api/workspace/lakeview/create) -- - [experiment](#experiments) - - ✓ - - [Experiment object](/api/workspace/experiments/createexperiment) -- - [job](#job) - - ✓ - - [Job object](/api/workspace/jobs/create) -- - [model (legacy)](#models) - - ✓ - - [Model (legacy) object](/api/workspace/modelregistry/createmodel) -- - [model_serving_endpoint](#model_serving_endpoints) - - ✓ - - [Model serving endpoint object](/api/workspace/servingendpoints/create) -- - [pipeline](#pipeline) - - ✓ - - [Pipeline object](/api/workspace/pipelines/create) -- - [quality_monitor](#quality_monitors) - - ✓ - - [Quality monitor object](/api/workspace/qualitymonitors/create) -- - [registered_model](#registered_models) (:re[UC]) - - ✓ - - [Registered model object](/api/workspace/registeredmodels/create) -- - [schema](#schemas) (:re[UC]) - - ✓ - - [Schema object](/api/workspace/schemas/create) -- - [volume](#volumes) (:re[UC]) - - ✓ - - [Volume object](/api/workspace/volumes/create) - -::: - -:::: - -::::gcp - -:::list-table - -- - Resource - - Create support - - Corresponding REST API object -- - [cluster](#clusters) - - ✓ - - [Cluster object](/api/workspace/clusters/create) -- - [dashboard](#dashboards) - - - - [Dashboard object](/api/workspace/lakeview/create) -- - [experiment](#experiments) - - ✓ - - [Experiment object](/api/workspace/experiments/createexperiment) -- - [job](#jobs) - - ✓ - - [Job object](/api/workspace/jobs/create) -- - [model (legacy)](#models) - - ✓ - - [Model (legacy) object](/api/workspace/modelregistry/createmodel) -- - [model_serving_endpoint](#model_serving_endpoints) - - ✓ - - [Model serving endpoint object](/api/workspace/servingendpoints/create) -- - [pipeline](#pipelines) - - ✓ - - [Pipeline object]](/api/workspace/pipelines/create) -- - [quality_monitor](#quality_monitors) - - ✓ - - [Quality monitor object](/api/workspace/qualitymonitors/create) -- - [registered_model](#registered_models) (:re[UC]) - - ✓ - - [Registered model object](/api/workspace/registeredmodels/create) -- - [schema](#schemas) (:re[UC]) - - ✓ - - [Schema object](/api/workspace/schemas/create) -- - [volume](#volumes) (:re[UC]) - - ✓ - - [Volume object](/api/workspace/volumes/create) - -::: - -:::: diff --git a/bundle/docsgen/testdata/anchors.md b/bundle/docsgen/testdata/anchors.md deleted file mode 100644 index 43f79c975ad..00000000000 --- a/bundle/docsgen/testdata/anchors.md +++ /dev/null @@ -1,29 +0,0 @@ -Header - -## some_field - -**`Type: Map`** - -This is a description - - - -:::list-table - -- - Key - - Type - - Description - -- - `my_attribute` - - Map - - Desc with link. See [\_](#some_fieldnamemy_attribute). - -::: - - -### some_field._name_.my_attribute - -**`Type: Boolean`** - -Another description - \ No newline at end of file diff --git a/libs/jsonschema/from_type.go b/libs/jsonschema/from_type.go index 4966e49596c..08eaf715f22 100644 --- a/libs/jsonschema/from_type.go +++ b/libs/jsonschema/from_type.go @@ -113,10 +113,6 @@ func FromType(typ reflect.Type, fns []func(typ reflect.Type, s Schema) Schema) ( return res, nil } -func TypePath(typ reflect.Type) string { - return typePath(typ) -} - // typePath computes a unique string representation of the type. $ref in the generated // JSON schema will refer to this path. See TestTypePath for examples outputs. func typePath(typ reflect.Type) string {