From 03178de64751e7d74ec0732787d7fe90032a0f55 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Fri, 12 Jun 2026 15:49:32 +0200 Subject: [PATCH 1/8] Consolidate bundle schema annotations into one tree-structured file Drop the checked-in annotations_openapi.yml: the schema generator now derives those annotations from .codegen/cli.json in memory on every run. Merge annotations.yml and annotations_openapi_overrides.yml into a single annotations.yml whose structure mirrors the bundle configuration tree. Docs absent from the file inherit from cli.json; entries override them. The generated jsonschema.json and jsonschema_for_docs.json are unchanged. Co-authored-by: Isaac --- .agent/rules/auto-generated-files.md | 4 +- Taskfile.yml | 37 +- bundle/internal/annotation/file.go | 41 +- bundle/internal/schema/.gitattributes | 1 - bundle/internal/schema/annotations.go | 133 +- bundle/internal/schema/annotations.yml | 3551 ++++++--- bundle/internal/schema/annotations_file.go | 348 + .../internal/schema/annotations_file_test.go | 150 + .../internal/schema/annotations_openapi.yml | 6947 ----------------- .../schema/annotations_openapi_overrides.yml | 1166 --- bundle/internal/schema/main.go | 61 +- bundle/internal/schema/main_test.go | 101 +- bundle/internal/schema/parser.go | 86 +- bundle/internal/schema/typegraph.go | 149 + bundle/internal/schema/typegraph_test.go | 76 + 15 files changed, 3181 insertions(+), 9670 deletions(-) delete mode 100644 bundle/internal/schema/.gitattributes create mode 100644 bundle/internal/schema/annotations_file.go create mode 100644 bundle/internal/schema/annotations_file_test.go delete mode 100644 bundle/internal/schema/annotations_openapi.yml delete mode 100644 bundle/internal/schema/annotations_openapi_overrides.yml create mode 100644 bundle/internal/schema/typegraph.go create mode 100644 bundle/internal/schema/typegraph_test.go diff --git a/.agent/rules/auto-generated-files.md b/.agent/rules/auto-generated-files.md index 97ababe8727..92bd965d3be 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/internal/schema/annotations_openapi.yml" - "bundle/internal/validation/generated/*.go" - "bundle/schema/jsonschema.json" - "bundle/schema/jsonschema_for_docs.json" @@ -35,7 +34,6 @@ paths: - "internal/genkit/tagging.py" - "internal/mocks/**/*.go" - "bundle/direct/dresources/*.generated.yml" - - "bundle/internal/schema/annotations_openapi.yml" - "bundle/internal/validation/generated/*.go" - "bundle/schema/jsonschema.json" - "bundle/schema/jsonschema_for_docs.json" @@ -72,7 +70,7 @@ Files matching this rule's glob pattern are most likely generated artifacts. Aut - Bundle schemas: - `./task generate-schema` - `./task generate-schema-docs` - - This can also refresh `bundle/internal/schema/annotations_openapi.yml` when OpenAPI annotation extraction is enabled. + - Both rewrite `bundle/internal/schema/annotations.yml` in place: upstream docs are sourced from `.codegen/cli.json` at generation time, and the file is synced with the config structure (placeholders added, stale entries dropped). - Validation generated code: - `./task generate-validation` - Mock files: diff --git a/Taskfile.yml b/Taskfile.yml index d72140290e2..488e2284cc6 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -856,35 +856,17 @@ tasks: cmds: - go test ./acceptance -run TestAccept/bundle/refschema -update - # 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 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 and generate-schema-docs; `run: once` - # plus the fingerprint keep `task generate` from re-running it per parent. - run: once - sources: - - .codegen/cli.json - - bundle/internal/schema/**/*.go - - bundle/internal/schema/annotations*.yml - - go.mod - - go.sum - generates: - - bundle/internal/schema/annotations_openapi.yml - - bundle/internal/schema/annotations.yml - - bundle/schema/jsonschema.json - cmds: - - "DATABRICKS_CLI_JSON=.codegen/cli.json go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json" - + # Upstream field documentation comes from the checked-in .codegen/cli.json; + # bundle/internal/schema/annotations.yml carries the CLI-owned docs and + # overrides and is rewritten in place (synced with the config structure). + # Editing either input and running `task generate` percolates into + # jsonschema.json, jsonschema_for_docs.json and pydabs. generate-schema: desc: Generate bundle JSON schema - deps: ['generate-annotations'] sources: &SCHEMA_SOURCES - "**/*.go" - - bundle/internal/schema/annotations*.yml + - .codegen/cli.json + - bundle/internal/schema/annotations.yml - exclude: "**/*_test.go" - go.mod - go.sum @@ -893,11 +875,10 @@ tasks: - bundle/schema/jsonschema.json - bundle/internal/schema/annotations.yml cmds: - - "go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json" + - "go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema.json .codegen/cli.json" generate-schema-docs: desc: Generate bundle JSON schema for documentation - deps: ['generate-annotations'] sources: *SCHEMA_SOURCES generates: - bundle/schema/jsonschema_for_docs.json @@ -908,7 +889,7 @@ tasks: # silently dropped from the output. Restore the fetch that lived in the # old tools/post-generate.sh. - git fetch origin 'refs/tags/v*:refs/tags/v*' - - "go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema_for_docs.json --docs" + - "go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema_for_docs.json .codegen/cli.json --docs" generate-validation: desc: Generate enum and required field validation code diff --git a/bundle/internal/annotation/file.go b/bundle/internal/annotation/file.go index 0317f441a03..6f2b294cc15 100644 --- a/bundle/internal/annotation/file.go +++ b/bundle/internal/annotation/file.go @@ -1,44 +1,11 @@ package annotation -import ( - "bytes" - "os" - - "github.com/databricks/cli/libs/dyn" - "github.com/databricks/cli/libs/dyn/convert" - "github.com/databricks/cli/libs/dyn/merge" - "github.com/databricks/cli/libs/dyn/yamlloader" -) - -// Parsed file with annotations, expected format: +// File is the in-memory representation of the annotations, keyed by Go type +// path and field name, e.g.: // github.com/databricks/cli/bundle/config.Bundle: // // cluster_id: // description: "Description" +// +// The key "_" holds the annotation for the type itself. type File map[string]map[string]Descriptor - -func LoadAndMerge(sources []string) (File, error) { - prev := dyn.NilValue - for _, path := range sources { - b, err := os.ReadFile(path) - if err != nil { - return nil, err - } - generated, err := yamlloader.LoadYAML(path, bytes.NewBuffer(b)) - if err != nil { - return nil, err - } - prev, err = merge.Merge(prev, generated) - if err != nil { - return nil, err - } - } - - var data File - - err := convert.ToTyped(&data, prev) - if err != nil { - return nil, err - } - return data, nil -} diff --git a/bundle/internal/schema/.gitattributes b/bundle/internal/schema/.gitattributes deleted file mode 100644 index 676640bbcca..00000000000 --- a/bundle/internal/schema/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -annotations_openapi.yml linguist-generated=true diff --git a/bundle/internal/schema/annotations.go b/bundle/internal/schema/annotations.go index 2889fffe81c..b68260f7ee4 100644 --- a/bundle/internal/schema/annotations.go +++ b/bundle/internal/schema/annotations.go @@ -1,44 +1,64 @@ package main import ( - "bytes" "fmt" - "maps" - "os" "reflect" "regexp" - "slices" "strings" - yaml3 "go.yaml.in/yaml/v3" - "github.com/databricks/cli/bundle/internal/annotation" "github.com/databricks/cli/libs/dyn" "github.com/databricks/cli/libs/dyn/convert" "github.com/databricks/cli/libs/dyn/merge" - "github.com/databricks/cli/libs/dyn/yamlloader" - "github.com/databricks/cli/libs/dyn/yamlsaver" "github.com/databricks/cli/libs/jsonschema" ) type annotationHandler struct { - // Annotations read from all annotation files including all overrides + // Annotations from cli.json merged with the annotations file. parsedAnnotations annotation.File + // Annotations from the annotations file only: the content the CLI owns + // and rewrites during sync. + fileAnnotations annotation.File // Missing annotations for fields that are found in config that need to be added to the annotation file missingAnnotations annotation.File } // Adds annotations to the JSON schema reading from the annotation files. // More details https://json-schema.org/understanding-json-schema/reference/annotations -func newAnnotationHandler(sources []string) (*annotationHandler, error) { - data, err := annotation.LoadAndMerge(sources) +func newAnnotationHandler(extracted, fromFile annotation.File) (*annotationHandler, error) { + merged, err := mergeAnnotationFiles(extracted, fromFile) if err != nil { return nil, err } - d := &annotationHandler{} - d.parsedAnnotations = data - d.missingAnnotations = annotation.File{} - return d, nil + return &annotationHandler{ + parsedAnnotations: merged, + fileAnnotations: fromFile, + missingAnnotations: annotation.File{}, + }, nil +} + +// mergeAnnotationFiles merges later layers over earlier ones with the same +// semantics the on-disk annotation files used to be merged with: maps merge +// recursively, scalars take the later value, sequences concatenate. +func mergeAnnotationFiles(files ...annotation.File) (annotation.File, error) { + prev := dyn.NilValue + for _, f := range files { + v, err := convert.FromTyped(f, dyn.NilValue) + if err != nil { + return nil, err + } + prev, err = merge.Merge(prev, v) + if err != nil { + return nil, err + } + } + + var data annotation.File + err := convert.ToTyped(&data, prev) + if err != nil { + return nil, err + } + return data, nil } func (d *annotationHandler) addAnnotations(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { @@ -68,50 +88,28 @@ func (d *annotationHandler) addAnnotations(typ reflect.Type, s jsonschema.Schema emptyAnnotations = map[string]annotation.Descriptor{} d.missingAnnotations[refPath] = emptyAnnotations } - emptyAnnotations[k] = item + emptyAnnotations[k] = annotation.Descriptor{Description: annotation.Placeholder} } assignAnnotation(v, item) } return s } -// Writes missing annotations with placeholder values back to the annotation file -func (d *annotationHandler) syncWithMissingAnnotations(outputPath string) error { - existingFile, err := os.ReadFile(outputPath) - if err != nil { - return err - } - existing, err := yamlloader.LoadYAML("", bytes.NewBuffer(existingFile)) +// Writes the annotations file back in canonical form, adding placeholder +// descriptions for fields that have no documentation anywhere. Entries for +// fields that no longer exist in the config are dropped with a warning. +func (d *annotationHandler) syncWithMissingAnnotations(outputPath string, g *typeGraph) error { + updated, err := mergeAnnotationFiles(d.fileAnnotations, d.missingAnnotations) if err != nil { return err } - for k := range d.missingAnnotations { - if !isCliPath(k) { - delete(d.missingAnnotations, k) - fmt.Printf("Missing annotations for `%s` that are not in CLI package, try to refresh .codegen/cli.json and regenerate annotations\n", k) - } - } - - missingAnnotations, err := convert.FromTyped(d.missingAnnotations, dyn.NilValue) + detached, err := saveAnnotationsFile(outputPath, updated, g) if err != nil { return err } - - output, err := merge.Merge(existing, missingAnnotations) - if err != nil { - return err - } - - var outputTyped annotation.File - err = convert.ToTyped(&outputTyped, output) - if err != nil { - return err - } - - err = saveYamlWithStyle(outputPath, outputTyped) - if err != nil { - return err + for _, k := range detached { + fmt.Printf("Dropping annotation for `%s`: no such field in the bundle configuration\n", k) } return nil } @@ -148,45 +146,6 @@ func assignAnnotation(s *jsonschema.Schema, a annotation.Descriptor) { s.Enum = a.Enum } -func saveYamlWithStyle(outputPath string, annotations annotation.File) error { - annotationOrder := yamlsaver.NewOrder([]string{"description", "markdown_description", "title", "default", "enum"}) - style := map[string]yaml3.Style{} - - order := getAlphabeticalOrder(annotations) - dynMap := map[string]dyn.Value{} - for k, v := range annotations { - style[k] = yaml3.LiteralStyle - - properties := map[string]dyn.Value{} - propertiesOrder := getAlphabeticalOrder(v) - for key, value := range v { - d, err := convert.FromTyped(value, dyn.NilValue) - if d.Kind() == dyn.KindNil || err != nil { - properties[key] = dyn.NewValue(map[string]dyn.Value{}, []dyn.Location{{Line: propertiesOrder.Get(key)}}) - continue - } - val, err := yamlsaver.ConvertToMapValue(value, annotationOrder, []string{}, map[string]dyn.Value{}) - if err != nil { - return err - } - properties[key] = val.WithLocations([]dyn.Location{{Line: propertiesOrder.Get(key)}}) - } - - dynMap[k] = dyn.NewValue(properties, []dyn.Location{{Line: order.Get(k)}}) - } - - saver := yamlsaver.NewSaverWithStyle(style) - err := saver.SaveAsYAML(dynMap, outputPath, true) - if err != nil { - return err - } - return nil -} - -func getAlphabeticalOrder[T any](mapping map[string]T) *yamlsaver.Order { - return yamlsaver.NewOrder(slices.Sorted(maps.Keys(mapping))) -} - func convertLinksToAbsoluteUrl(s string) string { if s == "" { return s @@ -232,7 +191,3 @@ func convertLinksToAbsoluteUrl(s string) string { return result } - -func isCliPath(path string) bool { - return !strings.HasPrefix(path, "github.com/databricks/databricks-sdk-go") -} diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 69d7c9d025d..0187b406beb 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -1,1211 +1,2352 @@ -github.com/databricks/cli/bundle/config.Artifact: - "build": - "description": |- - An optional set of build commands to run locally before deployment. - "dynamic_version": - "description": |- - 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": - "description": |- - The executable type. Valid values are `bash`, `sh`, and `cmd`. - "files": - "description": |- - The relative or absolute path to the built artifact files. - "path": - "description": |- - The local path of the directory for the artifact. - "type": - "description": |- - Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. - "markdown_description": |- - Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. -github.com/databricks/cli/bundle/config.ArtifactFile: - "source": - "description": |- - Required. The artifact source file. -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": |- - Deprecated. The ID of the compute to use to run the bundle. - "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 [\_](/dev-tools/bundles/deployment-modes.md). - "engine": - "description": |- - The deployment engine to use. Valid values are `terraform` and `direct`. Takes priority over `DATABRICKS_BUNDLE_ENGINE` environment variable. Default is "terraform". - "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 [\_](/dev-tools/bundles/settings.md#git). - "name": - "description": |- - The name of the bundle. - "uuid": - "description": |- - 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). -github.com/databricks/cli/bundle/config.Deployment: - "fail_on_active_runs": - "description": |- - Whether to fail on active runs. If this is set to true a deployment that is running can be interrupted. - "lock": - "description": |- - The deployment lock attributes. -github.com/databricks/cli/bundle/config.Experimental: - "pydabs": - "description": |- - The PyDABs configuration. - "deprecation_message": |- - Deprecated: please use python instead - "python": - "description": |- - Configures loading of Python code defined with 'databricks-bundles' package. - "python_wheel_wrapper": - "description": |- - Whether to use a Python wheel wrapper. - "record_deployment_history": - "description": |- - Whether to record deployment history using the deployment metadata service (DMS), which tracks what changed across deployments. - "scripts": - "description": |- - The commands to run. - "skip_artifact_cleanup": - "description": |- - Determines whether to skip cleaning up the .internal folder - "skip_name_prefix_for_schema": - "description": |- - 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": - "description": |- - Whether to use the legacy run_as behavior. -github.com/databricks/cli/bundle/config.Git: - "branch": - "description": |- - The Git branch name. - "markdown_description": |- - The Git branch name. See [\_](/dev-tools/bundles/settings.md#git). - "origin_url": - "description": |- - The origin URL of the repository. - "markdown_description": |- - The origin URL of the repository. See [\_](/dev-tools/bundles/settings.md#git). -github.com/databricks/cli/bundle/config.Lock: - "enabled": - "description": |- - Whether this lock is enabled. - "force": - "description": |- - Whether to force this lock if it is enabled. -github.com/databricks/cli/bundle/config.Presets: - "artifacts_dynamic_version": - "description": |- - Whether to enable dynamic_version on all artifacts. - "jobs_max_concurrent_runs": - "description": |- - The maximum concurrent runs for a job. - "name_prefix": - "description": |- - The prefix for job runs of the bundle. - "pipelines_development": - "description": |- - Whether pipeline deployments should be locked in development mode. - "source_linked_deployment": - "description": |- - Whether to link the deployment to the bundle source. - "tags": - "description": |- - The tags for the bundle deployment. - "trigger_pause_status": - "description": |- - A pause status to apply to all job triggers and schedules. Valid values are PAUSED or UNPAUSED. -github.com/databricks/cli/bundle/config.PyDABs: - "enabled": - "description": |- - Whether or not PyDABs (Private Preview) is enabled - "import": - "description": |- - The PyDABs project to import to discover resources, resource generator and mutators - "venv_path": - "description": |- - The Python virtual environment path -github.com/databricks/cli/bundle/config.Python: - "mutators": - "description": |- - Mutators contains a list of fully qualified function paths to mutator functions. +# This file contains the documentation the CLI owns for the bundle +# configuration JSON schema: docs for fields that do not exist in the upstream +# API spec (.codegen/cli.json), and overrides of upstream docs. Documentation +# for everything else is inherited from cli.json at generation time and must +# not be duplicated here. +# +# The structure mirrors the bundle configuration tree: +# - A node documents one field: its inline keys (description, +# markdown_description, ...) apply to the field itself, and "fields" holds +# the nodes of the type the field resolves to (map and sequence levels are +# unwrapped implicitly). +# - "_" inside "fields" documents the resolved type itself; for enum types +# it carries the enum values. +# - Each type is expanded exactly once, at its first occurrence; fields of +# types that occur again later (for example everything under "targets") +# are documented at that first occurrence. +# - "description: PLACEHOLDER" marks fields that have no documentation yet. +# +# Running "task generate-schema" keeps this file in sync with the +# configuration structure: it adds placeholders for new undocumented fields +# and drops entries for fields that no longer exist. +artifacts: + "description": |- + Defines the attributes to build an artifact + "markdown_description": |- + 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). - Example: ["my_project.mutators:add_default_cluster"] - "resources": - "description": |- - Resources contains a list of fully qualified function paths to load resources - defined in Python code. + 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). + "markdown_examples": |- + ```yaml + artifacts: + default: + type: whl + build: poetry build + path: . + ``` + "fields": + "build": + "description": |- + An optional set of build commands to run locally before deployment. + "dynamic_version": + "description": |- + 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": + "description": |- + The executable type. Valid values are `bash`, `sh`, and `cmd`. + "files": + "description": |- + The relative or absolute path to the built artifact files. + "fields": + "source": + "description": |- + Required. The artifact source file. + "path": + "description": |- + The local path of the directory for the artifact. + "type": + "description": |- + Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. + "markdown_description": |- + Required if the artifact is a Python wheel. The type of the artifact. Valid values are `whl` and `jar`. +bundle: + "description": |- + The bundle attributes when deploying to this target. + "markdown_description": |- + The bundle attributes when deploying to this target, + "fields": + "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": |- + Deprecated. The ID of the compute to use to run the bundle. + "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 [\_](/dev-tools/bundles/deployment-modes.md). + "fields": + "fail_on_active_runs": + "description": |- + Whether to fail on active runs. If this is set to true a deployment that is running can be interrupted. + "lock": + "description": |- + The deployment lock attributes. + "fields": + "enabled": + "description": |- + Whether this lock is enabled. + "force": + "description": |- + Whether to force this lock if it is enabled. + "engine": + "description": |- + The deployment engine to use. Valid values are `terraform` and `direct`. Takes priority over `DATABRICKS_BUNDLE_ENGINE` environment variable. Default is "terraform". + "fields": + "_": + "enum": + - |- + terraform + - |- + direct + "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 [\_](/dev-tools/bundles/settings.md#git). + "fields": + "branch": + "description": |- + The Git branch name. + "markdown_description": |- + The Git branch name. See [\_](/dev-tools/bundles/settings.md#git). + "origin_url": + "description": |- + The origin URL of the repository. + "markdown_description": |- + The origin URL of the repository. See [\_](/dev-tools/bundles/settings.md#git). + "name": + "description": |- + The name of the bundle. + "uuid": + "description": |- + 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). +environments: + "description": |- + PLACEHOLDER + "deprecation_message": |- + Deprecated: please use targets instead +experimental: + "description": |- + Defines attributes for experimental features. + "fields": + "pydabs": + "description": |- + The PyDABs configuration. + "deprecation_message": |- + Deprecated: please use python instead + "fields": + "enabled": + "description": |- + Whether or not PyDABs (Private Preview) is enabled + "python": + "description": |- + Configures loading of Python code defined with 'databricks-bundles' package. + "fields": + "mutators": + "description": |- + Mutators contains a list of fully qualified function paths to mutator functions. - Example: ["my_project.resources:load_resources"] - "venv_path": - "description": |- - VEnvPath is path to the virtual environment. + Example: ["my_project.mutators:add_default_cluster"] + "resources": + "description": |- + Resources contains a list of fully qualified function paths to load resources + defined in Python code. - If enabled, Python code will execute within this environment. If disabled, - it defaults to using the Python interpreter available in the current shell. -github.com/databricks/cli/bundle/config.Resources: - "alerts": - "description": |- - PLACEHOLDER - "apps": - "description": |- - The app resource defines a Databricks app. - "markdown_description": |- - The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). - "catalogs": - "description": |- - PLACEHOLDER - "clusters": - "description": |- - The cluster definitions for the bundle, where each key is the name of a cluster. - "markdown_description": |- - The cluster definitions for the bundle, where each key is the name of a cluster. See [\_](/dev-tools/bundles/resources.md#clusters). - "dashboards": - "description": |- - The dashboard definitions for the bundle, where each key is the name of the dashboard. - "markdown_description": |- - The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). - "database_catalogs": - "description": |- - PLACEHOLDER - "database_instances": - "description": |- - PLACEHOLDER - "experiments": - "description": |- - The experiment definitions for the bundle, where each key is the name of the experiment. - "markdown_description": |- - The experiment definitions for the bundle, where each key is the name of the experiment. See [\_](/dev-tools/bundles/resources.md#experiments). - "external_locations": - "description": |- - PLACEHOLDER - "genie_spaces": - "description": |- - PLACEHOLDER - "jobs": - "description": |- - The job definitions for the bundle, where each key is the name of the job. - "markdown_description": |- - 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": - "description": |- - The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. - "markdown_description": |- - 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": - "description": |- - The model definitions for the bundle, where each key is the name of the model. - "markdown_description": |- - The model definitions for the bundle, where each key is the name of the model. See [\_](/dev-tools/bundles/resources.md#models). - "pipelines": - "description": |- - The pipeline definitions for the bundle, where each key is the name of the pipeline. - "markdown_description": |- - The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). - "postgres_branches": - "description": |- - PLACEHOLDER - "postgres_catalogs": - "description": |- - 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. - "postgres_endpoints": - "description": |- - PLACEHOLDER - "postgres_projects": - "description": |- - PLACEHOLDER - "postgres_synced_tables": - "description": |- - 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. - "quality_monitors": - "description": |- - The quality monitor definitions for the bundle, where each key is the name of the quality monitor. - "markdown_description": |- - 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": - "description": |- - The registered model definitions for the bundle, where each key is the name of the Unity Catalog registered model. - "markdown_description": |- - 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": - "description": |- - The schema definitions for the bundle, where each key is the name of the schema. - "markdown_description": |- - The schema definitions for the bundle, where each key is the name of the schema. See [\_](/dev-tools/bundles/resources.md#schemas). - "secret_scopes": - "description": |- - The secret scope definitions for the bundle, where each key is the name of the secret scope. - "markdown_description": |- - 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). - "sql_warehouses": - "description": |- - The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. - "markdown_description": |- - 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": - "description": |- - PLACEHOLDER - "vector_search_endpoints": - "description": |- - PLACEHOLDER - "vector_search_indexes": - "description": |- - PLACEHOLDER - "volumes": - "description": |- - The volume definitions for the bundle, where each key is the name of the volume. - "markdown_description": |- - The volume definitions for the bundle, where each key is the name of the volume. See [\_](/dev-tools/bundles/resources.md#volumes). -github.com/databricks/cli/bundle/config.Root: - "artifacts": - "description": |- - Defines the attributes to build an artifact - "markdown_description": |- - 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). + Example: ["my_project.resources:load_resources"] + "venv_path": + "description": |- + VEnvPath is path to the virtual environment. - 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). - "markdown_examples": |- - ```yaml - artifacts: - default: - type: whl - build: poetry build - path: . - ``` - "bundle": - "description": |- - The bundle attributes when deploying to this target. - "markdown_description": |- - The bundle attributes when deploying to this target, - "environments": - "description": |- - PLACEHOLDER - "deprecation_message": |- - Deprecated: please use targets instead - "experimental": - "description": |- - Defines attributes for experimental features. - "include": - "description": |- - Specifies a list of path globs that contain configuration files to include within the bundle. - "markdown_description": |- - Specifies a list of path globs that contain configuration files to include within the bundle. See [\_](/dev-tools/bundles/settings.md#include). - "permissions": - "description": |- - Defines a permission for a specific entity. - "markdown_description": |- - 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. + If enabled, Python code will execute within this environment. If disabled, + it defaults to using the Python interpreter available in the current shell. + "python_wheel_wrapper": + "description": |- + Whether to use a Python wheel wrapper. + "record_deployment_history": + "description": |- + Whether to record deployment history using the deployment metadata service (DMS), which tracks what changed across deployments. + "scripts": + "description": |- + The commands to run. + "skip_artifact_cleanup": + "description": |- + Determines whether to skip cleaning up the .internal folder + "skip_name_prefix_for_schema": + "description": |- + 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": + "description": |- + Whether to use the legacy run_as behavior. +include: + "description": |- + Specifies a list of path globs that contain configuration files to include within the bundle. + "markdown_description": |- + Specifies a list of path globs that contain configuration files to include within the bundle. See [\_](/dev-tools/bundles/settings.md#include). +permissions: + "description": |- + Defines a permission for a specific entity. + "markdown_description": |- + 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). - "markdown_examples": |- - ```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": - "description": |- - Defines bundle deployment presets. - "markdown_description": |- - Defines bundle deployment presets. See [\_](/dev-tools/bundles/deployment-modes.md#presets). - "python": - "description": |- - PLACEHOLDER - "resources": - "description": |- - 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. - "markdown_description": |- - 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). + See [\_](/dev-tools/bundles/settings.md#permissions) and [\_](/dev-tools/bundles/permissions.md). + "markdown_examples": |- + ```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: + "description": |- + Defines bundle deployment presets. + "markdown_description": |- + Defines bundle deployment presets. See [\_](/dev-tools/bundles/deployment-modes.md#presets). +python: + "description": |- + PLACEHOLDER +resources: + "description": |- + 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. + "markdown_description": |- + 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: - : - : - : - ``` - "run_as": - "description": |- - The identity to use when running Declarative Automation Bundles resources. - "markdown_description": |- - The identity to use when running Declarative Automation Bundles resources. See [\_](/dev-tools/bundles/run-as.md). - "scripts": - "description": |- - PLACEHOLDER - "sync": - "description": |- - The files and file paths to include or exclude in the bundle. - "markdown_description": |- - The files and file paths to include or exclude in the bundle. See [\_](/dev-tools/bundles/settings.md#sync). - "targets": - "description": |- - Defines deployment targets for the bundle. - "markdown_description": |- - Defines deployment targets for the bundle. See [\_](/dev-tools/bundles/settings.md#targets) - "variables": - "description": |- - A Map that defines the custom variables for the bundle, where each key is the name of the variable, and the value is a Map that defines the variable. - "workspace": - "description": |- - Defines the Databricks workspace for the bundle. - "markdown_description": |- - Defines the Databricks workspace for the bundle. See [\_](/dev-tools/bundles/settings.md#workspace). -github.com/databricks/cli/bundle/config.Script: - "content": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config.Sync: - "exclude": - "description": |- - A list of files or folders to exclude from the bundle. - "include": - "description": |- - A list of files or folders to include in the bundle. - "paths": - "description": |- - The local folder paths, which can be outside the bundle root, to synchronize to the workspace when the bundle is deployed. -github.com/databricks/cli/bundle/config.Target: - "artifacts": - "description": |- - The artifacts to include in the target deployment. - "bundle": - "description": |- - The bundle attributes when deploying to this target. - "cluster_id": - "description": |- - The ID of the cluster to use for this target. - "compute_id": - "description": |- - Deprecated. The ID of the compute to use for this target. - "deprecation_message": |- - Deprecated: please use cluster_id instead - "default": - "description": |- - Whether this target is the default target. - "git": - "description": |- - The Git version control settings for the target. - "mode": - "description": |- - The deployment mode for the target. - "markdown_description": |- - The deployment mode for the target. Valid values are `development` or `production`. See [\_](/dev-tools/bundles/deployment-modes.md). - "permissions": - "description": |- - The permissions for deploying and running the bundle in the target. - "presets": - "description": |- - The deployment presets for the target. - "resources": - "description": |- - The resource definitions for the target. - "run_as": - "description": |- - The identity to use to run the bundle. - "markdown_description": |- - The identity to use to run the bundle, see [\_](/dev-tools/bundles/run-as.md). - "sync": - "description": |- - The local paths to sync to the target workspace when a bundle is run or deployed. - "variables": - "description": |- - The custom variable definitions for the target. - "workspace": - "description": |- - The Databricks workspace for the target. -github.com/databricks/cli/bundle/config.Workspace: - "account_id": - "description": |- - The Databricks account ID. - "artifact_path": - "description": |- - The artifact path to use within the workspace for both deployments and job runs - "auth_type": - "description": |- - The authentication type. - "azure_client_id": - "description": |- - The Azure client ID - "azure_environment": - "description": |- - The Azure environment - "azure_login_app_id": - "description": |- - The Azure login app ID - "azure_tenant_id": - "description": |- - The Azure tenant ID - "azure_use_msi": - "description": |- - Whether to use MSI for Azure - "azure_workspace_resource_id": - "description": |- - The Azure workspace resource ID - "client_id": - "description": |- - The client ID for the workspace - "experimental_is_unified_host": - "description": |- - 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": - "description": |- - The file path to use within the workspace for both deployments and job runs - "google_service_account": - "description": |- - The Google service account name - "host": - "description": |- - The Databricks workspace host URL - "profile": - "description": |- - The Databricks workspace profile name - "resource_path": - "description": |- - The workspace resource path - "root_path": - "description": |- - The Databricks workspace root path - "state_path": - "description": |- - The workspace state path - "workspace_id": - "description": |- - The Databricks workspace ID -github.com/databricks/cli/bundle/config/engine.EngineType: - "_": - "enum": - - |- - terraform - - |- - direct -github.com/databricks/cli/bundle/config/resources.Alert: - "create_time": - "description": |- - PLACEHOLDER - "custom_description": - "description": |- - PLACEHOLDER - "custom_summary": - "description": |- - PLACEHOLDER - "display_name": - "description": |- - PLACEHOLDER - "effective_run_as": - "description": |- - PLACEHOLDER - "id": - "description": |- - PLACEHOLDER - "lifecycle_state": - "description": |- - PLACEHOLDER - "owner_user_name": - "description": |- - PLACEHOLDER - "parent_path": - "description": |- - PLACEHOLDER - "query_text": - "description": |- - PLACEHOLDER - "run_as": - "description": |- - PLACEHOLDER - "run_as_user_name": - "description": |- - PLACEHOLDER - "update_time": - "description": |- - PLACEHOLDER - "warehouse_id": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.App: - "compute_max_instances": - "description": |- - PLACEHOLDER - "compute_min_instances": - "description": |- - PLACEHOLDER - "git_source": - "description": |- - 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. - "thumbnail_url": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.AppConfig: - "command": - "description": |- - PLACEHOLDER - "env": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.AppEnvVar: - "name": - "description": |- - PLACEHOLDER - "value": - "description": |- - PLACEHOLDER - "value_from": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.AppPermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Catalog: - "comment": - "description": |- - PLACEHOLDER - "connection_name": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "options": - "description": |- - PLACEHOLDER - "properties": - "description": |- - PLACEHOLDER - "provider_name": - "description": |- - PLACEHOLDER - "share_name": - "description": |- - PLACEHOLDER - "storage_root": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.ClusterPermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Dashboard: - "dataset_catalog": - "description": |- - Sets the default catalog for all datasets in this dashboard. When set, this overrides the catalog specified in individual dataset definitions. - "dataset_schema": - "description": |- - Sets the default schema for all datasets in this dashboard. When set, this overrides the schema specified in individual dataset definitions. -github.com/databricks/cli/bundle/config/resources.DatabaseInstance: - "effective_capacity": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.ExternalLocation: - "comment": - "description": |- - PLACEHOLDER - "credential_name": - "description": |- - PLACEHOLDER - "enable_file_events": - "description": |- - PLACEHOLDER - "encryption_details": - "description": |- - PLACEHOLDER - "fallback": - "description": |- - PLACEHOLDER - "file_event_queue": - "description": |- - PLACEHOLDER - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "read_only": - "description": |- - PLACEHOLDER - "skip_validation": - "description": |- - PLACEHOLDER - "url": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.GenieSpace: - "description": - "description": |- - Description of the Genie space shown alongside the title in the Databricks UI. - "etag": - "description": |- - PLACEHOLDER - "file_path": - "description": |- - 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": - "description": |- - PLACEHOLDER - "parent_path": - "description": |- - Workspace folder under which to create the Genie space. Immutable: changing this field recreates the resource. - "permissions": - "description": |- - PLACEHOLDER - "serialized_space": - "description": |- - 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`. - "space_id": - "description": |- - PLACEHOLDER - "title": - "description": |- - Title of the Genie space shown in the Databricks UI. - "warehouse_id": - "description": |- - ID of the SQL warehouse used to run queries for this Genie space. -github.com/databricks/cli/bundle/config/resources.JobPermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Lifecycle: - "prevent_destroy": - "description": |- - Lifecycle setting to prevent the resource from being destroyed. -github.com/databricks/cli/bundle/config/resources.LifecycleWithStarted: - "prevent_destroy": - "description": |- - Lifecycle setting to prevent the resource from being destroyed. - "started": - "description": |- - Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. -github.com/databricks/cli/bundle/config/resources.MlflowExperimentPermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.MlflowModelPermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.ModelServingEndpointPermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Permission: - "-": - "description": |- - Defines a permission for a specific entity. - "markdown_description": |- - Defines a permission for a specific entity. See [\_](/dev-tools/bundles/settings.md#permissions) and [\_](/dev-tools/bundles/permissions.md). - "group_name": - "description": |- - The name of the group that has the permission set in level. - "level": - "description": |- - The allowed permission for user, group, service principal defined for this permission. - "service_principal_name": - "description": |- - The name of the service principal that has the permission set in level. - "user_name": - "description": |- - The name of the user that has the permission set in level. -github.com/databricks/cli/bundle/config/resources.Pipeline: - "parameters": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.PipelinePermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.PostgresBranch: - "branch_id": - "description": |- - PLACEHOLDER - "create_time": - "description": |- - PLACEHOLDER - "expire_time": - "description": |- - PLACEHOLDER - "is_protected": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "no_expiry": - "description": |- - PLACEHOLDER - "parent": - "description": |- - PLACEHOLDER - "replace_existing": - "description": |- - PLACEHOLDER - "source_branch": - "description": |- - PLACEHOLDER - "source_branch_lsn": - "description": |- - PLACEHOLDER - "source_branch_time": - "description": |- - PLACEHOLDER - "spec": - "description": |- - PLACEHOLDER - "status": - "description": |- - PLACEHOLDER - "ttl": - "description": |- - PLACEHOLDER - "uid": - "description": |- - PLACEHOLDER - "update_time": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.PostgresCatalog: - "branch": - "description": |- - PLACEHOLDER - "catalog_id": - "description": |- - PLACEHOLDER - "create_database_if_missing": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "postgres_database": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.PostgresEndpoint: - "autoscaling_limit_max_cu": - "description": |- - PLACEHOLDER - "autoscaling_limit_min_cu": - "description": |- - PLACEHOLDER - "create_time": - "description": |- - PLACEHOLDER - "disabled": - "description": |- - PLACEHOLDER - "endpoint_id": - "description": |- - PLACEHOLDER - "endpoint_type": - "description": |- - PLACEHOLDER - "group": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "no_suspension": - "description": |- - PLACEHOLDER - "parent": - "description": |- - PLACEHOLDER - "replace_existing": - "description": |- - PLACEHOLDER - "settings": - "description": |- - PLACEHOLDER - "spec": - "description": |- - PLACEHOLDER - "status": - "description": |- - PLACEHOLDER - "suspend_timeout_duration": - "description": |- - PLACEHOLDER - "uid": - "description": |- - PLACEHOLDER - "update_time": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.PostgresProject: - "budget_policy_id": - "description": |- - PLACEHOLDER - "create_time": - "description": |- - PLACEHOLDER - "custom_tags": - "description": |- - PLACEHOLDER - "default_branch": - "description": |- - PLACEHOLDER - "default_endpoint_settings": - "description": |- - PLACEHOLDER - "display_name": - "description": |- - PLACEHOLDER - "enable_pg_native_login": - "description": |- - PLACEHOLDER - "history_retention_duration": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "permissions": - "description": |- - PLACEHOLDER - "pg_version": - "description": |- - PLACEHOLDER - "project_id": - "description": |- - PLACEHOLDER - "purge_on_delete": - "description": |- - PLACEHOLDER - "spec": - "description": |- - PLACEHOLDER - "status": - "description": |- - PLACEHOLDER - "uid": - "description": |- - PLACEHOLDER - "update_time": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.PostgresSyncedTable: - "branch": - "description": |- - PLACEHOLDER - "create_database_objects_if_missing": - "description": |- - PLACEHOLDER - "existing_pipeline_id": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "new_pipeline_spec": - "description": |- - PLACEHOLDER - "postgres_database": - "description": |- - PLACEHOLDER - "primary_key_columns": - "description": |- - PLACEHOLDER - "scheduling_policy": - "description": |- - PLACEHOLDER - "source_table_full_name": - "description": |- - PLACEHOLDER - "synced_table_id": - "description": |- - PLACEHOLDER - "timeseries_key": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.SecretScope: - "backend_type": - "description": |- - The backend type the scope will be created with. If not specified, will default to `DATABRICKS` - "keyvault_metadata": - "description": |- - The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT` - "lifecycle": - "description": |- - 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. - "name": - "description": |- - Scope name requested by the user. Scope names are unique. - "permissions": - "description": |- - The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. -github.com/databricks/cli/bundle/config/resources.SecretScopePermission: - "group_name": - "description": |- - The name of the group that has the permission set in level. This field translates to a `principal` field in secret scope ACL. - "level": - "description": |- - The allowed permission for user, group, service principal defined for this permission. - "service_principal_name": - "description": |- - The application ID of an active service principal. This field translates to a `principal` field in secret scope ACL. - "user_name": - "description": |- - The name of the user that has the permission set in level. This field translates to a `principal` field in secret scope ACL. -github.com/databricks/cli/bundle/config/resources.SqlWarehousePermission: - "group_name": - "description": |- - PLACEHOLDER - "level": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.SyncedDatabaseTable: - "data_synchronization_status": - "description": |- - PLACEHOLDER - "database_instance_name": - "description": |- - PLACEHOLDER - "effective_database_instance_name": - "description": |- - PLACEHOLDER - "effective_logical_database_name": - "description": |- - PLACEHOLDER - "logical_database_name": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "spec": - "description": |- - PLACEHOLDER - "unity_catalog_provisioning_state": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.VectorSearchEndpoint: - "budget_policy_id": - "description": |- - PLACEHOLDER - "endpoint_type": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "permissions": - "description": |- - PLACEHOLDER - "target_qps": - "description": |- - PLACEHOLDER - "usage_policy_id": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.VectorSearchIndex: - "delta_sync_index_spec": - "description": |- - PLACEHOLDER - "direct_access_index_spec": - "description": |- - PLACEHOLDER - "endpoint_name": - "description": |- - PLACEHOLDER - "grants": - "description": |- - PLACEHOLDER - "index_subtype": - "description": |- - PLACEHOLDER - "index_type": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER - "primary_key": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/variable.Lookup: - "alert": - "description": |- - The name of the alert for which to retrieve an ID. - "cluster": - "description": |- - The name of the cluster for which to retrieve an ID. - "cluster_policy": - "description": |- - The name of the cluster_policy for which to retrieve an ID. - "dashboard": - "description": |- - The name of the dashboard for which to retrieve an ID. - "instance_pool": - "description": |- - The name of the instance_pool for which to retrieve an ID. - "job": - "description": |- - The name of the job for which to retrieve an ID. - "metastore": - "description": |- - The name of the metastore for which to retrieve an ID. - "notification_destination": - "description": |- - The name of the notification_destination for which to retrieve an ID. - "pipeline": - "description": |- - The name of the pipeline for which to retrieve an ID. - "query": - "description": |- - The name of the query for which to retrieve an ID. - "service_principal": - "description": |- - The name of the service_principal for which to retrieve an ID. - "warehouse": - "description": |- - The name of the warehouse for which to retrieve an ID. -github.com/databricks/cli/bundle/config/variable.TargetVariable: - "default": - "description": |- - The default value for the variable. - "description": - "description": |- - The description of the variable. - "lookup": - "description": |- - 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. - "markdown_description": - "description": |- - The type of the variable. - "type": - "description": |- - The type of the variable. -github.com/databricks/cli/bundle/config/variable.Variable: - "_": - "description": |- - Defines a custom variable for the bundle. - "markdown_description": |- - Defines a custom variable for the bundle. See [\_](/dev-tools/bundles/settings.md#variables). - "default": - "description": |- - The default value for the variable. - "description": - "description": |- - The description of the variable - "lookup": - "description": |- - 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. - "markdown_description": |- - 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. - "type": - "description": |- - The type of the variable. -github.com/databricks/databricks-sdk-go/service/jobs.JobRunAs: - "service_principal_name": - "description": |- - The application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - "user_name": - "description": |- - The email of an active workspace user. Non-admin users can only set this field to their own email. + ```yaml + resources: + : + : + : + ``` + "fields": + "alerts": + "description": |- + PLACEHOLDER + "fields": + "create_time": + "description": |- + PLACEHOLDER + "custom_description": + "description": |- + PLACEHOLDER + "custom_summary": + "description": |- + PLACEHOLDER + "display_name": + "description": |- + PLACEHOLDER + "effective_run_as": + "description": |- + PLACEHOLDER + "evaluation": + "description": |- + PLACEHOLDER + "fields": + "notification": + "fields": + "subscriptions": + "description": |- + PLACEHOLDER + "fields": + "destination_id": + "description": |- + PLACEHOLDER + "user_email": + "description": |- + PLACEHOLDER + "source": + "fields": + "aggregation": + "description": |- + PLACEHOLDER + "display": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "threshold": + "fields": + "column": + "description": |- + PLACEHOLDER + "value": + "description": |- + PLACEHOLDER + "fields": + "bool_value": + "description": |- + PLACEHOLDER + "double_value": + "description": |- + PLACEHOLDER + "string_value": + "description": |- + PLACEHOLDER + "file_path": + "description": |- + PLACEHOLDER + "id": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "lifecycle_state": + "description": |- + PLACEHOLDER + "owner_user_name": + "description": |- + PLACEHOLDER + "parent_path": + "description": |- + PLACEHOLDER + "permissions": + "description": |- + PLACEHOLDER + "query_text": + "description": |- + PLACEHOLDER + "run_as": + "description": |- + PLACEHOLDER + "run_as_user_name": + "description": |- + PLACEHOLDER + "schedule": + "description": |- + PLACEHOLDER + "update_time": + "description": |- + PLACEHOLDER + "warehouse_id": + "description": |- + PLACEHOLDER + "apps": + "description": |- + The app resource defines a Databricks app. + "markdown_description": |- + The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). + "fields": + "active_deployment": + "fields": + "create_time": + "description": |- + PLACEHOLDER + "creator": + "description": |- + PLACEHOLDER + "deployment_artifacts": + "description": |- + PLACEHOLDER + "fields": + "source_code_path": + "description": |- + PLACEHOLDER + "deployment_id": + "description": |- + PLACEHOLDER + "mode": + "description": |- + PLACEHOLDER + "source_code_path": + "description": |- + PLACEHOLDER + "status": + "description": |- + PLACEHOLDER + "fields": + "message": + "description": |- + PLACEHOLDER + "state": + "description": |- + PLACEHOLDER + "update_time": + "description": |- + PLACEHOLDER + "app_status": + "description": |- + PLACEHOLDER + "fields": + "message": + "description": |- + PLACEHOLDER + "state": + "description": |- + PLACEHOLDER + "budget_policy_id": + "description": |- + PLACEHOLDER + "compute_max_instances": + "description": |- + PLACEHOLDER + "compute_min_instances": + "description": |- + PLACEHOLDER + "compute_size": + "description": |- + PLACEHOLDER + "compute_status": + "description": |- + PLACEHOLDER + "fields": + "message": + "description": |- + PLACEHOLDER + "config": + "description": |- + PLACEHOLDER + "fields": + "command": + "description": |- + PLACEHOLDER + "env": + "description": |- + PLACEHOLDER + "fields": + "name": + "description": |- + PLACEHOLDER + "value": + "description": |- + PLACEHOLDER + "value_from": + "description": |- + PLACEHOLDER + "effective_budget_policy_id": + "description": |- + PLACEHOLDER + "effective_usage_policy_id": + "description": |- + PLACEHOLDER + "git_source": + "description": |- + 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. + "lifecycle": + "description": |- + 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. + "oauth2_app_client_id": + "description": |- + PLACEHOLDER + "oauth2_app_integration_id": + "description": |- + PLACEHOLDER + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "resources": + "fields": + "app": + "description": |- + PLACEHOLDER + "fields": + "name": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "database": + "description": |- + PLACEHOLDER + "fields": + "database_name": + "description": |- + PLACEHOLDER + "instance_name": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "experiment": + "description": |- + PLACEHOLDER + "fields": + "experiment_id": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "genie_space": + "description": |- + PLACEHOLDER + "fields": + "name": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "space_id": + "description": |- + PLACEHOLDER + "job": + "description": |- + PLACEHOLDER + "fields": + "id": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "postgres": + "description": |- + PLACEHOLDER + "fields": + "branch": + "description": |- + PLACEHOLDER + "database": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "secret": + "description": |- + PLACEHOLDER + "fields": + "key": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "scope": + "description": |- + PLACEHOLDER + "serving_endpoint": + "description": |- + PLACEHOLDER + "fields": + "name": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "sql_warehouse": + "description": |- + PLACEHOLDER + "fields": + "id": + "description": |- + PLACEHOLDER + "permission": + "description": |- + PLACEHOLDER + "uc_securable": + "description": |- + PLACEHOLDER + "fields": + "permission": + "description": |- + PLACEHOLDER + "securable_full_name": + "description": |- + PLACEHOLDER + "securable_type": + "description": |- + PLACEHOLDER + "service_principal_client_id": + "description": |- + PLACEHOLDER + "service_principal_id": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "source_code_path": + "description": |- + PLACEHOLDER + "telemetry_export_destinations": + "description": |- + PLACEHOLDER + "thumbnail_url": + "description": |- + PLACEHOLDER + "usage_policy_id": + "description": |- + PLACEHOLDER + "user_api_scopes": + "description": |- + PLACEHOLDER + "catalogs": + "description": |- + PLACEHOLDER + "fields": + "comment": + "description": |- + PLACEHOLDER + "connection_name": + "description": |- + PLACEHOLDER + "grants": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "managed_encryption_settings": + "fields": + "azure_encryption_settings": + "fields": + "azure_cmk_access_connector_id": + "description": |- + PLACEHOLDER + "azure_cmk_managed_identity_id": + "description": |- + PLACEHOLDER + "azure_tenant_id": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "options": + "description": |- + PLACEHOLDER + "properties": + "description": |- + PLACEHOLDER + "provider_name": + "description": |- + PLACEHOLDER + "share_name": + "description": |- + PLACEHOLDER + "storage_root": + "description": |- + PLACEHOLDER + "clusters": + "description": |- + The cluster definitions for the bundle, where each key is the name of a cluster. + "markdown_description": |- + The cluster definitions for the bundle, where each key is the name of a cluster. See [\_](/dev-tools/bundles/resources.md#clusters). + "fields": + "_": + "markdown_description": |- + The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). + "markdown_examples": |- + 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" + ``` + "data_security_mode": + "description": |- + PLACEHOLDER + "docker_image": + "description": |- + PLACEHOLDER + "kind": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "fields": + "prevent_destroy": + "description": |- + Lifecycle setting to prevent the resource from being destroyed. + "started": + "description": |- + Lifecycle setting to deploy the resource in started mode. Only supported for apps, clusters, and sql_warehouses in direct deployment mode. + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "runtime_engine": + "description": |- + PLACEHOLDER + "workload_type": + "description": |- + PLACEHOLDER + "dashboards": + "description": |- + The dashboard definitions for the bundle, where each key is the name of the dashboard. + "markdown_description": |- + The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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). + "create_time": + "description": |- + The timestamp of when the dashboard was created. + "dashboard_id": + "description": |- + UUID identifying the dashboard. + "dataset_catalog": + "description": |- + Sets the default catalog for all datasets in this dashboard. When set, this overrides the catalog specified in individual dataset definitions. + "dataset_schema": + "description": |- + Sets the default schema for all datasets in this dashboard. When set, this overrides the schema specified in individual dataset definitions. + "display_name": + "description": |- + The display name of the dashboard. + "embed_credentials": + "description": |- + PLACEHOLDER + "etag": + "description": |- + 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": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "lifecycle_state": + "description": |- + The state of the dashboard resource. Used for tracking trashed status. + "parent_path": + "description": |- + 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": + "description": |- + 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": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + The name of the group that has the permission set in level. + "level": + "description": |- + The allowed permission for user, group, service principal defined for this permission. + "service_principal_name": + "description": |- + The name of the service principal that has the permission set in level. + "user_name": + "description": |- + The name of the user that has the permission set in level. + "serialized_dashboard": + "description": |- + 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": + "description": |- + The timestamp of when the dashboard was last updated by the user. + This field is excluded in List Dashboards responses. + "warehouse_id": + "description": |- + The warehouse ID used to run the dashboard. + "database_catalogs": + "description": |- + PLACEHOLDER + "fields": + "create_database_if_not_exists": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "uid": + "description": |- + PLACEHOLDER + "database_instances": + "description": |- + PLACEHOLDER + "fields": + "effective_capacity": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "permissions": + "description": |- + PLACEHOLDER + "experiments": + "description": |- + The experiment definitions for the bundle, where each key is the name of the experiment. + "markdown_description": |- + The experiment definitions for the bundle, where each key is the name of the experiment. See [\_](/dev-tools/bundles/resources.md#experiments). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 + ``` + "lifecycle": + "description": |- + 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. + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "external_locations": + "description": |- + PLACEHOLDER + "fields": + "comment": + "description": |- + PLACEHOLDER + "credential_name": + "description": |- + PLACEHOLDER + "effective_file_event_queue": + "fields": + "managed_aqs": + "description": |- + PLACEHOLDER + "fields": + "managed_resource_id": + "description": |- + PLACEHOLDER + "queue_url": + "description": |- + PLACEHOLDER + "resource_group": + "description": |- + PLACEHOLDER + "subscription_id": + "description": |- + PLACEHOLDER + "managed_pubsub": + "description": |- + PLACEHOLDER + "fields": + "managed_resource_id": + "description": |- + PLACEHOLDER + "subscription_name": + "description": |- + PLACEHOLDER + "managed_sqs": + "description": |- + PLACEHOLDER + "fields": + "managed_resource_id": + "description": |- + PLACEHOLDER + "queue_url": + "description": |- + PLACEHOLDER + "provided_aqs": + "description": |- + PLACEHOLDER + "provided_pubsub": + "description": |- + PLACEHOLDER + "provided_sqs": + "description": |- + PLACEHOLDER + "enable_file_events": + "description": |- + PLACEHOLDER + "encryption_details": + "description": |- + PLACEHOLDER + "fields": + "sse_encryption_details": + "description": |- + PLACEHOLDER + "fields": + "algorithm": + "description": |- + PLACEHOLDER + "fields": + "_": + "description": |- + SSE algorithm to use for encrypting S3 objects + "enum": + - |- + AWS_SSE_KMS + - |- + AWS_SSE_S3 + "aws_kms_key_arn": + "description": |- + PLACEHOLDER + "fallback": + "description": |- + PLACEHOLDER + "file_event_queue": + "description": |- + PLACEHOLDER + "grants": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "read_only": + "description": |- + PLACEHOLDER + "skip_validation": + "description": |- + PLACEHOLDER + "url": + "description": |- + PLACEHOLDER + "genie_spaces": + "description": |- + PLACEHOLDER + "fields": + "description": + "description": |- + Description of the Genie space shown alongside the title in the Databricks UI. + "etag": + "description": |- + PLACEHOLDER + "file_path": + "description": |- + 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": + "description": |- + PLACEHOLDER + "parent_path": + "description": |- + Workspace folder under which to create the Genie space. Immutable: changing this field recreates the resource. + "permissions": + "description": |- + PLACEHOLDER + "serialized_space": + "description": |- + 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": + "description": |- + Title of the Genie space shown in the Databricks UI. + "warehouse_id": + "description": |- + ID of the SQL warehouse used to run queries for this Genie space. + "jobs": + "description": |- + The job definitions for the bundle, where each key is the name of the job. + "markdown_description": |- + The job definitions for the bundle, where each key is the name of the job. See [\_](/dev-tools/bundles/resources.md#jobs). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + The following example defines a job with the resource key `hello-job` with one notebook task: + + ```yaml + resources: + jobs: + hello-job: + name: hello-job + tasks: + - task_key: hello-task + notebook_task: + notebook_path: ./hello.py + ``` + + 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). + "environments": + "fields": + "spec": + "description": |- + PLACEHOLDER + "fields": + "dependencies": + "description": |- + List of pip dependencies, as supported by the version of pip in this environment. + "java_dependencies": + "description": |- + PLACEHOLDER + "git_source": + "fields": + "git_snapshot": + "description": |- + PLACEHOLDER + "sparse_checkout": + "description": |- + PLACEHOLDER + "health": + "description": |- + PLACEHOLDER + "fields": + "rules": + "description": |- + PLACEHOLDER + "fields": + "metric": + "description": |- + PLACEHOLDER + "op": + "description": |- + PLACEHOLDER + "job_clusters": + "fields": + "new_cluster": + "fields": + "aws_attributes": + "fields": + "availability": + "description": |- + PLACEHOLDER + "ebs_volume_type": + "description": |- + PLACEHOLDER + "azure_attributes": + "fields": + "availability": + "description": |- + PLACEHOLDER + "log_analytics_info": + "fields": + "log_analytics_primary_key": + "description": |- + The primary key for the Azure Log Analytics agent configuration + "log_analytics_workspace_id": + "description": |- + The workspace ID for the Azure Log Analytics agent configuration + "data_security_mode": + "description": |- + PLACEHOLDER + "docker_image": + "description": |- + PLACEHOLDER + "fields": + "basic_auth": + "description": |- + PLACEHOLDER + "gcp_attributes": + "fields": + "availability": + "description": |- + PLACEHOLDER + "init_scripts": + "fields": + "abfss": + "description": |- + Contains the Azure Data Lake Storage destination path + "kind": + "description": |- + PLACEHOLDER + "runtime_engine": + "description": |- + PLACEHOLDER + "workload_type": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "fields": + "prevent_destroy": + "description": |- + Lifecycle setting to prevent the resource from being destroyed. + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "run_as": + "description": |- + PLACEHOLDER + "fields": + "service_principal_name": + "description": |- + The application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. + "user_name": + "description": |- + The email of an active workspace user. Non-admin users can only set this field to their own email. + "tasks": + "fields": + "alert_task": + "fields": + "subscribers": + "fields": + "destination_id": + "description": |- + PLACEHOLDER + "dashboard_task": + "fields": + "dashboard_id": + "description": |- + PLACEHOLDER + "subscription": + "description": |- + PLACEHOLDER + "fields": + "subscribers": + "description": |- + PLACEHOLDER + "fields": + "destination_id": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "dbt_platform_task": + "description": |- + PLACEHOLDER + "gen_ai_compute_task": + "description": |- + PLACEHOLDER + "fields": + "compute": + "description": |- + PLACEHOLDER + "health": + "description": |- + PLACEHOLDER + "python_operator_task": + "fields": + "parameters": + "fields": + "name": + "description": |- + PLACEHOLDER + "value": + "description": |- + PLACEHOLDER + "run_job_task": + "fields": + "python_named_params": + "description": |- + PLACEHOLDER + "webhook_notifications": + "fields": + "on_duration_warning_threshold_exceeded": + "fields": + "id": + "description": |- + PLACEHOLDER + "trigger": + "fields": + "model": + "description": |- + PLACEHOLDER + "table_update": + "description": |- + PLACEHOLDER + "model_serving_endpoints": + "description": |- + The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. + "markdown_description": |- + 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). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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" + ``` + "config": + "fields": + "served_entities": + "fields": + "entity_version": + "description": |- + PLACEHOLDER + "served_models": + "fields": + "model_name": + "description": |- + PLACEHOLDER + "model_version": + "description": |- + PLACEHOLDER + "traffic_config": + "fields": + "routes": + "fields": + "served_entity_name": + "description": |- + PLACEHOLDER + "description": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "models": + "description": |- + The model definitions for the bundle, where each key is the name of the model. + "markdown_description": |- + The model definitions for the bundle, where each key is the name of the model. See [\_](/dev-tools/bundles/resources.md#models). + "fields": + "_": + "markdown_description": |- + 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. + "lifecycle": + "description": |- + 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. + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "pipelines": + "description": |- + The pipeline definitions for the bundle, where each key is the name of the pipeline. + "markdown_description": |- + The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 + ``` + "dry_run": + "description": |- + PLACEHOLDER + "ingestion_definition": + "fields": + "netsuite_jar_path": + "description": |- + PLACEHOLDER + "objects": + "fields": + "report": + "fields": + "table_configuration": + "fields": + "workday_report_parameters": + "description": |- + PLACEHOLDER + "schema": + "fields": + "connector_options": + "fields": + "gdrive_options": + "description": |- + PLACEHOLDER + "fields": + "entity_type": + "description": |- + PLACEHOLDER + "file_ingestion_options": + "description": |- + PLACEHOLDER + "fields": + "corrupt_record_column": + "description": |- + PLACEHOLDER + "ignore_corrupt_files": + "description": |- + PLACEHOLDER + "infer_column_types": + "description": |- + PLACEHOLDER + "rescued_data_column": + "description": |- + PLACEHOLDER + "single_variant_column": + "description": |- + PLACEHOLDER + "kafka_options": + "description": |- + PLACEHOLDER + "fields": + "key_transformer": + "fields": + "json_options": + "description": |- + PLACEHOLDER + "sharepoint_options": + "description": |- + PLACEHOLDER + "source_configurations": + "fields": + "google_ads_config": + "description": |- + PLACEHOLDER + "libraries": + "fields": + "whl": + "deprecation_message": |- + This field is deprecated + "lifecycle": + "description": |- + 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. + "parameters": + "description": |- + PLACEHOLDER + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "run_as": + "description": |- + PLACEHOLDER + "trigger": + "deprecation_message": |- + Use continuous instead + "fields": + "cron": + "description": |- + PLACEHOLDER + "fields": + "quartz_cron_schedule": + "description": |- + PLACEHOLDER + "timezone_id": + "description": |- + PLACEHOLDER + "manual": + "description": |- + PLACEHOLDER + "postgres_branches": + "description": |- + PLACEHOLDER + "fields": + "branch_id": + "description": |- + PLACEHOLDER + "expire_time": + "description": |- + PLACEHOLDER + "is_protected": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "no_expiry": + "description": |- + PLACEHOLDER + "parent": + "description": |- + PLACEHOLDER + "replace_existing": + "description": |- + PLACEHOLDER + "source_branch": + "description": |- + PLACEHOLDER + "source_branch_lsn": + "description": |- + PLACEHOLDER + "source_branch_time": + "description": |- + PLACEHOLDER + "ttl": + "description": |- + PLACEHOLDER + "postgres_catalogs": + "description": |- + 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. + "fields": + "branch": + "description": |- + PLACEHOLDER + "catalog_id": + "description": |- + PLACEHOLDER + "create_database_if_missing": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "postgres_database": + "description": |- + PLACEHOLDER + "postgres_endpoints": + "description": |- + PLACEHOLDER + "fields": + "autoscaling_limit_max_cu": + "description": |- + PLACEHOLDER + "autoscaling_limit_min_cu": + "description": |- + PLACEHOLDER + "disabled": + "description": |- + PLACEHOLDER + "endpoint_id": + "description": |- + PLACEHOLDER + "endpoint_type": + "description": |- + PLACEHOLDER + "group": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "no_suspension": + "description": |- + PLACEHOLDER + "parent": + "description": |- + PLACEHOLDER + "replace_existing": + "description": |- + PLACEHOLDER + "settings": + "description": |- + PLACEHOLDER + "suspend_timeout_duration": + "description": |- + PLACEHOLDER + "postgres_projects": + "description": |- + PLACEHOLDER + "fields": + "budget_policy_id": + "description": |- + PLACEHOLDER + "custom_tags": + "description": |- + PLACEHOLDER + "default_branch": + "description": |- + PLACEHOLDER + "default_endpoint_settings": + "description": |- + PLACEHOLDER + "display_name": + "description": |- + PLACEHOLDER + "enable_pg_native_login": + "description": |- + PLACEHOLDER + "history_retention_duration": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "permissions": + "description": |- + PLACEHOLDER + "pg_version": + "description": |- + PLACEHOLDER + "project_id": + "description": |- + PLACEHOLDER + "purge_on_delete": + "description": |- + PLACEHOLDER + "postgres_synced_tables": + "description": |- + 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. + "fields": + "branch": + "description": |- + PLACEHOLDER + "create_database_objects_if_missing": + "description": |- + PLACEHOLDER + "existing_pipeline_id": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "new_pipeline_spec": + "description": |- + PLACEHOLDER + "postgres_database": + "description": |- + PLACEHOLDER + "primary_key_columns": + "description": |- + PLACEHOLDER + "scheduling_policy": + "description": |- + PLACEHOLDER + "source_table_full_name": + "description": |- + PLACEHOLDER + "synced_table_id": + "description": |- + PLACEHOLDER + "timeseries_key": + "description": |- + PLACEHOLDER + "quality_monitors": + "description": |- + The quality monitor definitions for the bundle, where each key is the name of the quality monitor. + "markdown_description": |- + 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). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 + ``` + "inference_log": + "description": |- + PLACEHOLDER + "fields": + "granularities": + "description": |- + 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. + "lifecycle": + "description": |- + 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. + "table_name": + "description": |- + PLACEHOLDER + "time_series": + "fields": + "granularities": + "description": |- + 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. + "registered_models": + "description": |- + The registered model definitions for the bundle, where each key is the name of the Unity Catalog registered model. + "markdown_description": |- + 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) + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 + ``` + "aliases": + "description": |- + PLACEHOLDER + "fields": + "catalog_name": + "description": |- + PLACEHOLDER + "id": + "description": |- + PLACEHOLDER + "model_name": + "description": |- + PLACEHOLDER + "schema_name": + "description": |- + PLACEHOLDER + "browse_only": + "description": |- + PLACEHOLDER + "created_at": + "description": |- + PLACEHOLDER + "created_by": + "description": |- + PLACEHOLDER + "full_name": + "description": |- + PLACEHOLDER + "grants": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "metastore_id": + "description": |- + PLACEHOLDER + "owner": + "description": |- + PLACEHOLDER + "updated_at": + "description": |- + PLACEHOLDER + "updated_by": + "description": |- + PLACEHOLDER + "schemas": + "description": |- + The schema definitions for the bundle, where each key is the name of the schema. + "markdown_description": |- + The schema definitions for the bundle, where each key is the name of the schema. See [\_](/dev-tools/bundles/resources.md#schemas). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + The following example defines a pipeline with the resource key `my_pipeline` that creates a Unity Catalog schema with the key `my_schema` as the target: + + ```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 + ``` + "grants": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "properties": + "description": |- + PLACEHOLDER + "secret_scopes": + "description": |- + The secret scope definitions for the bundle, where each key is the name of the secret scope. + "markdown_description": |- + 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). + "fields": + "backend_type": + "description": |- + The backend type the scope will be created with. If not specified, will default to `DATABRICKS` + "keyvault_metadata": + "description": |- + The metadata for the secret scope if the `backend_type` is `AZURE_KEYVAULT` + "lifecycle": + "description": |- + 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. + "name": + "description": |- + Scope name requested by the user. Scope names are unique. + "permissions": + "description": |- + The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. + "fields": + "group_name": + "description": |- + The name of the group that has the permission set in level. This field translates to a `principal` field in secret scope ACL. + "level": + "description": |- + The allowed permission for user, group, service principal defined for this permission. + "fields": + "_": + "enum": + - |- + READ + - |- + WRITE + - |- + MANAGE + "service_principal_name": + "description": |- + The application ID of an active service principal. This field translates to a `principal` field in secret scope ACL. + "user_name": + "description": |- + 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": + "description": |- + The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. + "markdown_description": |- + The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. See [\_](/dev-tools/bundles/resources.md#sql_warehouses). + "fields": + "channel": + "fields": + "dbsql_version": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "enable_photon": + "description": |- + Configures whether the warehouse should use Photon optimized clusters. + + Defaults to true. + "lifecycle": + "description": |- + 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. + "permissions": + "description": |- + PLACEHOLDER + "fields": + "group_name": + "description": |- + PLACEHOLDER + "level": + "description": |- + PLACEHOLDER + "service_principal_name": + "description": |- + PLACEHOLDER + "user_name": + "description": |- + PLACEHOLDER + "spot_instance_policy": + "description": |- + PLACEHOLDER + "tags": + "fields": + "custom_tags": + "description": |- + PLACEHOLDER + "fields": + "key": + "description": |- + PLACEHOLDER + "value": + "description": |- + PLACEHOLDER + "warehouse_type": + "description": |- + PLACEHOLDER + "synced_database_tables": + "description": |- + PLACEHOLDER + "fields": + "data_synchronization_status": + "description": |- + PLACEHOLDER + "fields": + "last_sync": + "fields": + "delta_table_sync_info": + "description": |- + PLACEHOLDER + "database_instance_name": + "description": |- + PLACEHOLDER + "effective_database_instance_name": + "description": |- + PLACEHOLDER + "effective_logical_database_name": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "logical_database_name": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "spec": + "description": |- + PLACEHOLDER + "unity_catalog_provisioning_state": + "description": |- + PLACEHOLDER + "vector_search_endpoints": + "description": |- + PLACEHOLDER + "fields": + "budget_policy_id": + "description": |- + PLACEHOLDER + "endpoint_type": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "permissions": + "description": |- + PLACEHOLDER + "target_qps": + "description": |- + PLACEHOLDER + "usage_policy_id": + "description": |- + PLACEHOLDER + "vector_search_indexes": + "description": |- + PLACEHOLDER + "fields": + "delta_sync_index_spec": + "description": |- + PLACEHOLDER + "fields": + "columns_to_sync": + "description": |- + PLACEHOLDER + "embedding_source_columns": + "description": |- + PLACEHOLDER + "fields": + "embedding_model_endpoint_name": + "description": |- + PLACEHOLDER + "model_endpoint_name_for_query": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "embedding_vector_columns": + "description": |- + PLACEHOLDER + "fields": + "embedding_dimension": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "embedding_writeback_table": + "description": |- + PLACEHOLDER + "pipeline_type": + "description": |- + PLACEHOLDER + "source_table": + "description": |- + PLACEHOLDER + "direct_access_index_spec": + "description": |- + PLACEHOLDER + "fields": + "embedding_source_columns": + "description": |- + PLACEHOLDER + "embedding_vector_columns": + "description": |- + PLACEHOLDER + "schema_json": + "description": |- + PLACEHOLDER + "endpoint_name": + "description": |- + PLACEHOLDER + "grants": + "description": |- + PLACEHOLDER + "index_subtype": + "description": |- + PLACEHOLDER + "index_type": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + PLACEHOLDER + "name": + "description": |- + PLACEHOLDER + "primary_key": + "description": |- + PLACEHOLDER + "volumes": + "description": |- + The volume definitions for the bundle, where each key is the name of the volume. + "markdown_description": |- + The volume definitions for the bundle, where each key is the name of the volume. See [\_](/dev-tools/bundles/resources.md#volumes). + "fields": + "_": + "markdown_description": |- + 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). + "markdown_examples": |- + 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). + "grants": + "description": |- + PLACEHOLDER + "lifecycle": + "description": |- + 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. + "volume_type": + "description": |- + PLACEHOLDER +run_as: + "description": |- + The identity to use when running Declarative Automation Bundles resources. + "markdown_description": |- + The identity to use when running Declarative Automation Bundles resources. See [\_](/dev-tools/bundles/run-as.md). +scripts: + "description": |- + PLACEHOLDER + "fields": + "content": + "description": |- + PLACEHOLDER +sync: + "description": |- + The files and file paths to include or exclude in the bundle. + "markdown_description": |- + The files and file paths to include or exclude in the bundle. See [\_](/dev-tools/bundles/settings.md#sync). +targets: + "description": |- + Defines deployment targets for the bundle. + "markdown_description": |- + Defines deployment targets for the bundle. See [\_](/dev-tools/bundles/settings.md#targets) + "fields": + "artifacts": + "description": |- + The artifacts to include in the target deployment. + "bundle": + "description": |- + The bundle attributes when deploying to this target. + "cluster_id": + "description": |- + The ID of the cluster to use for this target. + "compute_id": + "description": |- + Deprecated. The ID of the compute to use for this target. + "deprecation_message": |- + Deprecated: please use cluster_id instead + "default": + "description": |- + Whether this target is the default target. + "git": + "description": |- + The Git version control settings for the target. + "mode": + "description": |- + The deployment mode for the target. + "markdown_description": |- + The deployment mode for the target. Valid values are `development` or `production`. See [\_](/dev-tools/bundles/deployment-modes.md). + "permissions": + "description": |- + The permissions for deploying and running the bundle in the target. + "presets": + "description": |- + The deployment presets for the target. + "fields": + "artifacts_dynamic_version": + "description": |- + Whether to enable dynamic_version on all artifacts. + "jobs_max_concurrent_runs": + "description": |- + The maximum concurrent runs for a job. + "name_prefix": + "description": |- + The prefix for job runs of the bundle. + "pipelines_development": + "description": |- + Whether pipeline deployments should be locked in development mode. + "source_linked_deployment": + "description": |- + Whether to link the deployment to the bundle source. + "tags": + "description": |- + The tags for the bundle deployment. + "trigger_pause_status": + "description": |- + A pause status to apply to all job triggers and schedules. Valid values are PAUSED or UNPAUSED. + "resources": + "description": |- + The resource definitions for the target. + "run_as": + "description": |- + The identity to use to run the bundle. + "markdown_description": |- + The identity to use to run the bundle, see [\_](/dev-tools/bundles/run-as.md). + "sync": + "description": |- + The local paths to sync to the target workspace when a bundle is run or deployed. + "fields": + "exclude": + "description": |- + A list of files or folders to exclude from the bundle. + "include": + "description": |- + A list of files or folders to include in the bundle. + "paths": + "description": |- + The local folder paths, which can be outside the bundle root, to synchronize to the workspace when the bundle is deployed. + "variables": + "description": |- + The custom variable definitions for the target. + "fields": + "default": + "description": |- + The default value for the variable. + "description": + "description": |- + The description of the variable. + "lookup": + "description": |- + 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. + "type": + "description": |- + The type of the variable. + "workspace": + "description": |- + The Databricks workspace for the target. +variables: + "description": |- + A Map that defines the custom variables for the bundle, where each key is the name of the variable, and the value is a Map that defines the variable. + "fields": + "_": + "description": |- + Defines a custom variable for the bundle. + "markdown_description": |- + Defines a custom variable for the bundle. See [\_](/dev-tools/bundles/settings.md#variables). + "default": + "description": |- + The default value for the variable. + "description": + "description": |- + The description of the variable + "lookup": + "description": |- + 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. + "markdown_description": |- + 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. + "fields": + "alert": + "description": |- + The name of the alert for which to retrieve an ID. + "cluster": + "description": |- + The name of the cluster for which to retrieve an ID. + "cluster_policy": + "description": |- + The name of the cluster_policy for which to retrieve an ID. + "dashboard": + "description": |- + The name of the dashboard for which to retrieve an ID. + "instance_pool": + "description": |- + The name of the instance_pool for which to retrieve an ID. + "job": + "description": |- + The name of the job for which to retrieve an ID. + "metastore": + "description": |- + The name of the metastore for which to retrieve an ID. + "notification_destination": + "description": |- + The name of the notification_destination for which to retrieve an ID. + "pipeline": + "description": |- + The name of the pipeline for which to retrieve an ID. + "query": + "description": |- + The name of the query for which to retrieve an ID. + "service_principal": + "description": |- + The name of the service_principal for which to retrieve an ID. + "warehouse": + "description": |- + The name of the warehouse for which to retrieve an ID. + "type": + "description": |- + The type of the variable. +workspace: + "description": |- + Defines the Databricks workspace for the bundle. + "markdown_description": |- + Defines the Databricks workspace for the bundle. See [\_](/dev-tools/bundles/settings.md#workspace). + "fields": + "account_id": + "description": |- + The Databricks account ID. + "artifact_path": + "description": |- + The artifact path to use within the workspace for both deployments and job runs + "auth_type": + "description": |- + The authentication type. + "azure_client_id": + "description": |- + The Azure client ID + "azure_environment": + "description": |- + The Azure environment + "azure_login_app_id": + "description": |- + The Azure login app ID + "azure_tenant_id": + "description": |- + The Azure tenant ID + "azure_use_msi": + "description": |- + Whether to use MSI for Azure + "azure_workspace_resource_id": + "description": |- + The Azure workspace resource ID + "client_id": + "description": |- + The client ID for the workspace + "experimental_is_unified_host": + "description": |- + 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": + "description": |- + The file path to use within the workspace for both deployments and job runs + "google_service_account": + "description": |- + The Google service account name + "host": + "description": |- + The Databricks workspace host URL + "profile": + "description": |- + The Databricks workspace profile name + "resource_path": + "description": |- + The workspace resource path + "root_path": + "description": |- + The Databricks workspace root path + "state_path": + "description": |- + The workspace state path + "workspace_id": + "description": |- + The Databricks workspace ID diff --git a/bundle/internal/schema/annotations_file.go b/bundle/internal/schema/annotations_file.go new file mode 100644 index 00000000000..b17e778705b --- /dev/null +++ b/bundle/internal/schema/annotations_file.go @@ -0,0 +1,348 @@ +package main + +import ( + "bytes" + "fmt" + "os" + "reflect" + "slices" + "strings" + + yaml3 "go.yaml.in/yaml/v3" + + "github.com/databricks/cli/bundle/internal/annotation" + "github.com/databricks/cli/libs/dyn" + "github.com/databricks/cli/libs/dyn/convert" + "github.com/databricks/cli/libs/dyn/yamlloader" + "github.com/databricks/cli/libs/dyn/yamlsaver" +) + +// fieldsKey nests a type's block inside the node of a field that resolves to +// it. It cannot clash with descriptor keys, and config fields that happen to +// be named "fields" simply appear inside it like any other field. +const fieldsKey = "fields" + +const annotationsFileHeader = `# This file contains the documentation the CLI owns for the bundle +# configuration JSON schema: docs for fields that do not exist in the upstream +# API spec (.codegen/cli.json), and overrides of upstream docs. Documentation +# for everything else is inherited from cli.json at generation time and must +# not be duplicated here. +# +# The structure mirrors the bundle configuration tree: +# - A node documents one field: its inline keys (description, +# markdown_description, ...) apply to the field itself, and "fields" holds +# the nodes of the type the field resolves to (map and sequence levels are +# unwrapped implicitly). +# - "_" inside "fields" documents the resolved type itself; for enum types +# it carries the enum values. +# - Each type is expanded exactly once, at its first occurrence; fields of +# types that occur again later (for example everything under "targets") +# are documented at that first occurrence. +# - "description: PLACEHOLDER" marks fields that have no documentation yet. +# +# Running "task generate-schema" keeps this file in sync with the +# configuration structure: it adds placeholders for new undocumented fields +# and drops entries for fields that no longer exist. +` + +// descriptorKeys is the set of YAML keys a node carries inline (the JSON tags +// of annotation.Descriptor). +var descriptorKeys = func() map[string]bool { + keys := map[string]bool{} + for field := range reflect.TypeFor[annotation.Descriptor]().Fields() { + keys[strings.Split(field.Tag.Get("json"), ",")[0]] = true + } + return keys +}() + +// loadAnnotationsFile reads the tree-format annotations file and flattens it +// into per-type annotations. Tree positions that do not resolve to a type or +// field in the config (stale entries, typos) are returned in unknown; they +// are not loaded, so the next save drops them. +func loadAnnotationsFile(path string, g *typeGraph) (annotation.File, []string, error) { + b, err := os.ReadFile(path) + if err != nil { + return nil, nil, err + } + v, err := yamlloader.LoadYAML(path, bytes.NewBuffer(b)) + if err != nil { + return nil, nil, err + } + + l := &fileLoader{graph: g, data: annotation.File{}} + err = l.block(v, g.root, "") + if err != nil { + return nil, nil, err + } + return l.data, l.unknown, nil +} + +type fileLoader struct { + graph *typeGraph + data annotation.File + unknown []string +} + +// block loads one type's block: "_" plus field nodes. +func (l *fileLoader) block(v dyn.Value, typeKey, where string) error { + if v.Kind() == dyn.KindNil { + return nil + } + m, ok := v.AsMap() + if !ok { + return fmt.Errorf("%s: expected a mapping, got %s", where, v.Kind()) + } + + for _, pair := range m.Pairs() { + key := pair.Key.MustString() + child := where + "." + key + if where == "" { + child = key + } + + edge := fieldEdge{name: key} + if key != RootTypeKey { + edge, ok = l.graph.edge(typeKey, key) + if !ok { + l.unknown = append(l.unknown, child) + continue + } + } + err := l.node(pair.Value, typeKey, edge, child) + if err != nil { + return err + } + } + return nil +} + +// node loads one field's node: inline descriptor keys plus an optional +// "fields" block for the type the field resolves to. +func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where string) error { + if v.Kind() == dyn.KindNil { + return nil + } + m, ok := v.AsMap() + if !ok { + return fmt.Errorf("%s: expected a mapping, got %s", where, v.Kind()) + } + + desc := dyn.NewMapping() + for _, pair := range m.Pairs() { + key := pair.Key.MustString() + switch { + case key == fieldsKey && edge.typ != "": + err := l.block(pair.Value, edge.typ, where+"."+fieldsKey) + if err != nil { + return err + } + case descriptorKeys[key]: + desc.SetLoc(key, nil, pair.Value) + default: + l.unknown = append(l.unknown, where+"."+key) + } + } + + if desc.Len() == 0 { + return nil + } + var d annotation.Descriptor + err := convert.ToTyped(&d, dyn.V(desc)) + if err != nil { + return fmt.Errorf("%s: %w", where, err) + } + if l.data[typeKey] == nil { + l.data[typeKey] = map[string]annotation.Descriptor{} + } + l.data[typeKey][edge.name] = d + return nil +} + +// saveAnnotationsFile writes data to path in the canonical tree layout: a +// depth-first walk over the config type graph in struct declaration order +// expands every type at its first occurrence; keys are emitted alphabetically. +// Entries that no tree position consumed (fields or types that no longer +// exist) are returned as detached and are not written. +func saveAnnotationsFile(path string, data annotation.File, g *typeGraph) ([]string, error) { + s := &fileSaver{ + graph: g, + data: data, + visited: map[string]bool{g.root: true}, + expandAt: map[edgeKey]bool{}, + consumed: map[edgeKey]bool{}, + } + s.assignCanonical(g.root) + + root, err := s.block(g.root) + if err != nil { + return nil, err + } + + // Style every top-level key so all nested scalars render in literal block + // style, matching the formatting of the previous annotation files. + style := map[string]yaml3.Style{} + for k := range root { + style[k] = yaml3.LiteralStyle + } + err = yamlsaver.NewSaverWithStyle(style).SaveAsYAML(root, path, true) + if err != nil { + return nil, err + } + err = prependCommentToFile(path, annotationsFileHeader) + if err != nil { + return nil, err + } + return s.detached(), nil +} + +type edgeKey struct { + typ string + name string +} + +type fileSaver struct { + graph *typeGraph + data annotation.File + visited map[string]bool + expandAt map[edgeKey]bool + consumed map[edgeKey]bool +} + +// assignCanonical walks the type graph depth-first in struct declaration +// order and records, for every type, the field edge at which it is expanded. +func (s *fileSaver) assignCanonical(typeKey string) { + for _, edge := range s.graph.fields[typeKey] { + if edge.typ == "" || s.visited[edge.typ] { + continue + } + s.visited[edge.typ] = true + s.expandAt[edgeKey{typeKey, edge.name}] = true + s.assignCanonical(edge.typ) + } +} + +// block renders one type's block: "_" first, then field nodes alphabetically. +// Lines in the value locations encode the output order for the YAML saver. +func (s *fileSaver) block(typeKey string) (map[string]dyn.Value, error) { + out := map[string]dyn.Value{} + line := 0 + + if d, ok := s.take(typeKey, RootTypeKey); ok { + v, err := descriptorValue(d, line) + if err != nil { + return nil, err + } + if v.Kind() != dyn.KindNil { + out[RootTypeKey] = v + line++ + } + } + + edges := slices.Clone(s.graph.fields[typeKey]) + slices.SortFunc(edges, func(a, b fieldEdge) int { + return strings.Compare(a.name, b.name) + }) + for _, edge := range edges { + node, err := s.node(typeKey, edge) + if err != nil { + return nil, err + } + if len(node) > 0 { + out[edge.name] = dyn.NewValue(node, []dyn.Location{{Line: line}}) + line++ + } + } + return out, nil +} + +// node renders one field's node: the inline descriptor plus, at the field's +// canonical position, the "fields" block of the type it resolves to. +func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, error) { + out := map[string]dyn.Value{} + + if d, ok := s.take(typeKey, edge.name); ok { + v, err := convert.FromTyped(d, dyn.NilValue) + if err != nil { + return nil, err + } + if v.Kind() != dyn.KindNil { + // Order the descriptor keys with description first, like the + // previous annotation files. + order := yamlsaver.NewOrder([]string{"description", "markdown_description", "title", "default", "enum"}) + _, err = yamlsaver.ConvertToMapValue(d, order, []string{}, out) + if err != nil { + return nil, err + } + } + } + + if s.expandAt[edgeKey{typeKey, edge.name}] { + child, err := s.block(edge.typ) + if err != nil { + return nil, err + } + if len(child) > 0 { + // A high line number sorts the block after the descriptor keys. + out[fieldsKey] = dyn.NewValue(child, []dyn.Location{{Line: 10000}}) + } + } + return out, nil +} + +// descriptorValue converts a descriptor for a "_" entry, ordering its keys +// like the inline descriptors and placing it at the given line in its block. +func descriptorValue(d annotation.Descriptor, line int) (dyn.Value, error) { + v, err := convert.FromTyped(d, dyn.NilValue) + if err != nil || v.Kind() == dyn.KindNil { + return dyn.NilValue, err + } + order := yamlsaver.NewOrder([]string{"description", "markdown_description", "title", "default", "enum"}) + v, err = yamlsaver.ConvertToMapValue(d, order, []string{}, map[string]dyn.Value{}) + if err != nil { + return dyn.NilValue, err + } + return v.WithLocations([]dyn.Location{{Line: line}}), nil +} + +// take returns the descriptor for the given type and field and marks it +// consumed for the detached-entry report. +func (s *fileSaver) take(typeKey, name string) (annotation.Descriptor, bool) { + d, ok := s.data[typeKey][name] + if ok { + s.consumed[edgeKey{typeKey, name}] = true + } + return d, ok +} + +// detached returns the data entries no tree position consumed, sorted. +func (s *fileSaver) detached() []string { + var out []string + for typeKey, fields := range s.data { + for name := range fields { + if !s.consumed[edgeKey{typeKey, name}] { + out = append(out, typeKey+": "+name) + } + } + } + slices.Sort(out) + return out +} + +func prependCommentToFile(outputPath, comment string) error { + b, err := os.ReadFile(outputPath) + if err != nil { + return err + } + f, err := os.OpenFile(outputPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644) + if err != nil { + return err + } + defer f.Close() + + _, err = f.WriteString(comment) + if err != nil { + return err + } + _, err = f.Write(b) + return err +} diff --git a/bundle/internal/schema/annotations_file_test.go b/bundle/internal/schema/annotations_file_test.go new file mode 100644 index 00000000000..528ae2492c0 --- /dev/null +++ b/bundle/internal/schema/annotations_file_test.go @@ -0,0 +1,150 @@ +package main + +import ( + "os" + "path/filepath" + "reflect" + "testing" + + "github.com/databricks/cli/bundle/internal/annotation" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestAnnotationsFileRoundTrip(t *testing.T) { + g, err := newTypeGraph(reflect.TypeFor[tgRoot]()) + require.NoError(t, err) + + data := annotation.File{ + getPath(reflect.TypeFor[tgRoot]()): { + "first": {Description: "First field."}, + "by_name": {Description: "Map field.", MarkdownDescription: "Map field. See [_](/foo.md)."}, + }, + getPath(reflect.TypeFor[tgNested]()): { + "_": {Description: "A nested type."}, + "description": {Description: annotation.Placeholder}, + "again": {Description: "Recursive field."}, + }, + getPath(reflect.TypeFor[tgMode]()): { + "_": {Enum: []any{"a", "b"}}, + }, + getPath(reflect.TypeFor[tgItem]()): { + "inner": {Description: "Inner docs."}, + }, + } + + path := filepath.Join(t.TempDir(), "annotations.yml") + detached, err := saveAnnotationsFile(path, data, g) + require.NoError(t, err) + assert.Empty(t, detached) + + b, err := os.ReadFile(path) + require.NoError(t, err) + + // Keys are emitted alphabetically; tgNested expands under `first` (its + // canonical position in declaration order), so `by_name`, which resolves + // to the same type, carries no `fields` block. `plain` has no content and + // is omitted entirely. + expected := annotationsFileHeader + `by_name: + "description": |- + Map field. + "markdown_description": |- + Map field. See [_](/foo.md). +first: + "description": |- + First field. + "fields": + "_": + "description": |- + A nested type. + "again": + "description": |- + Recursive field. + "description": + "description": |- + PLACEHOLDER +items: + "fields": + "inner": + "description": |- + Inner docs. +mode: + "fields": + "_": + "enum": + - |- + a + - |- + b +` + assert.Equal(t, expected, string(b)) + + loaded, unknown, err := loadAnnotationsFile(path, g) + require.NoError(t, err) + assert.Empty(t, unknown) + assert.Equal(t, data, loaded) + + // Saving the loaded data again must be byte-identical. + path2 := filepath.Join(t.TempDir(), "annotations.yml") + _, err = saveAnnotationsFile(path2, loaded, g) + require.NoError(t, err) + b2, err := os.ReadFile(path2) + require.NoError(t, err) + assert.Equal(t, string(b), string(b2)) +} + +func TestAnnotationsFileUnknownEntries(t *testing.T) { + g, err := newTypeGraph(reflect.TypeFor[tgRoot]()) + require.NoError(t, err) + + path := filepath.Join(t.TempDir(), "annotations.yml") + err = os.WriteFile(path, []byte(`first: + description: |- + Valid entry. + bogus_key: |- + Not a descriptor key. + fields: + no_such_field: + description: |- + Field does not exist. +plain: + fields: + nested: + description: |- + Primitive fields have no nested fields. +`), 0o644) + require.NoError(t, err) + + data, unknown, err := loadAnnotationsFile(path, g) + require.NoError(t, err) + assert.Equal(t, []string{ + "first.bogus_key", + "first.fields.no_such_field", + "plain.fields", + }, unknown) + + // The valid entry is still loaded. + assert.Equal(t, "Valid entry.", data[getPath(reflect.TypeFor[tgRoot]())]["first"].Description) +} + +func TestAnnotationsFileDetachedEntries(t *testing.T) { + g, err := newTypeGraph(reflect.TypeFor[tgRoot]()) + require.NoError(t, err) + + data := annotation.File{ + getPath(reflect.TypeFor[tgRoot]()): { + "no_such_field": {Description: "Stale."}, + }, + "github.com/databricks/cli/no/such.Type": { + "field": {Description: "Stale."}, + }, + } + + path := filepath.Join(t.TempDir(), "annotations.yml") + detached, err := saveAnnotationsFile(path, data, g) + require.NoError(t, err) + assert.Equal(t, []string{ + "github.com/databricks/cli/bundle/internal/schema.tgRoot: no_such_field", + "github.com/databricks/cli/no/such.Type: field", + }, detached) +} diff --git a/bundle/internal/schema/annotations_openapi.yml b/bundle/internal/schema/annotations_openapi.yml deleted file mode 100644 index dc2d93c357a..00000000000 --- a/bundle/internal/schema/annotations_openapi.yml +++ /dev/null @@ -1,6947 +0,0 @@ -# This file is auto-generated. DO NOT EDIT. -github.com/databricks/cli/bundle/config/resources.Alert: - "create_time": - "description": |- - The timestamp indicating when the alert was created. - "x-databricks-field-behaviors_output_only": |- - true - "custom_description": - "description": |- - Custom description for the alert. support mustache template. - "custom_summary": - "description": |- - Custom summary for the alert. support mustache template. - "display_name": - "description": |- - The display name of the alert. - "effective_run_as": - "description": |- - The actual identity that will be used to execute the alert. - This is an output-only field that shows the resolved run-as identity after applying - permissions and defaults. - "x-databricks-field-behaviors_output_only": |- - true - "evaluation": {} - "id": - "description": |- - UUID identifying the alert. - "x-databricks-field-behaviors_output_only": |- - true - "lifecycle_state": - "description": |- - Indicates whether the query is trashed. - "x-databricks-field-behaviors_output_only": |- - true - "owner_user_name": - "description": |- - The owner's username. This field is set to "Unavailable" if the user has been deleted. - "x-databricks-field-behaviors_output_only": |- - true - "parent_path": - "description": |- - The workspace path of the folder containing the alert. Can only be set on create, and cannot be updated. - "query_text": - "description": |- - Text of the query to be run. - "run_as": - "description": |- - Specifies the identity that will be used to run the alert. - This field allows you to configure alerts to run as a specific user or service principal. - - For user identity: Set `user_name` to the email of an active workspace user. Users can only set this to their own email. - - For service principal: Set `service_principal_name` to the application ID. Requires the `servicePrincipal/user` role. - If not specified, the alert will run as the request user. - "run_as_user_name": - "description": |- - The run as username or application ID of service principal. - On Create and Update, this field can be set to application ID of an active service principal. Setting this field requires the servicePrincipal/user role. - Deprecated: Use `run_as` field instead. This field will be removed in a future release. - "deprecation_message": |- - This field is deprecated - "schedule": {} - "update_time": - "description": |- - The timestamp indicating when the alert was updated. - "x-databricks-field-behaviors_output_only": |- - true - "warehouse_id": - "description": |- - ID of the SQL warehouse attached to the alert. -github.com/databricks/cli/bundle/config/resources.App: - "active_deployment": - "description": |- - The active deployment of the app. A deployment is considered active when it has been deployed - to the app compute. - "x-databricks-field-behaviors_output_only": |- - true - "app_status": - "x-databricks-field-behaviors_output_only": |- - true - "budget_policy_id": {} - "compute_max_instances": - "description": |- - Maximum number of app instances. Must be set together with `compute_min_instances`. - "x-databricks-preview": |- - PRIVATE - "compute_min_instances": - "description": |- - Minimum number of app instances. Must be set together with `compute_max_instances`. - "x-databricks-preview": |- - PRIVATE - "compute_size": {} - "compute_status": - "x-databricks-field-behaviors_output_only": |- - true - "create_time": - "description": |- - The creation time of the app. Formatted timestamp in ISO 6801. - "x-databricks-field-behaviors_output_only": |- - true - "creator": - "description": |- - The email of the user that created the app. - "x-databricks-field-behaviors_output_only": |- - true - "default_source_code_path": - "description": |- - The default workspace file system path of the source code from which app deployment are - created. This field tracks the workspace source code path of the last active deployment. - "x-databricks-field-behaviors_output_only": |- - true - "description": - "description": |- - The description of the app. - "effective_budget_policy_id": - "x-databricks-field-behaviors_output_only": |- - true - "effective_usage_policy_id": - "x-databricks-field-behaviors_output_only": |- - true - "effective_user_api_scopes": - "description": |- - The effective api scopes granted to the user access token. - "x-databricks-field-behaviors_output_only": |- - true - "git_repository": - "description": |- - 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). - "id": - "description": |- - The unique identifier of the app. - "x-databricks-field-behaviors_output_only": |- - true - "name": - "description": |- - The name of the app. The name must contain only lowercase alphanumeric characters and hyphens. - It must be unique within the workspace. - "oauth2_app_client_id": - "x-databricks-field-behaviors_output_only": |- - true - "oauth2_app_integration_id": - "x-databricks-field-behaviors_output_only": |- - true - "pending_deployment": - "description": |- - The pending deployment of the app. A deployment is considered pending when it is being prepared - for deployment to the app compute. - "x-databricks-field-behaviors_output_only": |- - true - "resources": - "description": |- - Resources for the app. - "service_principal_client_id": - "x-databricks-field-behaviors_output_only": |- - true - "service_principal_id": - "x-databricks-field-behaviors_output_only": |- - true - "service_principal_name": - "x-databricks-field-behaviors_output_only": |- - true - "space": - "description": |- - Name of the space this app belongs to. - "x-databricks-preview": |- - PRIVATE - "telemetry_export_destinations": {} - "thumbnail_url": - "description": |- - The URL of the thumbnail image for the app. - "x-databricks-field-behaviors_output_only": |- - true - "update_time": - "description": |- - The update time of the app. Formatted timestamp in ISO 6801. - "x-databricks-field-behaviors_output_only": |- - true - "updater": - "description": |- - The email of the user that last updated the app. - "x-databricks-field-behaviors_output_only": |- - true - "url": - "description": |- - The URL of the app once it is deployed. - "x-databricks-field-behaviors_output_only": |- - true - "usage_policy_id": {} - "user_api_scopes": {} -github.com/databricks/cli/bundle/config/resources.Catalog: - "comment": - "description": |- - User-provided free-form text description. - "connection_name": - "description": |- - The name of the connection to an external data source. - "managed_encryption_settings": - "description": |- - Control CMK encryption for managed catalog data - "name": - "description": |- - Name of catalog. - "options": - "description": |- - A map of key-value properties attached to the securable. - "properties": - "description": |- - A map of key-value properties attached to the securable. - "provider_name": - "description": |- - The name of delta sharing provider. - - A Delta Sharing catalog is a catalog that is based on a Delta share on a remote sharing server. - "share_name": - "description": |- - The name of the share under the share provider. - "storage_root": - "description": |- - Storage root URL for managed tables within catalog. -github.com/databricks/cli/bundle/config/resources.Cluster: - "_": - "description": |- - Contains a snapshot of the latest user specified settings that were used to create/edit the cluster. - "apply_policy_default_values": - "description": |- - 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": - "description": |- - 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. - "autotermination_minutes": - "description": |- - 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": - "description": |- - Attributes related to clusters running on Amazon Web Services. - If not specified at cluster creation, a set of default values will be used. - "azure_attributes": - "description": |- - Attributes related to clusters running on Microsoft Azure. - If not specified at cluster creation, a set of default values will be used. - "cluster_log_conf": - "description": |- - 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`. - "cluster_name": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - Custom docker image BYOC - "driver_instance_pool_id": - "description": |- - 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": - "description": |- - Flexible node type configuration for the driver node. - "driver_node_type_id": - "description": |- - 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": - "description": |- - 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": - "description": |- - Whether to enable LUKS on cluster VMs' local disks - "gcp_attributes": - "description": |- - Attributes related to clusters running on Google Cloud Platform. - If not specified at cluster creation, a set of default values will be used. - "init_scripts": - "description": |- - 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`. - "instance_pool_id": - "description": |- - The optional ID of the instance pool to which the cluster belongs. - "is_single_node": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - The ID of the cluster policy used to create the cluster if applicable. - "remote_disk_throughput": - "description": |- - If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks. - "runtime_engine": - "description": |- - Determines the cluster's runtime engine, either standard or Photon. - - This field is not compatible with legacy `spark_version` values that contain `-photon-`. - Remove `-photon-` from the `spark_version` and set `runtime_engine` to `PHOTON`. - - If left unspecified, the runtime engine defaults to standard unless the spark_version - contains -photon-, in which case Photon will be used. - "single_user_name": - "description": |- - Single user name if data_security_mode is `SINGLE_USER` - "spark_conf": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - Flexible node type configuration for worker nodes. - "workload_type": - "description": |- - Cluster Attributes showing for clusters workload types. -github.com/databricks/cli/bundle/config/resources.DatabaseCatalog: - "create_database_if_not_exists": {} - "database_instance_name": - "description": |- - The name of the DatabaseInstance housing the database. - "database_name": - "description": |- - The name of the database (in a instance) associated with the catalog. - "name": - "description": |- - The name of the catalog in UC. - "uid": - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/cli/bundle/config/resources.DatabaseInstance: - "_": - "description": |- - A DatabaseInstance represents a logical Postgres instance, comprised of both compute and storage. - "capacity": - "description": |- - The sku of the instance. Valid values are "CU_1", "CU_2", "CU_4", "CU_8". - "child_instance_refs": - "description": |- - The refs of the child instances. This is only available if the instance is - parent instance. - "x-databricks-field-behaviors_output_only": |- - true - "creation_time": - "description": |- - The timestamp when the instance was created. - "x-databricks-field-behaviors_output_only": |- - true - "creator": - "description": |- - The email of the creator of the instance. - "x-databricks-field-behaviors_output_only": |- - true - "custom_tags": - "description": |- - Custom tags associated with the instance. This field is only included on create and update responses. - "effective_capacity": - "description": |- - Deprecated. The sku of the instance; this field will always match the value of capacity. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "deprecation_message": |- - This field is deprecated - "x-databricks-field-behaviors_output_only": |- - true - "effective_custom_tags": - "description": |- - The recorded custom tags associated with the instance. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_enable_pg_native_login": - "description": |- - Whether the instance has PG native password login enabled. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_enable_readable_secondaries": - "description": |- - Whether secondaries serving read-only traffic are enabled. Defaults to false. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_node_count": - "description": |- - The number of nodes in the instance, composed of 1 primary and 0 or more secondaries. Defaults to - 1 primary and 0 secondaries. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_retention_window_in_days": - "description": |- - The retention window for the instance. This is the time window in days - for which the historical data is retained. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_stopped": - "description": |- - Whether the instance is stopped. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_usage_policy_id": - "description": |- - The policy that is applied to the instance. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "enable_pg_native_login": - "description": |- - Whether to enable PG native password login on the instance. Defaults to false. - "enable_readable_secondaries": - "description": |- - Whether to enable secondaries to serve read-only traffic. Defaults to false. - "name": - "description": |- - The name of the instance. This is the unique identifier for the instance. - "node_count": - "description": |- - 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": - "description": |- - 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. - "pg_version": - "description": |- - The version of Postgres running on the instance. - "x-databricks-field-behaviors_output_only": |- - true - "read_only_dns": - "description": |- - The DNS endpoint to connect to the instance for read only access. This is only available if - enable_readable_secondaries is true. - "x-databricks-field-behaviors_output_only": |- - true - "read_write_dns": - "description": |- - The DNS endpoint to connect to the instance for read+write access. - "x-databricks-field-behaviors_output_only": |- - true - "retention_window_in_days": - "description": |- - 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. - "state": - "description": |- - The current state of the instance. - "x-databricks-field-behaviors_output_only": |- - true - "stopped": - "description": |- - Whether to stop the instance. An input only param, see effective_stopped for the output. - "uid": - "description": |- - An immutable UUID identifier for the instance. - "x-databricks-field-behaviors_output_only": |- - true - "usage_policy_id": - "description": |- - The desired usage policy to associate with the instance. -github.com/databricks/cli/bundle/config/resources.ExternalLocation: - "comment": - "description": |- - User-provided free-form text description. - "credential_name": - "description": |- - Name of the storage credential used with this location. - "effective_enable_file_events": - "description": |- - The effective value of `enable_file_events` after applying server-side defaults. - "x-databricks-field-behaviors_output_only": |- - true - "effective_file_event_queue": - "description": |- - The effective file event queue configuration after applying server-side defaults. - Always populated when a queue is provisioned, regardless of whether the user explicitly - set `enable_file_events`. Use this field instead of `file_event_queue` for reading - the actual queue state. - "x-databricks-field-behaviors_output_only": |- - true - "enable_file_events": - "description": |- - Whether to enable file events on this external location. Default to `true`. Set to `false` to disable file events. - The actual applied value may differ due to server-side defaults; check `effective_enable_file_events` for the effective state. - "encryption_details": - "description": |- - Encryption options that apply to clients connecting to cloud storage. - "fallback": - "description": |- - Indicates whether fallback mode is enabled for this external location. When fallback mode is enabled, the access to the location falls back to cluster credentials if UC credentials are not sufficient. - "file_event_queue": - "description": |- - File event queue settings. If `enable_file_events` is not `false`, must be defined and have exactly one of the documented properties. - "name": - "description": |- - Name of the external location. - "read_only": - "description": |- - Indicates whether the external location is read-only. - "skip_validation": - "description": |- - Skips validation of the storage credential associated with the external location. - "url": - "description": |- - Path URL of the external location. -github.com/databricks/cli/bundle/config/resources.Job: - "budget_policy_id": - "description": |- - 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": - "description": |- - 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. - "deployment": - "description": |- - Deployment information for jobs managed by external sources. - "description": - "description": |- - An optional description for the job. The maximum length is 27700 characters in UTF-8 encoding. - "edit_mode": - "description": |- - 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": - "description": |- - 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. - "environments": - "description": |- - 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. - "format": - "description": |- - Used to tell what is the format of the job. This field is ignored in Create/Update/Reset calls. When using the Jobs API 2.1 this value is always set to `"MULTI_TASK"`. - "deprecation_message": |- - This field is deprecated - "git_source": - "description": |- - 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. - "health": - "description": |- - An optional set of health rules that can be defined for this job. - "job_clusters": - "description": |- - 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. - "max_concurrent_runs": - "description": |- - 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": - "description": |- - An optional name for the job. The maximum length is 4096 bytes in UTF-8 encoding. - "notification_settings": - "description": |- - Optional notification settings that are used when sending notifications to each of the `email_notifications` and `webhook_notifications` for this job. - "parameters": - "description": |- - Job-level parameter definitions - "performance_target": - "description": |- - 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. - "queue": - "description": |- - The queue settings of the job. - "run_as": - "description": |- - The user or service principal that the job runs as, if specified in the request. - This field indicates the explicit configuration of `run_as` for the job. - To find the value in all cases, explicit or implicit, use `run_as_user_name`. - "schedule": - "description": |- - 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`. - "tags": - "description": |- - 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": - "description": |- - 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. - "timeout_seconds": - "description": |- - An optional timeout applied to each run of this job. A value of `0` means no timeout. - "trigger": - "description": |- - 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`. - "usage_policy_id": - "description": |- - The id of the user specified usage policy to use for this job. - If not specified, a default usage policy may be applied when creating or modifying the job. - See `effective_usage_policy_id` for the usage policy used by this workload. - "x-databricks-preview": |- - PRIVATE - "webhook_notifications": - "description": |- - A collection of system notification IDs to notify when runs of this job begin or complete. -github.com/databricks/cli/bundle/config/resources.MlflowExperiment: - "artifact_location": - "description": |- - Location where all artifacts for the experiment are stored. - If not provided, the remote server will select an appropriate default. - "name": - "description": |- - Experiment name. - "tags": - "description": |- - 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. -github.com/databricks/cli/bundle/config/resources.MlflowModel: - "description": - "description": |- - Optional description for registered model. - "name": - "description": |- - Register models under this name - "tags": - "description": |- - Additional metadata for registered model. -github.com/databricks/cli/bundle/config/resources.ModelServingEndpoint: - "ai_gateway": - "description": |- - 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. - "budget_policy_id": - "description": |- - The budget policy to be applied to the serving endpoint. - "config": - "description": |- - The core config of the serving endpoint. - "description": {} - "email_notifications": - "description": |- - Email notification settings. - "name": - "description": |- - 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. - "rate_limits": - "description": |- - Rate limits to be applied to the serving endpoint. NOTE: this field is deprecated, please use AI Gateway to manage rate limits. - "deprecation_message": |- - This field is deprecated - "route_optimized": - "description": |- - Enable route optimization for the serving endpoint. - "tags": - "description": |- - Tags to be attached to the serving endpoint and automatically propagated to billing logs. -github.com/databricks/cli/bundle/config/resources.Pipeline: - "allow_duplicate_names": - "description": |- - If false, deployment will fail if name conflicts with that of another pipeline. - "budget_policy_id": - "description": |- - Budget policy of this pipeline. - "catalog": - "description": |- - 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": - "description": |- - SDP Release Channel that specifies which version to use. - "clusters": - "description": |- - Cluster settings for this pipeline deployment. - "configuration": - "description": |- - String-String configuration for this pipeline execution. - "continuous": - "description": |- - Whether the pipeline is continuous or triggered. This replaces `trigger`. - "deployment": - "description": |- - Deployment type of this pipeline. - "development": - "description": |- - Whether the pipeline is in Development mode. Defaults to false. - "dry_run": {} - "edition": - "description": |- - Pipeline product edition. - "environment": - "description": |- - Environment specification for this pipeline used to install dependencies. - "event_log": - "description": |- - Event log configuration for this pipeline - "filters": - "description": |- - Filters on which Pipeline packages to include in the deployed graph. - "gateway_definition": - "description": |- - The definition of a gateway pipeline to support change data capture. - "x-databricks-preview": |- - PRIVATE - "id": - "description": |- - Unique identifier for this pipeline. - "ingestion_definition": - "description": |- - The configuration for a managed ingestion pipeline. These settings cannot be used with the 'libraries', 'schema', 'target', or 'catalog' settings. - "libraries": - "description": |- - Libraries or code needed by this deployment. - "name": - "description": |- - Friendly identifier for this pipeline. - "notifications": - "description": |- - List of notification settings for this pipeline. - "parameters": - "description": |- - Key/value map of default parameters to use for pipeline execution. - Maximum total size: 10k characters (JSON format) - "photon": - "description": |- - Whether Photon is enabled for this pipeline. - "restart_window": - "description": |- - Restart window of this pipeline. - "x-databricks-preview": |- - PRIVATE - "root_path": - "description": |- - 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": - "description": |- - 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. - "schema": - "description": |- - The default schema (database) where tables are read from or published to. - "serverless": - "description": |- - Whether serverless compute is enabled for this pipeline. - "storage": - "description": |- - DBFS root directory for storing checkpoints and tables. - "tags": - "description": |- - 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": - "description": |- - Target schema (database) to add tables in this pipeline to. Exactly one of `schema` or `target` must be specified. To publish to Unity Catalog, also specify `catalog`. This legacy field is deprecated for pipeline creation in favor of the `schema` field. - "deprecation_message": |- - This field is deprecated - "trigger": - "description": |- - Which pipeline trigger to use. Deprecated: Use `continuous` instead. - "deprecation_message": |- - This field is deprecated - "usage_policy_id": - "description": |- - Usage policy of this pipeline. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/cli/bundle/config/resources.QualityMonitor: - "assets_dir": - "description": |- - [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": - "description": |- - [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": - "description": |- - [Create:OPT Update:OPT] Custom metrics. - "data_classification_config": - "description": |- - [Create:OPT Update:OPT] Data classification related config. - "x-databricks-preview": |- - PRIVATE - "inference_log": {} - "latest_monitor_failure_msg": - "description": |- - [Create:ERR Update:IGN] The latest error message for a monitor failure. - "notifications": - "description": |- - [Create:OPT Update:OPT] Field for specifying notification settings. - "output_schema_name": - "description": |- - [Create:REQ Update:REQ] Schema where output tables are created. Needs to be in 2-level format {catalog}.{schema} - "schedule": - "description": |- - [Create:OPT Update:OPT] The monitor schedule. - "skip_builtin_dashboard": - "description": |- - Whether to skip creating a default dashboard summarizing data quality metrics. - "slicing_exprs": - "description": |- - [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": - "description": |- - Configuration for monitoring snapshot tables. - "time_series": - "description": |- - Configuration for monitoring time series tables. - "warehouse_id": - "description": |- - Optional argument to specify the warehouse for dashboard creation. If not specified, the first running - warehouse will be used. -github.com/databricks/cli/bundle/config/resources.RegisteredModel: - "aliases": - "description": |- - List of aliases associated with the registered model - "browse_only": - "description": |- - Indicates whether the principal is limited to retrieving metadata for the associated object through the BROWSE privilege when include_browse is enabled in the request. - "catalog_name": - "description": |- - The name of the catalog where the schema and the registered model reside - "comment": - "description": |- - The comment attached to the registered model - "created_at": - "description": |- - Creation timestamp of the registered model in milliseconds since the Unix epoch - "created_by": - "description": |- - The identifier of the user who created the registered model - "full_name": - "description": |- - The three-level (fully qualified) name of the registered model - "metastore_id": - "description": |- - The unique identifier of the metastore - "name": - "description": |- - The name of the registered model - "owner": - "description": |- - The identifier of the user who owns the registered model - "schema_name": - "description": |- - The name of the schema where the registered model resides - "storage_location": - "description": |- - The storage location on the cloud under which model version data files are stored - "updated_at": - "description": |- - Last-update timestamp of the registered model in milliseconds since the Unix epoch - "updated_by": - "description": |- - The identifier of the user who updated the registered model last time -github.com/databricks/cli/bundle/config/resources.Schema: - "catalog_name": - "description": |- - Name of parent catalog. - "comment": - "description": |- - User-provided free-form text description. - "name": - "description": |- - Name of schema, relative to parent catalog. - "properties": - "description": |- - A map of key-value properties attached to the securable. - "storage_root": - "description": |- - Storage root URL for managed tables within schema. -github.com/databricks/cli/bundle/config/resources.SqlWarehouse: - "_": - "description": |- - Creates a new SQL warehouse. - "auto_stop_mins": - "description": |- - 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": - "description": |- - Channel Details - "cluster_size": - "description": |- - 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": - "description": |- - warehouse creator name - "enable_photon": - "description": |- - Configures whether the warehouse should use Photon optimized clusters. - - Defaults to true. - "enable_serverless_compute": - "description": |- - Configures whether the warehouse should use serverless compute - "instance_profile_arn": - "description": |- - Deprecated. Instance profile used to pass IAM role to the cluster - "deprecation_message": |- - This field is deprecated - "max_num_clusters": - "description": |- - 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": - "description": |- - 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": - "description": |- - Logical name for the cluster. - - Supported values: - - Must be unique within an org. - - Must be less than 100 characters. - "spot_instance_policy": - "description": |- - Configurations whether the endpoint should use spot instances. - "tags": - "description": |- - 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. - "warehouse_type": - "description": |- - Warehouse type: `PRO` or `CLASSIC`. If you want to use serverless compute, - you must set to `PRO` and also set the field `enable_serverless_compute` to `true`. -github.com/databricks/cli/bundle/config/resources.SyncedDatabaseTable: - "data_synchronization_status": - "description": |- - Synced Table data synchronization status - "x-databricks-field-behaviors_output_only": |- - true - "database_instance_name": - "description": |- - Name of the target database instance. This is required when creating synced database tables in standard catalogs. - This is optional when creating synced database tables in registered catalogs. If this field is specified - when creating synced database tables in registered catalogs, the database instance name MUST - match that of the registered catalog (or the request will be rejected). - "effective_database_instance_name": - "description": |- - The name of the database instance that this table is registered to. This field is always returned, and for - tables inside database catalogs is inferred database instance associated with the catalog. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "effective_logical_database_name": - "description": |- - The name of the logical database that this table is registered to. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "logical_database_name": - "description": |- - Target Postgres database object (logical database) name for this table. - - When creating a synced table in a registered Postgres catalog, the - target Postgres database name is inferred to be that of the registered catalog. - If this field is specified in this scenario, the Postgres database name MUST - match that of the registered catalog (or the request will be rejected). - - When creating a synced table in a standard catalog, this field is required. - In this scenario, specifying this field will allow targeting an arbitrary postgres database. - Note that this has implications for the `create_database_objects_is_missing` field in `spec`. - "name": - "description": |- - Full three-part (catalog, schema, table) name of the table. - "spec": - "description": |- - Specification of a synced database table. - "unity_catalog_provisioning_state": - "description": |- - The provisioning state of the synced table entity in Unity Catalog. This is distinct from the - state of the data synchronization pipeline (i.e. the table may be in "ACTIVE" but the pipeline - may be in "PROVISIONING" as it runs asynchronously). - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/cli/bundle/config/resources.VectorSearchEndpoint: - "budget_policy_id": - "description": |- - The budget policy id to be applied - "endpoint_type": - "description": |- - Type of endpoint - "name": - "description": |- - Name of the AI Search endpoint - "target_qps": - "description": |- - Target QPS for the endpoint. Mutually exclusive with num_replicas. - The actual replica count is calculated at index creation/sync time based on this value. - Best-effort target; the system does not guarantee this QPS will be achieved. - "usage_policy_id": - "description": |- - The usage policy id to be applied once we've migrated to usage policies - "x-databricks-preview": |- - PRIVATE -github.com/databricks/cli/bundle/config/resources.VectorSearchIndex: - "delta_sync_index_spec": - "description": |- - Specification for Delta Sync Index. Required if `index_type` is `DELTA_SYNC`. - "direct_access_index_spec": - "description": |- - Specification for Direct Vector Access Index. Required if `index_type` is `DIRECT_ACCESS`. - "endpoint_name": - "description": |- - Name of the endpoint to be used for serving the index - "index_subtype": - "description": |- - The subtype of the index. Use `HYBRID` or `FULL_TEXT`. `VECTOR` is not supported. - "index_type": - "description": |- - 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. - "name": - "description": |- - Name of the index - "primary_key": - "description": |- - Primary key of the index -github.com/databricks/cli/bundle/config/resources.Volume: - "catalog_name": - "description": |- - The name of the catalog where the schema and the volume are - "comment": - "description": |- - The comment attached to the volume - "name": - "description": |- - The name of the volume - "schema_name": - "description": |- - The name of the schema where the volume is - "storage_location": - "description": |- - The storage location on the cloud - "volume_type": - "description": |- - The type of the volume. An external volume is located in the specified external location. - A managed volume is located in the default location which is specified by the parent schema, or the parent catalog, or the Metastore. - [Learn more](https://docs.databricks.com/aws/en/volumes/managed-vs-external) -github.com/databricks/databricks-sdk-go/service/apps.AppDeployment: - "command": - "description": |- - The command with which to run the app. This will override the command specified in the app.yaml file. - "create_time": - "description": |- - The creation time of the deployment. Formatted timestamp in ISO 6801. - "x-databricks-field-behaviors_output_only": |- - true - "creator": - "description": |- - The email of the user creates the deployment. - "x-databricks-field-behaviors_output_only": |- - true - "deployment_artifacts": - "description": |- - The deployment artifacts for an app. - "x-databricks-field-behaviors_output_only": |- - true - "deployment_id": - "description": |- - The unique id of the deployment. - "env_vars": - "description": |- - The environment variables to set in the app runtime environment. This will override the environment variables specified in the app.yaml file. - "git_source": - "description": |- - Git repository to use as the source for the app deployment. - "mode": - "description": |- - The mode of which the deployment will manage the source code. - "source_code_path": - "description": |- - The workspace file system path of the source code used to create the app deployment. This is different from - `deployment_artifacts.source_code_path`, which is the path used by the deployed app. The former refers - to the original source code location of the app in the workspace during deployment creation, whereas - the latter provides a system generated stable snapshotted source code path used by the deployment. - "status": - "description": |- - Status and status message of the deployment - "x-databricks-field-behaviors_output_only": |- - true - "update_time": - "description": |- - The update time of the deployment. Formatted timestamp in ISO 6801. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentArtifacts: - "source_code_path": - "description": |- - The snapshotted workspace file system path of the source code loaded by the deployed app. -github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentMode: - "_": - "enum": - - |- - SNAPSHOT - - |- - AUTO_SYNC -github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentState: - "_": - "enum": - - |- - SUCCEEDED - - |- - FAILED - - |- - IN_PROGRESS - - |- - CANCELLED -github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentStatus: - "message": - "description": |- - Message corresponding with the deployment state. - "x-databricks-field-behaviors_output_only": |- - true - "state": - "description": |- - State of the deployment. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/apps.AppPermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - CAN_USE -github.com/databricks/databricks-sdk-go/service/apps.AppResource: - "app": {} - "database": {} - "description": - "description": |- - Description of the App Resource. - "experiment": {} - "genie_space": {} - "job": {} - "name": - "description": |- - Name of the App Resource. - "postgres": {} - "secret": {} - "serving_endpoint": {} - "sql_warehouse": {} - "uc_securable": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourceApp: - "name": {} - "permission": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourceAppAppPermission: - "_": - "enum": - - |- - CAN_USE -github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabase: - "database_name": {} - "instance_name": {} - "permission": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabaseDatabasePermission: - "_": - "enum": - - |- - CAN_CONNECT_AND_CREATE -github.com/databricks/databricks-sdk-go/service/apps.AppResourceExperiment: - "experiment_id": {} - "permission": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourceExperimentExperimentPermission: - "_": - "enum": - - |- - CAN_MANAGE - - |- - CAN_EDIT - - |- - CAN_READ -github.com/databricks/databricks-sdk-go/service/apps.AppResourceGenieSpace: - "name": {} - "permission": {} - "space_id": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourceGenieSpaceGenieSpacePermission: - "_": - "enum": - - |- - CAN_MANAGE - - |- - CAN_EDIT - - |- - CAN_RUN - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/apps.AppResourceJob: - "id": - "description": |- - Id of the job to grant permission on. - "permission": - "description": |- - Permissions to grant on the Job. Supported permissions are: "CAN_MANAGE", "IS_OWNER", "CAN_MANAGE_RUN", "CAN_VIEW". -github.com/databricks/databricks-sdk-go/service/apps.AppResourceJobJobPermission: - "_": - "enum": - - |- - CAN_MANAGE - - |- - IS_OWNER - - |- - CAN_MANAGE_RUN - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgres: - "branch": {} - "database": {} - "permission": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgresPostgresPermission: - "_": - "enum": - - |- - CAN_CONNECT_AND_CREATE -github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecret: - "key": - "description": |- - Key of the secret to grant permission on. - "permission": - "description": |- - Permission to grant on the secret scope. For secrets, only one permission is allowed. Permission must be one of: "READ", "WRITE", "MANAGE". - "scope": - "description": |- - Scope of the secret to grant permission on. -github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecretSecretPermission: - "_": - "description": |- - Permission to grant on the secret scope. Supported permissions are: "READ", "WRITE", "MANAGE". - "enum": - - |- - READ - - |- - WRITE - - |- - MANAGE -github.com/databricks/databricks-sdk-go/service/apps.AppResourceServingEndpoint: - "name": - "description": |- - Name of the serving endpoint to grant permission on. - "permission": - "description": |- - Permission to grant on the serving endpoint. Supported permissions are: "CAN_MANAGE", "CAN_QUERY", "CAN_VIEW". -github.com/databricks/databricks-sdk-go/service/apps.AppResourceServingEndpointServingEndpointPermission: - "_": - "enum": - - |- - CAN_MANAGE - - |- - CAN_QUERY - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/apps.AppResourceSqlWarehouse: - "id": - "description": |- - Id of the SQL warehouse to grant permission on. - "permission": - "description": |- - Permission to grant on the SQL warehouse. Supported permissions are: "CAN_MANAGE", "CAN_USE", "IS_OWNER". -github.com/databricks/databricks-sdk-go/service/apps.AppResourceSqlWarehouseSqlWarehousePermission: - "_": - "enum": - - |- - CAN_MANAGE - - |- - CAN_USE - - |- - IS_OWNER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceUcSecurable: - "permission": {} - "securable_full_name": {} - "securable_kind": - "description": |- - The securable kind from Unity Catalog. - See https://docs.databricks.com/api/workspace/tables/get#securable_kind_manifest-securable_kind. - "x-databricks-field-behaviors_output_only": |- - true - "securable_type": {} -github.com/databricks/databricks-sdk-go/service/apps.AppResourceUcSecurableUcSecurablePermission: - "_": - "enum": - - |- - READ_VOLUME - - |- - WRITE_VOLUME - - |- - SELECT - - |- - EXECUTE - - |- - USE_CONNECTION - - |- - MODIFY -github.com/databricks/databricks-sdk-go/service/apps.AppResourceUcSecurableUcSecurableType: - "_": - "enum": - - |- - VOLUME - - |- - TABLE - - |- - FUNCTION - - |- - CONNECTION -github.com/databricks/databricks-sdk-go/service/apps.ApplicationState: - "_": - "enum": - - |- - DEPLOYING - - |- - RUNNING - - |- - CRASHED - - |- - UNAVAILABLE -github.com/databricks/databricks-sdk-go/service/apps.ApplicationStatus: - "message": - "description": |- - Application status message - "x-databricks-field-behaviors_output_only": |- - true - "state": - "description": |- - State of the application. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/apps.ComputeSize: - "_": - "enum": - - |- - MEDIUM - - |- - LARGE -github.com/databricks/databricks-sdk-go/service/apps.ComputeState: - "_": - "enum": - - |- - ERROR - - |- - DELETING - - |- - STARTING - - |- - STOPPING - - |- - UPDATING - - |- - STOPPED - - |- - ACTIVE -github.com/databricks/databricks-sdk-go/service/apps.ComputeStatus: - "active_instances": - "description": |- - The number of compute instances currently serving requests for this - application. An instance is considered active if it is reachable and ready - to handle requests. - "x-databricks-field-behaviors_output_only": |- - true - "x-databricks-preview": |- - PRIVATE - "message": - "description": |- - Compute status message - "x-databricks-field-behaviors_output_only": |- - true - "state": - "description": |- - State of the app compute. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/apps.EnvVar: - "name": - "description": |- - The name of the environment variable. - "value": - "description": |- - The value for the environment variable. - "value_from": - "description": |- - The name of an external Databricks resource that contains the value, such as a secret or a database table. -github.com/databricks/databricks-sdk-go/service/apps.GitRepository: - "_": - "description": |- - Git repository configuration specifying the location of the repository. - "provider": - "description": |- - Git provider. Case insensitive. Supported values: gitHub, gitHubEnterprise, bitbucketCloud, - bitbucketServer, azureDevOpsServices, gitLab, gitLabEnterpriseEdition, awsCodeCommit. - "url": - "description": |- - URL of the Git repository. -github.com/databricks/databricks-sdk-go/service/apps.GitSource: - "_": - "description": |- - Complete git source specification including repository location and reference. - "branch": - "description": |- - Git branch to checkout. - "commit": - "description": |- - Git commit SHA to checkout. - "git_repository": - "description": |- - Git repository configuration. Populated from the app's git_repository configuration. - "x-databricks-field-behaviors_output_only": |- - true - "resolved_commit": - "description": |- - The resolved commit SHA that was actually used for the deployment. This is populated by the - system after resolving the reference (branch, tag, or commit). If commit is specified - directly, this will match commit. If a branch or tag is specified, this contains the - commit SHA that the branch or tag pointed to at deployment time. - "x-databricks-field-behaviors_output_only": |- - true - "source_code_path": - "description": |- - Relative path to the app source code within the Git repository. If not specified, the root - of the repository is used. - "tag": - "description": |- - Git tag to checkout. -github.com/databricks/databricks-sdk-go/service/apps.TelemetryExportDestination: - "_": - "description": |- - A single telemetry export destination with its configuration and status. - "unity_catalog": - "description": |- - Unity Catalog Destinations for OTEL telemetry export. -github.com/databricks/databricks-sdk-go/service/apps.UnityCatalog: - "_": - "description": |- - Unity Catalog Destinations for OTEL telemetry export. - "logs_table": - "description": |- - Unity Catalog table for OTEL logs. - "metrics_table": - "description": |- - Unity Catalog table for OTEL metrics. - "traces_table": - "description": |- - Unity Catalog table for OTEL traces (spans). -github.com/databricks/databricks-sdk-go/service/catalog.AwsSqsQueue: - "managed_resource_id": - "description": |- - Unique identifier included in the name of file events managed cloud resources. - "x-databricks-field-behaviors_output_only": |- - true - "queue_url": - "description": |- - The AQS queue url in the format https://sqs.{region}.amazonaws.com/{account id}/{queue name}. - Only required for provided_sqs. -github.com/databricks/databricks-sdk-go/service/catalog.AzureEncryptionSettings: - "azure_cmk_access_connector_id": {} - "azure_cmk_managed_identity_id": {} - "azure_tenant_id": {} -github.com/databricks/databricks-sdk-go/service/catalog.AzureQueueStorage: - "managed_resource_id": - "description": |- - Unique identifier included in the name of file events managed cloud resources. - "x-databricks-field-behaviors_output_only": |- - true - "queue_url": - "description": |- - The AQS queue url in the format https://{storage account}.queue.core.windows.net/{queue name} - Only required for provided_aqs. - "resource_group": - "description": |- - Optional resource group for the queue, event grid subscription, and external location storage - account. - Only required for locations with a service principal storage credential - "subscription_id": - "description": |- - Optional subscription id for the queue, event grid subscription, and external location storage - account. - Required for locations with a service principal storage credential -github.com/databricks/databricks-sdk-go/service/catalog.EncryptionDetails: - "_": - "description": |- - Encryption options that apply to clients connecting to cloud storage. - "sse_encryption_details": - "description": |- - Server-Side Encryption properties for clients communicating with AWS s3. -github.com/databricks/databricks-sdk-go/service/catalog.EncryptionSettings: - "_": - "description": |- - Encryption Settings are used to carry metadata for securable encryption at rest. - Currently used for catalogs, we can use the information supplied here to interact with a CMK. - "azure_encryption_settings": - "description": |- - optional Azure settings - only required if an Azure CMK is used. - "azure_key_vault_key_id": - "description": |- - the AKV URL in Azure, null otherwise. - "customer_managed_key_id": - "description": |- - the CMK uuid in AWS and GCP, null otherwise. -github.com/databricks/databricks-sdk-go/service/catalog.FileEventQueue: - "managed_aqs": {} - "managed_pubsub": {} - "managed_sqs": {} - "provided_aqs": {} - "provided_pubsub": {} - "provided_sqs": {} -github.com/databricks/databricks-sdk-go/service/catalog.GcpPubsub: - "managed_resource_id": - "description": |- - Unique identifier included in the name of file events managed cloud resources. - "x-databricks-field-behaviors_output_only": |- - true - "subscription_name": - "description": |- - The Pub/Sub subscription name in the format projects/{project}/subscriptions/{subscription name}. - Only required for provided_pubsub. -github.com/databricks/databricks-sdk-go/service/catalog.MonitorCronSchedule: - "pause_status": - "description": |- - Read only field that indicates whether a schedule is paused or not. - "quartz_cron_expression": - "description": |- - 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": - "description": |- - The timezone id (e.g., ``PST``) in which to evaluate the quartz expression. -github.com/databricks/databricks-sdk-go/service/catalog.MonitorCronSchedulePauseStatus: - "_": - "description": |- - Source link: https://src.dev.databricks.com/databricks/universe/-/blob/elastic-spark-common/api/messages/schedule.proto - Monitoring workflow schedule pause status. - "enum": - - |- - UNSPECIFIED - - |- - UNPAUSED - - |- - PAUSED -github.com/databricks/databricks-sdk-go/service/catalog.MonitorDataClassificationConfig: - "_": - "description": |- - Data classification related configuration. - "enabled": - "description": |- - Whether to enable data classification. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/catalog.MonitorDestination: - "email_addresses": - "description": |- - The list of email addresses to send the notification to. A maximum of 5 email addresses is supported. -github.com/databricks/databricks-sdk-go/service/catalog.MonitorInferenceLog: - "granularities": - "description": |- - List of granularities to use when aggregating data into time windows based on their timestamp. - "label_col": - "description": |- - Column for the label. - "model_id_col": - "description": |- - Column for the model identifier. - "prediction_col": - "description": |- - Column for the prediction. - "prediction_proba_col": - "description": |- - Column for prediction probabilities - "problem_type": - "description": |- - Problem type the model aims to solve. - "timestamp_col": - "description": |- - Column for the timestamp. -github.com/databricks/databricks-sdk-go/service/catalog.MonitorInferenceLogProblemType: - "_": - "enum": - - |- - PROBLEM_TYPE_CLASSIFICATION - - |- - PROBLEM_TYPE_REGRESSION -github.com/databricks/databricks-sdk-go/service/catalog.MonitorMetric: - "_": - "description": |- - Custom metric definition. - "definition": - "description": |- - 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": - "description": |- - 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": - "description": |- - Name of the metric in the output tables. - "output_data_type": - "description": |- - The output type of the custom metric. - "type": - "description": |- - 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 -github.com/databricks/databricks-sdk-go/service/catalog.MonitorMetricType: - "_": - "description": |- - 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 - "enum": - - |- - CUSTOM_METRIC_TYPE_AGGREGATE - - |- - CUSTOM_METRIC_TYPE_DERIVED - - |- - CUSTOM_METRIC_TYPE_DRIFT -github.com/databricks/databricks-sdk-go/service/catalog.MonitorNotifications: - "on_failure": - "description": |- - Destinations to send notifications on failure/timeout. - "on_new_classification_tag_detected": - "description": |- - Destinations to send notifications on new classification tag detected. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/catalog.MonitorSnapshot: - "_": - "description": |- - Snapshot analysis configuration -github.com/databricks/databricks-sdk-go/service/catalog.MonitorTimeSeries: - "_": - "description": |- - Time series analysis configuration. - "granularities": - "description": |- - Granularities for aggregating data into time windows based on their timestamp. Currently the following static - granularities are supported: - {``\"5 minutes\"``, ``\"30 minutes\"``, ``\"1 hour\"``, ``\"1 day\"``, ``\"\u003cn\u003e week(s)\"``, ``\"1 month\"``, ``\"1 year\"``}. - "timestamp_col": - "description": |- - Column for the timestamp. -github.com/databricks/databricks-sdk-go/service/catalog.Privilege: - "_": - "enum": - - |- - SELECT - - |- - READ_PRIVATE_FILES - - |- - WRITE_PRIVATE_FILES - - |- - CREATE - - |- - USAGE - - |- - USE_CATALOG - - |- - USE_SCHEMA - - |- - CREATE_SCHEMA - - |- - CREATE_VIEW - - |- - CREATE_EXTERNAL_TABLE - - |- - CREATE_MATERIALIZED_VIEW - - |- - CREATE_FUNCTION - - |- - CREATE_MODEL - - |- - CREATE_CATALOG - - |- - CREATE_MANAGED_STORAGE - - |- - CREATE_EXTERNAL_LOCATION - - |- - CREATE_STORAGE_CREDENTIAL - - |- - CREATE_SERVICE_CREDENTIAL - - |- - ACCESS - - |- - CREATE_SHARE - - |- - CREATE_RECIPIENT - - |- - CREATE_PROVIDER - - |- - USE_SHARE - - |- - USE_RECIPIENT - - |- - USE_PROVIDER - - |- - USE_MARKETPLACE_ASSETS - - |- - SET_SHARE_PERMISSION - - |- - MODIFY - - |- - REFRESH - - |- - EXECUTE - - |- - READ_FILES - - |- - WRITE_FILES - - |- - CREATE_TABLE - - |- - ALL_PRIVILEGES - - |- - CREATE_CONNECTION - - |- - USE_CONNECTION - - |- - APPLY_TAG - - |- - CREATE_FOREIGN_CATALOG - - |- - CREATE_FOREIGN_SECURABLE - - |- - MANAGE_ALLOWLIST - - |- - CREATE_VOLUME - - |- - CREATE_EXTERNAL_VOLUME - - |- - READ_VOLUME - - |- - WRITE_VOLUME - - |- - MANAGE - - |- - BROWSE - - |- - CREATE_CLEAN_ROOM - - |- - MODIFY_CLEAN_ROOM - - |- - EXECUTE_CLEAN_ROOM_TASK - - |- - EXTERNAL_USE_SCHEMA -github.com/databricks/databricks-sdk-go/service/catalog.PrivilegeAssignment: - "principal": - "description": |- - The principal (user email address or group name). - For deleted principals, `principal` is empty while `principal_id` is populated. - "privileges": - "description": |- - The privileges assigned to the principal. -github.com/databricks/databricks-sdk-go/service/catalog.RegisteredModelAlias: - "alias_name": - "description": |- - Name of the alias, e.g. 'champion' or 'latest_stable' - "catalog_name": - "description": |- - The name of the catalog containing the model version - "id": - "description": |- - The unique identifier of the alias - "model_name": - "description": |- - The name of the parent registered model of the model version, relative to parent schema - "schema_name": - "description": |- - The name of the schema containing the model version, relative to parent catalog - "version_num": - "description": |- - Integer version number of the model version to which this alias points. -github.com/databricks/databricks-sdk-go/service/catalog.SseEncryptionDetails: - "_": - "description": |- - Server-Side Encryption properties for clients communicating with AWS s3. - "algorithm": - "description": |- - Sets the value of the 'x-amz-server-side-encryption' header in S3 request. - "aws_kms_key_arn": - "description": |- - Optional. The ARN of the SSE-KMS key used with the S3 location, when algorithm = "SSE-KMS". - Sets the value of the 'x-amz-server-side-encryption-aws-kms-key-id' header. -github.com/databricks/databricks-sdk-go/service/catalog.SseEncryptionDetailsAlgorithm: - "_": - "enum": - - |- - AWS_SSE_S3 - - |- - AWS_SSE_KMS -github.com/databricks/databricks-sdk-go/service/catalog.VolumeType: - "_": - "enum": - - |- - MANAGED - - |- - EXTERNAL -github.com/databricks/databricks-sdk-go/service/compute.Adlsgen2Info: - "_": - "description": |- - A storage location in Adls Gen2 - "destination": - "description": |- - abfss destination, e.g. `abfss://@.dfs.core.windows.net/`. -github.com/databricks/databricks-sdk-go/service/compute.AutoScale: - "max_workers": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/compute.AwsAttributes: - "_": - "description": |- - Attributes set during cluster creation which are related to Amazon Web Services. - "availability": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - The type of EBS volumes that will be launched with this cluster. - "first_on_demand": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/compute.AwsAvailability: - "_": - "description": |- - 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. - "enum": - - |- - SPOT - - |- - ON_DEMAND - - |- - SPOT_WITH_FALLBACK -github.com/databricks/databricks-sdk-go/service/compute.AzureAttributes: - "_": - "description": |- - Attributes set during cluster creation which are related to Microsoft Azure. - "availability": - "description": |- - 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": - "description": |- - 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": - "description": |- - Defines values necessary to configure and run Azure Log Analytics agent - "spot_bid_max_price": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/compute.AzureAvailability: - "_": - "description": |- - 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. - "enum": - - |- - SPOT_AZURE - - |- - ON_DEMAND_AZURE - - |- - SPOT_WITH_FALLBACK_AZURE -github.com/databricks/databricks-sdk-go/service/compute.ClientsTypes: - "jobs": - "description": |- - With jobs set, the cluster can be used for jobs - "notebooks": - "description": |- - With notebooks set, this cluster can be used for notebooks -github.com/databricks/databricks-sdk-go/service/compute.ClusterLogConf: - "_": - "description": |- - Cluster log delivery config - "dbfs": - "description": |- - destination needs to be provided. e.g. - `{ "dbfs" : { "destination" : "dbfs:/home/cluster_log" } }` - "s3": - "description": |- - 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. - "volumes": - "description": |- - destination needs to be provided, e.g. - `{ "volumes": { "destination": "/Volumes/catalog/schema/volume/cluster_log" } }` -github.com/databricks/databricks-sdk-go/service/compute.ClusterPermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - CAN_RESTART - - |- - CAN_ATTACH_TO -github.com/databricks/databricks-sdk-go/service/compute.ClusterSpec: - "_": - "description": |- - Contains a snapshot of the latest user specified settings that were used to create/edit the cluster. - "apply_policy_default_values": - "description": |- - 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": - "description": |- - 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. - "autotermination_minutes": - "description": |- - 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": - "description": |- - Attributes related to clusters running on Amazon Web Services. - If not specified at cluster creation, a set of default values will be used. - "azure_attributes": - "description": |- - Attributes related to clusters running on Microsoft Azure. - If not specified at cluster creation, a set of default values will be used. - "cluster_log_conf": - "description": |- - 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`. - "cluster_name": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - Custom docker image BYOC - "driver_instance_pool_id": - "description": |- - 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": - "description": |- - Flexible node type configuration for the driver node. - "driver_node_type_id": - "description": |- - 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": - "description": |- - 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": - "description": |- - Whether to enable LUKS on cluster VMs' local disks - "gcp_attributes": - "description": |- - Attributes related to clusters running on Google Cloud Platform. - If not specified at cluster creation, a set of default values will be used. - "init_scripts": - "description": |- - 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`. - "instance_pool_id": - "description": |- - The optional ID of the instance pool to which the cluster belongs. - "is_single_node": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - The ID of the cluster policy used to create the cluster if applicable. - "remote_disk_throughput": - "description": |- - If set, what the configurable throughput (in Mb/s) for the remote disk is. Currently only supported for GCP HYPERDISK_BALANCED disks. - "runtime_engine": - "description": |- - Determines the cluster's runtime engine, either standard or Photon. - - This field is not compatible with legacy `spark_version` values that contain `-photon-`. - Remove `-photon-` from the `spark_version` and set `runtime_engine` to `PHOTON`. - - If left unspecified, the runtime engine defaults to standard unless the spark_version - contains -photon-, in which case Photon will be used. - "single_user_name": - "description": |- - Single user name if data_security_mode is `SINGLE_USER` - "spark_conf": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - Flexible node type configuration for worker nodes. - "workload_type": - "description": |- - Cluster Attributes showing for clusters workload types. -github.com/databricks/databricks-sdk-go/service/compute.ConfidentialComputeType: - "_": - "description": |- - Confidential computing technology for GCP instances. - Aligns with gcloud's --confidential-compute-type flag and the REST API's - confidentialInstanceConfig.confidentialInstanceType field. - See: https://cloud.google.com/confidential-computing/confidential-vm/docs/create-a-confidential-vm-instance - "enum": - - |- - CONFIDENTIAL_COMPUTE_TYPE_NONE - - |- - SEV_SNP -github.com/databricks/databricks-sdk-go/service/compute.DataSecurityMode: - "_": - "description": |- - 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. - "enum": - - |- - NONE - - |- - SINGLE_USER - - |- - USER_ISOLATION - - |- - LEGACY_TABLE_ACL - - |- - LEGACY_PASSTHROUGH - - |- - LEGACY_SINGLE_USER - - |- - LEGACY_SINGLE_USER_STANDARD - - |- - DATA_SECURITY_MODE_STANDARD - - |- - DATA_SECURITY_MODE_DEDICATED - - |- - DATA_SECURITY_MODE_AUTO -github.com/databricks/databricks-sdk-go/service/compute.DbfsStorageInfo: - "_": - "description": |- - A storage location in DBFS - "destination": - "description": |- - dbfs destination, e.g. `dbfs:/my/path` -github.com/databricks/databricks-sdk-go/service/compute.DockerBasicAuth: - "password": - "description": |- - Password of the user - "username": - "description": |- - Name of the user -github.com/databricks/databricks-sdk-go/service/compute.DockerImage: - "basic_auth": - "description": |- - Basic auth with username and password - "url": - "description": |- - URL of the docker image. -github.com/databricks/databricks-sdk-go/service/compute.EbsVolumeType: - "_": - "description": |- - All EBS volume types that Databricks supports. - See https://aws.amazon.com/ebs/details/ for details. - "enum": - - |- - GENERAL_PURPOSE_SSD - - |- - THROUGHPUT_OPTIMIZED_HDD -github.com/databricks/databricks-sdk-go/service/compute.Environment: - "_": - "description": |- - 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. - "base_environment": - "description": |- - 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": - "description": |- - Use `environment_version` instead. - "deprecation_message": |- - This field is deprecated - "dependencies": - "description": |- - List of pip dependencies, as supported by the version of pip in this environment. - Each dependency is a valid pip requirements file line per https://pip.pypa.io/en/stable/reference/requirements-file-format/. - Allowed dependencies include a requirement specifier, an archive URL, a local project path (such as WSFS or UC Volumes in Databricks), or a VCS project URL. - "environment_version": - "description": |- - 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": - "description": |- - List of java dependencies. Each dependency is a string representing a java library path. For example: `/Volumes/path/to/test.jar`. -github.com/databricks/databricks-sdk-go/service/compute.GcpAttributes: - "_": - "description": |- - Attributes set during cluster creation which are related to GCP. - "availability": - "description": |- - This field determines whether the spark executors will be scheduled to run on preemptible - VMs, on-demand VMs, or preemptible VMs with a fallback to on-demand VMs if the former is unavailable. - "boot_disk_size": - "description": |- - Boot disk size in GB - "confidential_compute_type": - "description": |- - The confidential computing technology for this cluster's instances. - Currently only SEV_SNP is supported, and only on N2D instance types. - When not set, no confidential computing is applied. - "x-databricks-preview": |- - PRIVATE - "first_on_demand": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - This field determines whether the spark executors will be scheduled to run on preemptible - VMs (when set to true) versus standard compute engine VMs (when set to false; default). - Note: Soon to be deprecated, use the 'availability' field instead. - "deprecation_message": |- - This field is deprecated - "zone_id": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/compute.GcpAvailability: - "_": - "description": |- - 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. - "enum": - - |- - PREEMPTIBLE_GCP - - |- - ON_DEMAND_GCP - - |- - PREEMPTIBLE_WITH_FALLBACK_GCP -github.com/databricks/databricks-sdk-go/service/compute.GcsStorageInfo: - "_": - "description": |- - A storage location in Google Cloud Platform's GCS - "destination": - "description": |- - GCS destination/URI, e.g. `gs://my-bucket/some-prefix` -github.com/databricks/databricks-sdk-go/service/compute.HardwareAcceleratorType: - "_": - "description": |- - HardwareAcceleratorType: The type of hardware accelerator to use for compute workloads. - NOTE: This enum is referenced and is intended to be used by other Databricks services - that need to specify hardware accelerator requirements for AI compute workloads. - "enum": - - |- - GPU_1xA10 - - |- - GPU_8xH100 -github.com/databricks/databricks-sdk-go/service/compute.InitScriptInfo: - "_": - "description": |- - Config for an individual init script - Next ID: 11 - "abfss": - "description": |- - destination needs to be provided, e.g. - `abfss://@.dfs.core.windows.net/` - "dbfs": - "description": |- - destination needs to be provided. e.g. - `{ "dbfs": { "destination" : "dbfs:/home/cluster_log" } }` - "deprecation_message": |- - This field is deprecated - "file": - "description": |- - destination needs to be provided, e.g. - `{ "file": { "destination": "file:/my/local/file.sh" } }` - "gcs": - "description": |- - destination needs to be provided, e.g. - `{ "gcs": { "destination": "gs://my-bucket/file.sh" } }` - "s3": - "description": |- - 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. - "volumes": - "description": |- - destination needs to be provided. e.g. - `{ \"volumes\" : { \"destination\" : \"/Volumes/my-init.sh\" } }` - "workspace": - "description": |- - destination needs to be provided, e.g. - `{ "workspace": { "destination": "/cluster-init-scripts/setup-datadog.sh" } }` -github.com/databricks/databricks-sdk-go/service/compute.Kind: - "_": - "description": |- - 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`. - "enum": - - |- - CLASSIC_PREVIEW -github.com/databricks/databricks-sdk-go/service/compute.Library: - "cran": - "description": |- - Specification of a CRAN library to be installed as part of the library - "egg": - "description": |- - Deprecated. URI of the egg library to install. Installing Python egg files is deprecated and is not supported in Databricks Runtime 14.0 and above. - "deprecation_message": |- - This field is deprecated - "jar": - "description": |- - 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": - "description": |- - Specification of a maven library to be installed. For example: - `{ "coordinates": "org.jsoup:jsoup:1.7.2" }` - "pypi": - "description": |- - Specification of a PyPi library to be installed. For example: - `{ "package": "simplejson" }` - "requirements": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/compute.LocalFileInfo: - "destination": - "description": |- - local file destination, e.g. `file:/my/local/file.sh` -github.com/databricks/databricks-sdk-go/service/compute.LogAnalyticsInfo: - "log_analytics_primary_key": {} - "log_analytics_workspace_id": {} -github.com/databricks/databricks-sdk-go/service/compute.MavenLibrary: - "coordinates": - "description": |- - Gradle-style maven coordinates. For example: "org.jsoup:jsoup:1.7.2". - "exclusions": - "description": |- - 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": - "description": |- - Maven repo to install the Maven package from. If omitted, both Maven Central Repository - and Spark Packages are searched. -github.com/databricks/databricks-sdk-go/service/compute.NodeTypeFlexibility: - "_": - "description": |- - Configuration for flexible node types, allowing fallback to alternate node types during cluster launch and upscale. - "alternate_node_type_ids": - "description": |- - A list of node type IDs to use as fallbacks when the primary node type is unavailable. -github.com/databricks/databricks-sdk-go/service/compute.PythonPyPiLibrary: - "package": - "description": |- - The name of the pypi package to install. An optional exact version specification is also - supported. Examples: "simplejson" and "simplejson==3.8.0". - "repo": - "description": |- - The repository where the package can be found. If not specified, the default pip index is - used. -github.com/databricks/databricks-sdk-go/service/compute.RCranLibrary: - "package": - "description": |- - The name of the CRAN package to install. - "repo": - "description": |- - The repository where the package can be found. If not specified, the default CRAN repo is used. -github.com/databricks/databricks-sdk-go/service/compute.RuntimeEngine: - "_": - "enum": - - |- - NULL - - |- - STANDARD - - |- - PHOTON -github.com/databricks/databricks-sdk-go/service/compute.S3StorageInfo: - "_": - "description": |- - A storage location in Amazon S3 - "canned_acl": - "description": |- - (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": - "description": |- - 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": - "description": |- - (Optional) Flag to enable server side encryption, `false` by default. - "encryption_type": - "description": |- - (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": - "description": |- - 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": - "description": |- - (Optional) Kms key which will be used if encryption is enabled and encryption type is set to `sse-kms`. - "region": - "description": |- - S3 region, e.g. `us-west-2`. Either region or endpoint needs to be set. If both are set, - endpoint will be used. -github.com/databricks/databricks-sdk-go/service/compute.VolumesStorageInfo: - "_": - "description": |- - A storage location back by UC Volumes. - "destination": - "description": |- - 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` -github.com/databricks/databricks-sdk-go/service/compute.WorkloadType: - "_": - "description": |- - Cluster Attributes showing for clusters workload types. - "clients": - "description": |- - defined what type of clients can use the cluster. E.g. Notebooks, Jobs -github.com/databricks/databricks-sdk-go/service/compute.WorkspaceStorageInfo: - "_": - "description": |- - A storage location in Workspace Filesystem (WSFS) - "destination": - "description": |- - wsfs destination, e.g. `workspace:/cluster-init-scripts/setup-datadog.sh` -github.com/databricks/databricks-sdk-go/service/dashboards.LifecycleState: - "_": - "enum": - - |- - ACTIVE - - |- - TRASHED -github.com/databricks/databricks-sdk-go/service/database.CustomTag: - "key": - "description": |- - The key of the custom tag. - "value": - "description": |- - The value of the custom tag. -github.com/databricks/databricks-sdk-go/service/database.DatabaseInstanceRef: - "_": - "description": |- - DatabaseInstanceRef is a reference to a database instance. It is used in the - DatabaseInstance object to refer to the parent instance of an instance and - to refer the child instances of an instance. - To specify as a parent instance during creation of an instance, - the lsn and branch_time fields are optional. If not specified, the child - instance will be created from the latest lsn of the parent. - If both lsn and branch_time are specified, the lsn will be used to create - the child instance. - "branch_time": - "description": |- - 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. - "effective_lsn": - "description": |- - For a parent ref instance, this is the LSN on the parent instance from which the - instance was created. - For a child ref instance, this is the LSN on the instance from which the child instance - was created. - This is an output only field that contains the value computed from the input field combined with - server side defaults. Use the field without the effective_ prefix to set the value. - "x-databricks-field-behaviors_output_only": |- - true - "lsn": - "description": |- - 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": - "description": |- - Name of the ref database instance. - "uid": - "description": |- - Id of the ref database instance. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.DatabaseInstanceState: - "_": - "enum": - - |- - STARTING - - |- - AVAILABLE - - |- - DELETING - - |- - STOPPED - - |- - UPDATING - - |- - FAILING_OVER -github.com/databricks/databricks-sdk-go/service/database.DeltaTableSyncInfo: - "delta_commit_timestamp": - "description": |- - The timestamp when the above Delta version was committed in the source Delta table. - Note: This is the Delta commit time, not the time the data was written to the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "delta_commit_version": - "description": |- - The Delta Lake commit version that was last successfully synced. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.NewPipelineSpec: - "_": - "description": |- - Custom fields that user can set for pipeline while creating SyncedDatabaseTable. - Note that other fields of pipeline are still inferred by table def internally - "budget_policy_id": - "description": |- - Budget policy to set on the newly created pipeline. - "storage_catalog": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/database.ProvisioningInfoState: - "_": - "enum": - - |- - PROVISIONING - - |- - ACTIVE - - |- - FAILED - - |- - DELETING - - |- - UPDATING - - |- - DEGRADED -github.com/databricks/databricks-sdk-go/service/database.ProvisioningPhase: - "_": - "enum": - - |- - PROVISIONING_PHASE_MAIN - - |- - PROVISIONING_PHASE_INDEX_SCAN - - |- - PROVISIONING_PHASE_INDEX_SORT -github.com/databricks/databricks-sdk-go/service/database.SyncedTableContinuousUpdateStatus: - "_": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the SYNCED_CONTINUOUS_UPDATE - or the SYNCED_UPDATING_PIPELINE_RESOURCES state. - "initial_pipeline_sync_progress": - "description": |- - Progress of the initial data synchronization. - "x-databricks-field-behaviors_output_only": |- - true - "last_processed_commit_version": - "description": |- - The last source table Delta version that was successfully synced to the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "timestamp": - "description": |- - The end timestamp of the last time any data was synchronized from the source table to the synced - table. This is when the data is available in the synced table. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.SyncedTableFailedStatus: - "_": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the OFFLINE_FAILED or the - SYNCED_PIPELINE_FAILED state. - "last_processed_commit_version": - "description": |- - The last source table Delta version that was successfully synced to the synced table. - The last source table Delta version that was synced to the synced table. - Only populated if the table is still - synced and available for serving. - "x-databricks-field-behaviors_output_only": |- - true - "timestamp": - "description": |- - The end timestamp of the last time any data was synchronized from the source table to the synced - table. Only populated if the table is still synced and available for serving. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.SyncedTablePipelineProgress: - "_": - "description": |- - Progress information of the Synced Table data synchronization pipeline. - "estimated_completion_time_seconds": - "description": |- - The estimated time remaining to complete this update in seconds. - "x-databricks-field-behaviors_output_only": |- - true - "latest_version_currently_processing": - "description": |- - The source table Delta version that was last processed by the pipeline. The pipeline may not - have completely processed this version yet. - "x-databricks-field-behaviors_output_only": |- - true - "provisioning_phase": - "description": |- - The current phase of the data synchronization pipeline. - "x-databricks-field-behaviors_output_only": |- - true - "sync_progress_completion": - "description": |- - The completion ratio of this update. This is a number between 0 and 1. - "x-databricks-field-behaviors_output_only": |- - true - "synced_row_count": - "description": |- - The number of rows that have been synced in this update. - "x-databricks-field-behaviors_output_only": |- - true - "total_row_count": - "description": |- - The total number of rows that need to be synced in this update. This number may be an estimate. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.SyncedTablePosition: - "delta_table_sync_info": - "x-databricks-field-behaviors_output_only": |- - true - "sync_end_timestamp": - "description": |- - The end timestamp of the most recent successful synchronization. - This is the time when the data is available in the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "sync_start_timestamp": - "description": |- - The starting timestamp of the most recent successful synchronization from the source table - to the destination (synced) table. - Note this is the starting timestamp of the sync operation, not the end time. - E.g., for a batch, this is the time when the sync operation started. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.SyncedTableProvisioningStatus: - "_": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the - PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state. - "initial_pipeline_sync_progress": - "description": |- - Details about initial data synchronization. Only populated when in the - PROVISIONING_INITIAL_SNAPSHOT state. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/database.SyncedTableSchedulingPolicy: - "_": - "enum": - - |- - CONTINUOUS - - |- - TRIGGERED - - |- - SNAPSHOT -github.com/databricks/databricks-sdk-go/service/database.SyncedTableSpec: - "_": - "description": |- - Specification of a synced database table. - "create_database_objects_if_missing": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. - "primary_key_columns": - "description": |- - Primary Key columns to be used for data insert/update in the destination. - "scheduling_policy": - "description": |- - Scheduling policy of the underlying pipeline. - "source_table_full_name": - "description": |- - Three-part (catalog, schema, table) name of the source Delta table. - "timeseries_key": - "description": |- - Time series key to deduplicate (tie-break) rows with the same primary key. -github.com/databricks/databricks-sdk-go/service/database.SyncedTableState: - "_": - "description": |- - The state of a synced table. - "enum": - - |- - SYNCED_TABLE_PROVISIONING - - |- - SYNCED_TABLE_PROVISIONING_PIPELINE_RESOURCES - - |- - SYNCED_TABLE_PROVISIONING_INITIAL_SNAPSHOT - - |- - SYNCED_TABLE_ONLINE - - |- - SYNCED_TABLE_ONLINE_CONTINUOUS_UPDATE - - |- - SYNCED_TABLE_ONLINE_TRIGGERED_UPDATE - - |- - SYNCED_TABLE_ONLINE_NO_PENDING_UPDATE - - |- - SYNCED_TABLED_OFFLINE - - |- - SYNCED_TABLE_OFFLINE_FAILED - - |- - SYNCED_TABLE_ONLINE_PIPELINE_FAILED - - |- - SYNCED_TABLE_ONLINE_UPDATING_PIPELINE_RESOURCES -github.com/databricks/databricks-sdk-go/service/database.SyncedTableStatus: - "_": - "description": |- - Status of a synced table. - "continuous_update_status": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the SYNCED_CONTINUOUS_UPDATE - or the SYNCED_UPDATING_PIPELINE_RESOURCES state. - "detailed_state": - "description": |- - The state of the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "failed_status": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the OFFLINE_FAILED or the - SYNCED_PIPELINE_FAILED state. - "last_sync": - "description": |- - Summary of the last successful synchronization from source to destination. - - Will always be present if there has been a successful sync. Even if the most recent syncs have failed. - - Limitation: - The only exception is if the synced table is doing a FULL REFRESH, then the last sync information - will not be available until the full refresh is complete. This limitation will be addressed in a future version. - - This top-level field is a convenience for consumers who want easy access to last sync information - without having to traverse detailed_status. - "x-databricks-field-behaviors_output_only": |- - true - "message": - "description": |- - A text description of the current state of the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "pipeline_id": - "description": |- - ID of the associated pipeline. The pipeline ID may have been provided by the client - (in the case of bin packing), or generated by the server (when creating a new pipeline). - "x-databricks-field-behaviors_output_only": |- - true - "provisioning_status": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the - PROVISIONING_PIPELINE_RESOURCES or the PROVISIONING_INITIAL_SNAPSHOT state. - "triggered_update_status": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the SYNCED_TRIGGERED_UPDATE - or the SYNCED_NO_PENDING_UPDATE state. -github.com/databricks/databricks-sdk-go/service/database.SyncedTableTriggeredUpdateStatus: - "_": - "description": |- - Detailed status of a synced table. Shown if the synced table is in the SYNCED_TRIGGERED_UPDATE - or the SYNCED_NO_PENDING_UPDATE state. - "last_processed_commit_version": - "description": |- - The last source table Delta version that was successfully synced to the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "timestamp": - "description": |- - The end timestamp of the last time any data was synchronized from the source table to the synced - table. This is when the data is available in the synced table. - "x-databricks-field-behaviors_output_only": |- - true - "triggered_update_progress": - "description": |- - Progress of the active data synchronization pipeline. - "x-databricks-field-behaviors_output_only": |- - true -github.com/databricks/databricks-sdk-go/service/iam.PermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - CAN_RESTART - - |- - CAN_ATTACH_TO - - |- - IS_OWNER - - |- - CAN_MANAGE_RUN - - |- - CAN_VIEW - - |- - CAN_READ - - |- - CAN_RUN - - |- - CAN_EDIT - - |- - CAN_USE - - |- - CAN_MANAGE_STAGING_VERSIONS - - |- - CAN_MANAGE_PRODUCTION_VERSIONS - - |- - CAN_EDIT_METADATA - - |- - CAN_VIEW_METADATA - - |- - CAN_BIND - - |- - CAN_QUERY - - |- - CAN_MONITOR - - |- - CAN_CREATE - - |- - CAN_MONITOR_ONLY - - |- - CAN_CREATE_APP -github.com/databricks/databricks-sdk-go/service/jobs.AlertTask: - "alert_id": - "description": |- - The alert_id is the canonical identifier of the alert. - "subscribers": - "description": |- - The subscribers receive alert evaluation result notifications after the alert task is completed. - The number of subscriptions is limited to 100. - "warehouse_id": - "description": |- - The warehouse_id identifies the warehouse settings used by the alert task. - "workspace_path": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.AlertTaskSubscriber: - "_": - "description": |- - Represents a subscriber that will receive alert notifications. - A subscriber can be either a user (via email) or a notification destination (via destination_id). - "destination_id": {} - "user_name": - "description": |- - A valid workspace email address. -github.com/databricks/databricks-sdk-go/service/jobs.AuthenticationMethod: - "_": - "enum": - - |- - OAUTH - - |- - PAT -github.com/databricks/databricks-sdk-go/service/jobs.CleanRoomsNotebookTask: - "_": - "description": |- - Clean Rooms notebook task for V1 Clean Room service (GA). - Replaces the deprecated CleanRoomNotebookTask (defined above) which was for V0 service. - "clean_room_name": - "description": |- - The clean room that the notebook belongs to. - "etag": - "description": |- - 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": - "description": |- - Base parameters to be used for the clean room notebook job. - "notebook_name": - "description": |- - Name of the notebook being run. -github.com/databricks/databricks-sdk-go/service/jobs.Compute: - "hardware_accelerator": - "description": |- - Hardware accelerator configuration for Serverless GPU workloads. -github.com/databricks/databricks-sdk-go/service/jobs.ComputeConfig: - "gpu_node_pool_id": - "description": |- - IDof the GPU pool to use. - "x-databricks-preview": |- - PRIVATE - "gpu_type": - "description": |- - GPU type. - "x-databricks-preview": |- - PRIVATE - "num_gpus": - "description": |- - Number of GPUs. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.Condition: - "_": - "enum": - - |- - ANY_UPDATED - - |- - ALL_UPDATED -github.com/databricks/databricks-sdk-go/service/jobs.ConditionTask: - "left": - "description": |- - The left operand of the condition task. Can be either a string value or a job state or parameter reference. - "op": - "description": |- - * `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": - "description": |- - The right operand of the condition task. Can be either a string value or a job state or parameter reference. -github.com/databricks/databricks-sdk-go/service/jobs.ConditionTaskOp: - "_": - "description": |- - * `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. - "enum": - - |- - EQUAL_TO - - |- - GREATER_THAN - - |- - GREATER_THAN_OR_EQUAL - - |- - LESS_THAN - - |- - LESS_THAN_OR_EQUAL - - |- - NOT_EQUAL -github.com/databricks/databricks-sdk-go/service/jobs.Continuous: - "pause_status": - "description": |- - Indicate whether the continuous execution of the job is paused or not. Defaults to UNPAUSED. - "task_retry_mode": - "description": |- - Indicate whether the continuous job is applying task level retries or not. Defaults to NEVER. -github.com/databricks/databricks-sdk-go/service/jobs.CronSchedule: - "pause_status": - "description": |- - Indicate whether this schedule is paused or not. - "quartz_cron_expression": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.DashboardTask: - "_": - "description": |- - Configures the Lakeview Dashboard job task type. - "dashboard_id": - "description": |- - The identifier of the dashboard to refresh. - "filters": - "description": |- - Dashboard task parameters. Used to apply dashboard filter values during dashboard task execution. Parameter values get applied to any dashboard filters that have a matching URL identifier as the parameter key. - The parameter value format is dependent on the filter type: - - For text and single-select filters, provide a single value (e.g. `"value"`) - - For date and datetime filters, provide the value in ISO 8601 format (e.g. `"2000-01-01T00:00:00"`) - - For multi-select filters, provide a JSON array of values (e.g. `"[\"value1\",\"value2\"]"`) - - For range and date range filters, provide a JSON object with `start` and `end` (e.g. `"{\"start\":\"1\",\"end\":\"10\"}"`) - "x-databricks-preview": |- - PRIVATE - "subscription": - "description": |- - Optional: subscription configuration for sending the dashboard snapshot. - "warehouse_id": - "description": |- - Optional: The warehouse id to execute the dashboard with for the schedule. - If not specified, the default warehouse of the dashboard will be used. -github.com/databricks/databricks-sdk-go/service/jobs.DbtCloudTask: - "_": - "description": |- - Deprecated in favor of DbtPlatformTask - "connection_resource_name": - "description": |- - The resource name of the UC connection that authenticates the dbt Cloud for this task - "x-databricks-preview": |- - PRIVATE - "dbt_cloud_job_id": - "description": |- - Id of the dbt Cloud job to be triggered - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.DbtPlatformTask: - "connection_resource_name": - "description": |- - The resource name of the UC connection that authenticates the dbt platform for this task - "x-databricks-preview": |- - PRIVATE - "dbt_platform_job_id": - "description": |- - Id of the dbt platform job to be triggered. Specified as a string for maximum compatibility with clients. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.DbtTask: - "catalog": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.FileArrivalTriggerConfiguration: - "min_time_between_triggers_seconds": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.ForEachTask: - "concurrency": - "description": |- - 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": - "description": |- - Array for task to iterate on. This can be a JSON string or a reference to - an array parameter. - "task": - "description": |- - Configuration for the task that will be run for each element in the array -github.com/databricks/databricks-sdk-go/service/jobs.Format: - "_": - "enum": - - |- - SINGLE_TASK - - |- - MULTI_TASK -github.com/databricks/databricks-sdk-go/service/jobs.GenAiComputeTask: - "command": - "description": |- - Command launcher to run the actual script, e.g. bash, python etc. - "x-databricks-preview": |- - PRIVATE - "compute": - "x-databricks-preview": |- - PRIVATE - "dl_runtime_image": - "description": |- - Runtime image - "x-databricks-preview": |- - PRIVATE - "mlflow_experiment_name": - "description": |- - Optional string containing the name of the MLflow experiment to log the run to. If name is not - found, backend will create the mlflow experiment using the name. - "x-databricks-preview": |- - PRIVATE - "source": - "description": |- - Optional location type of the training script. When set to `WORKSPACE`, the script will be retrieved from the local Databricks workspace. When set to `GIT`, the script 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`: Script is located in Databricks workspace. - * `GIT`: Script is located in cloud Git provider. - "x-databricks-preview": |- - PRIVATE - "training_script_path": - "description": |- - The training script file path 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. - "x-databricks-preview": |- - PRIVATE - "yaml_parameters": - "description": |- - Optional string containing model parameters passed to the training script in yaml format. - If present, then the content in yaml_parameters_file_path will be ignored. - "x-databricks-preview": |- - PRIVATE - "yaml_parameters_file_path": - "description": |- - Optional path to a YAML file containing model parameters passed to the training script. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.GitProvider: - "_": - "enum": - - |- - gitHub - - |- - bitbucketCloud - - |- - azureDevOpsServices - - |- - gitHubEnterprise - - |- - bitbucketServer - - |- - gitLab - - |- - gitLabEnterpriseEdition - - |- - awsCodeCommit -github.com/databricks/databricks-sdk-go/service/jobs.GitSnapshot: - "_": - "description": |- - Read-only state of the remote repository at the time the job was run. This field is only included on job runs. - "used_commit": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.GitSource: - "_": - "description": |- - 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. - "git_branch": - "description": |- - 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": - "description": |- - 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": - "description": |- - Unique identifier of the service used to host the Git repository. The value is case insensitive. - "git_snapshot": - "description": |- - Read-only state of the remote repository at the time the job was run. This field is only included on job runs. - "git_tag": - "description": |- - 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": - "description": |- - URL of the repository to be cloned by this job. - "job_source": - "description": |- - The source of the job specification in the remote repository when the job is source controlled. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "sparse_checkout": {} -github.com/databricks/databricks-sdk-go/service/jobs.JobCluster: - "job_cluster_key": - "description": |- - 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": - "description": |- - If new_cluster, a description of a cluster that is created for each task. -github.com/databricks/databricks-sdk-go/service/jobs.JobDeployment: - "deployment_id": - "description": |- - ID of the deployment that manages this job. Only set when `kind` is - `BUNDLE`. Used to look up deployment metadata from the Deployment - Metadata service. - "x-databricks-preview": |- - PRIVATE - "kind": - "description": |- - 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": - "description": |- - Path of the file that contains deployment metadata. - "version_id": - "description": |- - ID of the version of the deployment that produced this job. Only set - when `kind` is `BUNDLE`. Identifies a specific snapshot of the deployment - in the Deployment Metadata service. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.JobDeploymentKind: - "_": - "description": |- - * `BUNDLE`: The job is managed by Databricks Asset Bundle. - * `SYSTEM_MANAGED`: The job is managed by Databricks and is read-only. - "enum": - - |- - BUNDLE - - |- - SYSTEM_MANAGED -github.com/databricks/databricks-sdk-go/service/jobs.JobEditMode: - "_": - "description": |- - 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. - "enum": - - |- - UI_LOCKED - - |- - EDITABLE -github.com/databricks/databricks-sdk-go/service/jobs.JobEmailNotifications: - "no_alert_for_skipped_runs": - "description": |- - If true, do not send email to recipients specified in `on_failure` if the run is skipped. - This field is `deprecated`. Please use the `notification_settings.no_alert_for_skipped_runs` field. - "deprecation_message": |- - This field is deprecated - "on_duration_warning_threshold_exceeded": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.JobEnvironment: - "environment_key": - "description": |- - The key of an environment. It has to be unique within a job. - "spec": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.JobNotificationSettings: - "no_alert_for_canceled_runs": - "description": |- - If true, do not send notifications to recipients specified in `on_failure` if the run is canceled. - "no_alert_for_skipped_runs": - "description": |- - If true, do not send notifications to recipients specified in `on_failure` if the run is skipped. -github.com/databricks/databricks-sdk-go/service/jobs.JobParameterDefinition: - "default": - "description": |- - Default value of the parameter. - "name": - "description": |- - The name of the defined parameter. May only contain alphanumeric characters, `_`, `-`, and `.` -github.com/databricks/databricks-sdk-go/service/jobs.JobPermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - IS_OWNER - - |- - CAN_MANAGE_RUN - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/jobs.JobRunAs: - "_": - "description": |- - 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. - "group_name": - "description": |- - Group name of an account group assigned to the workspace. Setting this field requires being a member of the group. - "x-databricks-preview": |- - PRIVATE - "service_principal_name": - "description": |- - Application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - "user_name": - "description": |- - The email of an active workspace user. Non-admin users can only set this field to their own email. -github.com/databricks/databricks-sdk-go/service/jobs.JobSource: - "_": - "description": |- - The source of the job specification in the remote repository when the job is source controlled. - "dirty_state": - "description": |- - Dirty state indicates the job is not fully synced with the job specification in the remote repository. - - Possible values are: - * `NOT_SYNCED`: The job is not yet synced with the remote job specification. Import the remote job specification from UI to make the job fully synced. - * `DISCONNECTED`: The job is temporary disconnected from the remote job specification and is allowed for live edit. Import the remote job specification again from UI to make the job fully synced. - "x-databricks-preview": |- - PRIVATE - "import_from_git_branch": - "description": |- - Name of the branch which the job is imported from. - "x-databricks-preview": |- - PRIVATE - "job_config_path": - "description": |- - Path of the job YAML file that contains the job specification. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.JobSourceDirtyState: - "_": - "description": |- - Dirty state indicates the job is not fully synced with the job specification - in the remote repository. - - Possible values are: - * `NOT_SYNCED`: The job is not yet synced with the remote job specification. Import the remote job specification from UI to make the job fully synced. - * `DISCONNECTED`: The job is temporary disconnected from the remote job specification and is allowed for live edit. Import the remote job specification again from UI to make the job fully synced. - "enum": - - |- - NOT_SYNCED - - |- - DISCONNECTED -github.com/databricks/databricks-sdk-go/service/jobs.JobsHealthMetric: - "_": - "description": |- - 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. - "enum": - - |- - RUN_DURATION_SECONDS - - |- - STREAMING_BACKLOG_BYTES - - |- - STREAMING_BACKLOG_RECORDS - - |- - STREAMING_BACKLOG_SECONDS - - |- - STREAMING_BACKLOG_FILES -github.com/databricks/databricks-sdk-go/service/jobs.JobsHealthOperator: - "_": - "description": |- - Specifies the operator used to compare the health metric value with the specified threshold. - "enum": - - |- - GREATER_THAN -github.com/databricks/databricks-sdk-go/service/jobs.JobsHealthRule: - "metric": - "description": |- - 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": - "description": |- - Specifies the operator used to compare the health metric value with the specified threshold. - "value": - "description": |- - Specifies the threshold value that the health metric should obey to satisfy the health rule. -github.com/databricks/databricks-sdk-go/service/jobs.JobsHealthRules: - "_": - "description": |- - An optional set of health rules that can be defined for this job. - "rules": {} -github.com/databricks/databricks-sdk-go/service/jobs.ModelTriggerConfiguration: - "aliases": - "description": |- - Aliases of the model versions to monitor. Can only be used in conjunction with condition MODEL_ALIAS_SET. - "x-databricks-preview": |- - PRIVATE - "condition": - "description": |- - The condition based on which to trigger a job run. - "x-databricks-preview": |- - PRIVATE - "min_time_between_triggers_seconds": - "description": |- - 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. - "x-databricks-preview": |- - PRIVATE - "securable_name": - "description": |- - Name of the securable to monitor ("mycatalog.myschema.mymodel" in the case of model-level triggers, - "mycatalog.myschema" in the case of schema-level triggers) or empty in the case of metastore-level triggers. - "x-databricks-preview": |- - PRIVATE - "wait_after_last_change_seconds": - "description": |- - If set, the trigger starts a run only after no model updates have occurred for the specified time - and can be used to wait for a series of model updates before triggering a run. The - minimum allowed value is 60 seconds. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.ModelTriggerConfigurationCondition: - "_": - "enum": - - |- - MODEL_CREATED - - |- - MODEL_VERSION_READY - - |- - MODEL_ALIAS_SET -github.com/databricks/databricks-sdk-go/service/jobs.NotebookTask: - "base_parameters": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.PauseStatus: - "_": - "enum": - - |- - UNPAUSED - - |- - PAUSED -github.com/databricks/databricks-sdk-go/service/jobs.PerformanceTarget: - "_": - "description": |- - PerformanceTarget defines how performant (lower latency) or cost efficient the execution of run on serverless compute should be. - The performance mode on the job or pipeline should map to a performance setting that is passed to Cluster Manager - (see cluster-common PerformanceTarget). - "enum": - - |- - PERFORMANCE_OPTIMIZED - - |- - STANDARD -github.com/databricks/databricks-sdk-go/service/jobs.PeriodicTriggerConfiguration: - "interval": - "description": |- - The interval at which the trigger should run. - "unit": - "description": |- - The unit of time for the interval. -github.com/databricks/databricks-sdk-go/service/jobs.PeriodicTriggerConfigurationTimeUnit: - "_": - "enum": - - |- - HOURS - - |- - DAYS - - |- - WEEKS -github.com/databricks/databricks-sdk-go/service/jobs.PipelineParams: - "full_refresh": - "description": |- - If true, triggers a full refresh on the spark declarative pipeline. - "full_refresh_selection": - "description": |- - A list of tables to update with fullRefresh. - "refresh_flow_selection": - "description": |- - 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": - "description": |- - A list of tables to update without fullRefresh. - "reset_checkpoint_selection": - "description": |- - A list of streaming flows to reset checkpoints without clearing data. -github.com/databricks/databricks-sdk-go/service/jobs.PipelineTask: - "full_refresh": - "description": |- - If true, triggers a full refresh on the spark declarative pipeline. - "full_refresh_selection": - "description": |- - A list of tables to update with fullRefresh. - "parameters": - "description": |- - Key/value-map of parameters passed to the pipeline execution. - Limited to 10k characters in total. - "pipeline_id": - "description": |- - The full name of the pipeline task to execute. - "refresh_flow_selection": - "description": |- - 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": - "description": |- - A list of tables to update without fullRefresh. - "reset_checkpoint_selection": - "description": |- - A list of streaming flows to reset checkpoints without clearing data. -github.com/databricks/databricks-sdk-go/service/jobs.PowerBiModel: - "authentication_method": - "description": |- - How the published Power BI model authenticates to Databricks - "model_name": - "description": |- - The name of the Power BI model - "overwrite_existing": - "description": |- - Whether to overwrite existing Power BI models - "storage_mode": - "description": |- - The default storage mode of the Power BI model - "workspace_name": - "description": |- - The name of the Power BI workspace of the model -github.com/databricks/databricks-sdk-go/service/jobs.PowerBiTable: - "catalog": - "description": |- - The catalog name in Databricks - "name": - "description": |- - The table name in Databricks - "schema": - "description": |- - The schema name in Databricks - "storage_mode": - "description": |- - The Power BI storage mode of the table -github.com/databricks/databricks-sdk-go/service/jobs.PowerBiTask: - "connection_resource_name": - "description": |- - The resource name of the UC connection to authenticate from Databricks to Power BI - "power_bi_model": - "description": |- - The semantic model to update - "refresh_after_update": - "description": |- - Whether the model should be refreshed after the update - "tables": - "description": |- - The tables to be exported to Power BI - "warehouse_id": - "description": |- - The SQL warehouse ID to use as the Power BI data source -github.com/databricks/databricks-sdk-go/service/jobs.PythonOperatorTask: - "main": - "description": |- - Fully qualified name of the main class or function. - For example, `my_project.my_function` or `my_project.MyOperator`. - "x-databricks-preview": |- - PRIVATE - "parameters": - "description": |- - An ordered list of task parameters. - TODO(JOBS-30885): Add limits for parameters. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.PythonOperatorTaskParameter: - "name": - "x-databricks-preview": |- - PRIVATE - "value": - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.PythonWheelTask: - "entry_point": - "description": |- - 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": - "description": |- - 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": - "description": |- - Name of the package to execute - "parameters": - "description": |- - Command-line parameters passed to Python wheel task. Leave it empty if `named_parameters` is not null. -github.com/databricks/databricks-sdk-go/service/jobs.QueueSettings: - "enabled": - "description": |- - If true, enable queueing for the job. This is a required field. -github.com/databricks/databricks-sdk-go/service/jobs.RunIf: - "_": - "description": |- - An optional value indicating the condition that determines whether the task should be run once its dependencies have been completed. When omitted, defaults to `ALL_SUCCESS`. - - Possible values are: - * `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 - "enum": - - |- - ALL_SUCCESS - - |- - ALL_DONE - - |- - NONE_FAILED - - |- - AT_LEAST_ONE_SUCCESS - - |- - ALL_FAILED - - |- - AT_LEAST_ONE_FAILED -github.com/databricks/databricks-sdk-go/service/jobs.RunJobTask: - "dbt_commands": - "description": |- - An array of commands to execute for jobs with the dbt task, for example `"dbt_commands": ["dbt deps", "dbt seed", "dbt deps", "dbt seed", "dbt run"]` - - ⚠ **Deprecation note** Use [job parameters](https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown) to pass information down to tasks. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "jar_params": - "description": |- - A list of parameters for jobs with Spark JAR tasks, for example `"jar_params": ["john doe", "35"]`. - The parameters are used to invoke the main function of the main class specified in the Spark JAR task. - If not specified upon `run-now`, it defaults to an empty list. - jar_params cannot be specified in conjunction with notebook_params. - The JSON representation of this field (for example `{"jar_params":["john doe","35"]}`) cannot exceed 10,000 bytes. - - ⚠ **Deprecation note** Use [job parameters](https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown) to pass information down to tasks. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "job_id": - "description": |- - ID of the job to trigger. - "job_parameters": - "description": |- - Job-level parameters used to trigger the job. - "notebook_params": - "description": |- - A map from keys to values for jobs with notebook task, for example `"notebook_params": {"name": "john doe", "age": "35"}`. - The map is passed to the notebook and is accessible through the [dbutils.widgets.get](https://docs.databricks.com/dev-tools/databricks-utils.html) function. - - If not specified upon `run-now`, the triggered run uses the job’s base parameters. - - notebook_params cannot be specified in conjunction with jar_params. - - ⚠ **Deprecation note** Use [job parameters](https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown) to pass information down to tasks. - - The JSON representation of this field (for example `{"notebook_params":{"name":"john doe","age":"35"}}`) cannot exceed 10,000 bytes. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "pipeline_params": - "description": |- - Controls whether the pipeline should perform a full refresh - "python_named_params": - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "python_params": - "description": |- - A list of parameters for jobs with Python tasks, for example `"python_params": ["john doe", "35"]`. - The parameters are passed to Python file as command-line parameters. If specified upon `run-now`, it would overwrite - the parameters specified in job setting. The JSON representation of this field (for example `{"python_params":["john doe","35"]}`) - cannot exceed 10,000 bytes. - - ⚠ **Deprecation note** Use [job parameters](https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown) to pass information down to tasks. - - Important - - These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters returns an error. - Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and emojis. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "spark_submit_params": - "description": |- - A list of parameters for jobs with spark submit task, for example `"spark_submit_params": ["--class", "org.apache.spark.examples.SparkPi"]`. - The parameters are passed to spark-submit script as command-line parameters. If specified upon `run-now`, it would overwrite the - parameters specified in job setting. The JSON representation of this field (for example `{"python_params":["john doe","35"]}`) - cannot exceed 10,000 bytes. - - ⚠ **Deprecation note** Use [job parameters](https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown) to pass information down to tasks. - - Important - - These parameters accept only Latin characters (ASCII character set). Using non-ASCII characters returns an error. - Examples of invalid, non-ASCII characters are Chinese, Japanese kanjis, and emojis. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "sql_params": - "description": |- - A map from keys to values for jobs with SQL task, for example `"sql_params": {"name": "john doe", "age": "35"}`. The SQL alert task does not support custom parameters. - - ⚠ **Deprecation note** Use [job parameters](https://docs.databricks.com/jobs/job-parameters.html#job-parameter-pushdown) to pass information down to tasks. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/jobs.Source: - "_": - "description": |- - 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. - "enum": - - |- - WORKSPACE - - |- - GIT -github.com/databricks/databricks-sdk-go/service/jobs.SparkJarTask: - "jar_uri": - "description": |- - Deprecated since 04/2016. For classic compute, provide a `jar` through the `libraries` field instead. For serverless compute, provide a `jar` though the `java_dependencies` field inside the `environments` list. - - See the examples of classic and serverless compute usage at the top of the page. - "deprecation_message": |- - This field is deprecated - "main_class_name": - "description": |- - 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": - "description": |- - 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": - "description": |- - Deprecated. A value of `false` is no longer supported. - "deprecation_message": |- - This field is deprecated -github.com/databricks/databricks-sdk-go/service/jobs.SparkPythonTask: - "parameters": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.SparkSubmitTask: - "parameters": - "description": |- - Command-line parameters passed to spark submit. - - Use [Task parameter variables](https://docs.databricks.com/jobs.html#parameter-variables) to set parameters containing information about job runs. -github.com/databricks/databricks-sdk-go/service/jobs.SparseCheckout: - "patterns": - "description": |- - List of patterns to include for sparse checkout. -github.com/databricks/databricks-sdk-go/service/jobs.SqlTask: - "alert": - "description": |- - If alert, indicates that this job must refresh a SQL alert. - "dashboard": - "description": |- - If dashboard, indicates that this job must refresh a SQL dashboard. - "file": - "description": |- - If file, indicates that this job runs a SQL file in a remote Git repository. - "parameters": - "description": |- - Parameters to be used for each run of this job. The SQL alert task does not support custom parameters. - "query": - "description": |- - If query, indicates that this job must execute a SQL query. - "warehouse_id": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.SqlTaskAlert: - "alert_id": - "description": |- - The canonical identifier of the SQL alert. - "pause_subscriptions": - "description": |- - If true, the alert notifications are not sent to subscribers. - "subscriptions": - "description": |- - If specified, alert notifications are sent to subscribers. -github.com/databricks/databricks-sdk-go/service/jobs.SqlTaskDashboard: - "custom_subject": - "description": |- - Subject of the email sent to subscribers of this task. - "dashboard_id": - "description": |- - The canonical identifier of the SQL dashboard. - "pause_subscriptions": - "description": |- - If true, the dashboard snapshot is not taken, and emails are not sent to subscribers. - "subscriptions": - "description": |- - If specified, dashboard snapshots are sent to subscriptions. -github.com/databricks/databricks-sdk-go/service/jobs.SqlTaskFile: - "path": - "description": |- - Path of the SQL file. Must be relative if the source is a remote Git repository and absolute for workspace paths. - "source": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.SqlTaskQuery: - "query_id": - "description": |- - The canonical identifier of the SQL query. -github.com/databricks/databricks-sdk-go/service/jobs.SqlTaskSubscription: - "destination_id": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.StorageMode: - "_": - "enum": - - |- - DIRECT_QUERY - - |- - IMPORT - - |- - DUAL -github.com/databricks/databricks-sdk-go/service/jobs.Subscription: - "custom_subject": - "description": |- - Optional: Allows users to specify a custom subject line on the email sent - to subscribers. - "paused": - "description": |- - When true, the subscription will not send emails. - "subscribers": - "description": |- - The list of subscribers to send the snapshot of the dashboard to. -github.com/databricks/databricks-sdk-go/service/jobs.SubscriptionSubscriber: - "destination_id": - "description": |- - A snapshot of the dashboard will be sent to the destination when the `destination_id` field is present. - "user_name": - "description": |- - A snapshot of the dashboard will be sent to the user's email when the `user_name` field is present. -github.com/databricks/databricks-sdk-go/service/jobs.TableUpdateTriggerConfiguration: - "condition": - "description": |- - The table(s) condition based on which to trigger a job run. - "min_time_between_triggers_seconds": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.Task: - "alert_task": - "description": |- - The task evaluates a Databricks alert and sends notifications to subscribers - when the `alert_task` field is present. - "clean_rooms_notebook_task": - "description": |- - The task runs a [clean rooms](https://docs.databricks.com/clean-rooms/index.html) notebook - when the `clean_rooms_notebook_task` field is present. - "compute": - "description": |- - Task level compute configuration. - "condition_task": - "description": |- - 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. - "dashboard_task": - "description": |- - The task refreshes a dashboard and sends a snapshot to subscribers. - "dbt_cloud_task": - "description": |- - Task type for dbt cloud, deprecated in favor of the new name dbt_platform_task - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "dbt_platform_task": - "x-databricks-preview": |- - PRIVATE - "dbt_task": - "description": |- - 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. - "depends_on": - "description": |- - 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. - "description": - "description": |- - An optional description for this task. - "disable_auto_optimization": - "description": |- - An option to disable auto optimization in serverless - "disabled": - "description": |- - 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": - "description": |- - 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. - "environment_key": - "description": |- - 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": - "description": |- - 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": - "description": |- - The task executes a nested task for every input provided when the `for_each_task` field is present. - "gen_ai_compute_task": - "x-databricks-preview": |- - PRIVATE - "health": - "description": |- - An optional set of health rules that can be defined for this job. - "job_cluster_key": - "description": |- - If job_cluster_key, this task is executed reusing the cluster specified in `job.settings.job_clusters`. - "libraries": - "description": |- - An optional list of libraries to be installed on the cluster. - The default value is an empty list. - "max_retries": - "description": |- - 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": - "description": |- - 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": - "description": |- - If new_cluster, a description of a new cluster that is created for each run. - "notebook_task": - "description": |- - The task runs a notebook when the `notebook_task` field is present. - "notification_settings": - "description": |- - Optional notification settings that are used when sending notifications to each of the `email_notifications` and `webhook_notifications` for this task. - "pipeline_task": - "description": |- - The task triggers a pipeline update when the `pipeline_task` field is present. Only pipelines configured to use triggered more are supported. - "power_bi_task": - "description": |- - The task triggers a Power BI semantic model update when the `power_bi_task` field is present. - "python_operator_task": - "description": |- - The task runs a Python operator task. - "x-databricks-preview": |- - PRIVATE - "python_wheel_task": - "description": |- - The task runs a Python wheel when the `python_wheel_task` field is present. - "retry_on_timeout": - "description": |- - 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": - "description": |- - 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": - "description": |- - The task triggers another job when the `run_job_task` field is present. - "spark_jar_task": - "description": |- - The task runs a JAR when the `spark_jar_task` field is present. - "spark_python_task": - "description": |- - The task runs a Python file when the `spark_python_task` field is present. - "spark_submit_task": - "description": |- - (Legacy) The task runs the spark-submit script when the spark_submit_task field is present. Databricks recommends using the spark_jar_task instead; see [Spark Submit task for jobs](/jobs/spark-submit). - "deprecation_message": |- - This field is deprecated - "sql_task": - "description": |- - 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. - "task_key": - "description": |- - 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": - "description": |- - An optional timeout applied to each run of this job task. A value of `0` means no timeout. - "webhook_notifications": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.TaskDependency: - "outcome": - "description": |- - 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": - "description": |- - The name of the task this task depends on. -github.com/databricks/databricks-sdk-go/service/jobs.TaskEmailNotifications: - "no_alert_for_skipped_runs": - "description": |- - If true, do not send email to recipients specified in `on_failure` if the run is skipped. - This field is `deprecated`. Please use the `notification_settings.no_alert_for_skipped_runs` field. - "deprecation_message": |- - This field is deprecated - "on_duration_warning_threshold_exceeded": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/jobs.TaskNotificationSettings: - "alert_on_last_attempt": - "description": |- - 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": - "description": |- - If true, do not send notifications to recipients specified in `on_failure` if the run is canceled. - "no_alert_for_skipped_runs": - "description": |- - If true, do not send notifications to recipients specified in `on_failure` if the run is skipped. -github.com/databricks/databricks-sdk-go/service/jobs.TaskRetryMode: - "_": - "description": |- - task retry mode of the continuous job - * NEVER: The failed task will not be retried. - * ON_FAILURE: Retry a failed task if at least one other task in the job is still running its first attempt. - When this condition is no longer met or the retry limit is reached, the job run is cancelled and a new run is started. - "enum": - - |- - NEVER - - |- - ON_FAILURE -github.com/databricks/databricks-sdk-go/service/jobs.TriggerSettings: - "file_arrival": - "description": |- - File arrival trigger settings. - "model": - "x-databricks-preview": |- - PRIVATE - "pause_status": - "description": |- - Whether this trigger is paused or not. - "periodic": - "description": |- - Periodic trigger settings. - "table_update": {} -github.com/databricks/databricks-sdk-go/service/jobs.Webhook: - "id": {} -github.com/databricks/databricks-sdk-go/service/jobs.WebhookNotifications: - "on_duration_warning_threshold_exceeded": - "description": |- - 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. - "on_failure": - "description": |- - 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. - "on_start": - "description": |- - 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. - "on_streaming_backlog_exceeded": - "description": |- - 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. - "on_success": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/ml.ExperimentPermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - CAN_EDIT - - |- - CAN_READ -github.com/databricks/databricks-sdk-go/service/ml.ExperimentTag: - "_": - "description": |- - A tag for an experiment. - "key": - "description": |- - The tag key. - "value": - "description": |- - The tag value. -github.com/databricks/databricks-sdk-go/service/ml.ModelTag: - "_": - "description": |- - Tag for a registered model - "key": - "description": |- - The tag key. - "value": - "description": |- - The tag value. -github.com/databricks/databricks-sdk-go/service/ml.RegisteredModelPermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - CAN_MANAGE_PRODUCTION_VERSIONS - - |- - CAN_MANAGE_STAGING_VERSIONS - - |- - CAN_EDIT - - |- - CAN_READ -github.com/databricks/databricks-sdk-go/service/pipelines.AutoFullRefreshPolicy: - "_": - "description": |- - Policy for auto full refresh. - "enabled": - "description": |- - (Required, Mutable) Whether to enable auto full refresh or not. - "min_interval_hours": - "description": |- - (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. -github.com/databricks/databricks-sdk-go/service/pipelines.ConfluenceConnectorOptions: - "_": - "description": |- - Confluence specific options for ingestion - "include_confluence_spaces": - "description": |- - (Optional) Spaces to filter Confluence data on -github.com/databricks/databricks-sdk-go/service/pipelines.ConnectionParameters: - "source_catalog": - "description": |- - Source catalog for initial connection. - This is necessary for schema exploration in some database systems like Oracle, and optional but nice-to-have - in some other database systems like Postgres. - For Oracle databases, this maps to a service name. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.ConnectorOptions: - "_": - "description": |- - Wrapper message for source-specific options to support multiple connector types - "confluence_options": - "description": |- - Confluence specific options for ingestion - "gdrive_options": - "x-databricks-preview": |- - PRIVATE - "google_ads_options": - "description": |- - Google Ads specific options for ingestion (object-level). - When set, these values override the corresponding fields in GoogleAdsConfig - (source_configurations). - "x-databricks-preview": |- - PRIVATE - "jira_options": - "description": |- - Jira specific options for ingestion - "kafka_options": - "x-databricks-preview": |- - PRIVATE - "meta_ads_options": - "description": |- - Meta Marketing (Meta Ads) specific options for ingestion - "outlook_options": - "description": |- - Outlook specific options for ingestion - "x-databricks-preview": |- - PRIVATE - "sharepoint_options": - "x-databricks-preview": |- - PRIVATE - "smartsheet_options": - "description": |- - Smartsheet specific options for ingestion - "x-databricks-preview": |- - PRIVATE - "tiktok_ads_options": - "description": |- - TikTok Ads specific options for ingestion - "x-databricks-preview": |- - PRIVATE - "zendesk_support_options": - "description": |- - Zendesk Support specific options for ingestion - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.ConnectorType: - "_": - "description": |- - For certain database sources LakeFlow Connect offers both query based and cdc - ingestion, ConnectorType can bse used to convey the type of ingestion. - If connection_name is provided for database sources, we default to Query Based ingestion - "enum": - - |- - CDC - - |- - QUERY_BASED -github.com/databricks/databricks-sdk-go/service/pipelines.CronTrigger: - "quartz_cron_schedule": {} - "timezone_id": {} -github.com/databricks/databricks-sdk-go/service/pipelines.DataStagingOptions: - "_": - "description": |- - Location of staged data storage - "catalog_name": - "description": |- - (Required, Immutable) The name of the catalog for the connector's staging storage location. - "schema_name": - "description": |- - (Required, Immutable) The name of the schema for the connector's staging storage location. - "volume_name": - "description": |- - (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 -github.com/databricks/databricks-sdk-go/service/pipelines.DayOfWeek: - "_": - "description": |- - Days of week in which the window is allowed to happen. - If not specified all days of the week will be used. - "enum": - - |- - MONDAY - - |- - TUESDAY - - |- - WEDNESDAY - - |- - THURSDAY - - |- - FRIDAY - - |- - SATURDAY - - |- - SUNDAY -github.com/databricks/databricks-sdk-go/service/pipelines.DeploymentKind: - "_": - "description": |- - The deployment method that manages the pipeline: - - BUNDLE: The pipeline is managed by a Databricks Asset Bundle. - "enum": - - |- - BUNDLE -github.com/databricks/databricks-sdk-go/service/pipelines.EventLogSpec: - "_": - "description": |- - Configurable event log parameters. - "catalog": - "description": |- - The UC catalog the event log is published under. - "name": - "description": |- - The name the event log is published to in UC. - "schema": - "description": |- - The UC schema the event log is published under. -github.com/databricks/databricks-sdk-go/service/pipelines.FileFilter: - "modified_after": - "description": |- - Include files with modification times occurring after the specified time. - Timestamp format: YYYY-MM-DDTHH:mm:ss (e.g. 2020-06-01T13:00:00) - Based on https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html#modification-time-path-filters - "x-databricks-preview": |- - PRIVATE - "modified_before": - "description": |- - Include files with modification times occurring before the specified time. - Timestamp format: YYYY-MM-DDTHH:mm:ss (e.g. 2020-06-01T13:00:00) - Based on https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html#modification-time-path-filters - "x-databricks-preview": |- - PRIVATE - "path_filter": - "description": |- - Include files with file names matching the pattern - Based on https://spark.apache.org/docs/latest/sql-data-sources-generic-options.html#path-glob-filter - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.FileIngestionOptions: - "corrupt_record_column": - "x-databricks-preview": |- - PRIVATE - "file_filters": - "description": |- - Generic options - "x-databricks-preview": |- - PRIVATE - "format": - "description": |- - required for TableSpec - "x-databricks-preview": |- - PRIVATE - "format_options": - "description": |- - Format-specific options - Based on https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/options#file-format-options - "x-databricks-preview": |- - PRIVATE - "ignore_corrupt_files": - "x-databricks-preview": |- - PRIVATE - "infer_column_types": - "x-databricks-preview": |- - PRIVATE - "reader_case_sensitive": - "description": |- - Column name case sensitivity - https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema#change-case-sensitive-behavior - "x-databricks-preview": |- - PRIVATE - "rescued_data_column": - "x-databricks-preview": |- - PRIVATE - "schema_evolution_mode": - "description": |- - Based on https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema#how-does-auto-loader-schema-evolution-work - "x-databricks-preview": |- - PRIVATE - "schema_hints": - "description": |- - Override inferred schema of specific columns - Based on https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema#override-schema-inference-with-schema-hints - "x-databricks-preview": |- - PRIVATE - "single_variant_column": - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.FileIngestionOptionsFileFormat: - "_": - "enum": - - |- - BINARYFILE - - |- - JSON - - |- - CSV - - |- - XML - - |- - EXCEL - - |- - PARQUET - - |- - AVRO - - |- - ORC -github.com/databricks/databricks-sdk-go/service/pipelines.FileIngestionOptionsSchemaEvolutionMode: - "_": - "description": |- - Based on https://docs.databricks.com/aws/en/ingestion/cloud-object-storage/auto-loader/schema#how-does-auto-loader-schema-evolution-work - "enum": - - |- - ADD_NEW_COLUMNS_WITH_TYPE_WIDENING - - |- - ADD_NEW_COLUMNS - - |- - RESCUE - - |- - FAIL_ON_NEW_COLUMNS - - |- - NONE -github.com/databricks/databricks-sdk-go/service/pipelines.FileLibrary: - "path": - "description": |- - The absolute path of the source code. -github.com/databricks/databricks-sdk-go/service/pipelines.Filters: - "exclude": - "description": |- - Paths to exclude. - "include": - "description": |- - Paths to include. -github.com/databricks/databricks-sdk-go/service/pipelines.GoogleAdsConfig: - "manager_account_id": - "description": |- - (Required) Manager Account ID (also called MCC Account ID) used to list and access - customer accounts under this manager account. This is required for fetching the list - of customer accounts during source selection. - If the same field is also set in the object-level GoogleAdsOptions (connector_options), - the object-level value takes precedence over this top-level config. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.GoogleAdsOptions: - "_": - "description": |- - Google Ads specific options for ingestion (object-level). - When set, these values override the corresponding fields in GoogleAdsConfig - (source_configurations). - "lookback_window_days": - "description": |- - (Optional) Number of days to look back for report tables to capture late-arriving data. - If not specified, defaults to 30 days. - "x-databricks-preview": |- - PRIVATE - "manager_account_id": - "description": |- - (Optional at this level) Manager Account ID (also called MCC Account ID) used to list - and access customer accounts under this manager account. - Overrides GoogleAdsConfig.manager_account_id from source_configurations when set. - "x-databricks-preview": |- - PRIVATE - "sync_start_date": - "description": |- - (Optional) Start date for the initial sync of report tables in YYYY-MM-DD format. - This determines the earliest date from which to sync historical data. - If not specified, defaults to 2 years of historical data. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.GoogleDriveOptions: - "entity_type": - "x-databricks-preview": |- - PRIVATE - "file_ingestion_options": - "x-databricks-preview": |- - PRIVATE - "url": - "description": |- - Google Drive URL. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.GoogleDriveOptionsGoogleDriveEntityType: - "_": - "enum": - - |- - FILE - - |- - FILE_METADATA - - |- - PERMISSION -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionConfig: - "report": - "description": |- - Select a specific source report. - "schema": - "description": |- - Select all tables from a specific source schema. - "table": - "description": |- - Select a specific source table. -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionGatewayPipelineDefinition: - "connection_id": - "description": |- - [Deprecated, use connection_name instead] Immutable. The Unity Catalog connection that this gateway pipeline uses to communicate with the source. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "connection_name": - "description": |- - Immutable. The Unity Catalog connection that this gateway pipeline uses to communicate with the source. - "x-databricks-preview": |- - PRIVATE - "connection_parameters": - "description": |- - Optional, Internal. Parameters required to establish an initial connection with the source. - "x-databricks-preview": |- - PRIVATE - "gateway_storage_catalog": - "description": |- - Required, Immutable. The name of the catalog for the gateway pipeline's storage location. - "x-databricks-preview": |- - PRIVATE - "gateway_storage_name": - "description": |- - Optional. The Unity Catalog-compatible name for the gateway storage location. - This is the destination to use for the data that is extracted by the gateway. - Spark Declarative Pipelines system will automatically create the storage location under the catalog and schema. - "x-databricks-preview": |- - PRIVATE - "gateway_storage_schema": - "description": |- - Required, Immutable. The name of the schema for the gateway pipelines's storage location. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionPipelineDefinition: - "connection_name": - "description": |- - 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": - "description": |- - (Optional) Connector Type for sources. Ex: CDC, Query Based. - "data_staging_options": - "description": |- - (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. - "full_refresh_window": - "description": |- - (Optional) A window that specifies a set of time ranges for snapshot queries in CDC. - "ingest_from_uc_foreign_catalog": - "description": |- - 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": - "description": |- - 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. - "netsuite_jar_path": - "description": |- - Netsuite only configuration. When the field is set for a netsuite connector, - the jar stored in the field will be validated and added to the classpath of - pipeline's cluster. - "x-databricks-preview": |- - PRIVATE - "objects": - "description": |- - Required. Settings specifying tables to replicate and the destination for the replicated tables. - "source_configurations": - "description": |- - Top-level source configurations - "source_type": - "description": |- - The type of the foreign source. - The source type will be inferred from the source connection or ingestion gateway. - This field is output only and will be ignored if provided. - "x-databricks-field-behaviors_output_only": |- - true - "table_configuration": - "description": |- - Configuration settings to control the ingestion of tables. These settings are applied to all tables in the pipeline. -? github.com/databricks/databricks-sdk-go/service/pipelines.IngestionPipelineDefinitionTableSpecificConfigQueryBasedConnectorConfig -: "_": - "description": |- - Configurations that are only applicable for query-based ingestion connectors. - "cursor_columns": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionPipelineDefinitionWorkdayReportParameters: - "incremental": - "description": |- - (Optional) Marks the report as incremental. - This field is deprecated and should not be used. Use `parameters` instead. The incremental behavior is now - controlled by the `parameters` field. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "parameters": - "description": |- - Parameters for the Workday report. Each key represents the parameter name (e.g., "start_date", "end_date"), - and the corresponding value is a SQL-like expression used to compute the parameter value at runtime. - Example: - { - "start_date": "{ coalesce(current_offset(), date(\"2025-02-01\")) }", - "end_date": "{ current_date() - INTERVAL 1 DAY }" - } - "x-databricks-preview": |- - PRIVATE - "report_parameters": - "description": |- - (Optional) Additional custom parameters for Workday Report - This field is deprecated and should not be used. Use `parameters` instead. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionPipelineDefinitionWorkdayReportParametersQueryKeyValue: - "key": - "description": |- - Key for the report parameter, can be a column name or other metadata - "x-databricks-preview": |- - PRIVATE - "value": - "description": |- - Value for the report parameter. - Possible values it can take are these sql functions: - 1. coalesce(current_offset(), date("YYYY-MM-DD")) -> if current_offset() is null, then the passed date, else current_offset() - 2. current_date() - 3. date_sub(current_date(), x) -> subtract x (some non-negative integer) days from current date - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionSourceType: - "_": - "enum": - - |- - MYSQL - - |- - POSTGRESQL - - |- - SQLSERVER - - |- - SALESFORCE - - |- - BIGQUERY - - |- - NETSUITE - - |- - WORKDAY_RAAS - - |- - GA4_RAW_DATA - - |- - SERVICENOW - - |- - MANAGED_POSTGRESQL - - |- - ORACLE - - |- - TERADATA - - |- - SHAREPOINT - - |- - DYNAMICS365 - - |- - GOOGLE_DRIVE - - |- - JIRA - - |- - CONFLUENCE - - |- - META_MARKETING - - |- - ZENDESK - - |- - FOREIGN_CATALOG -github.com/databricks/databricks-sdk-go/service/pipelines.JiraConnectorOptions: - "_": - "description": |- - Jira specific options for ingestion - "include_jira_spaces": - "description": |- - (Optional) Projects to filter Jira data on -github.com/databricks/databricks-sdk-go/service/pipelines.JsonTransformerOptions: - "as_variant": - "description": |- - Parse the entire value as a single Variant column. - "x-databricks-preview": |- - PRIVATE - "schema": - "description": |- - Inline schema string for JSON parsing (Spark DDL format). - "x-databricks-preview": |- - PRIVATE - "schema_evolution_mode": - "description": |- - (Optional) Schema evolution mode for schema inference. - "x-databricks-preview": |- - PRIVATE - "schema_file_path": - "description": |- - Path to a schema file (.ddl). - "x-databricks-preview": |- - PRIVATE - "schema_hints": - "description": |- - (Optional) Schema hints as a comma-separated string of "column_name type" pairs. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.KafkaOptions: - "client_config": - "description": |- - Undocumented backdoor mechanism for overriding parameters - to pass to the Kafka client. - This is not supported and may break at any time. - "x-databricks-preview": |- - PRIVATE - "key_transformer": - "description": |- - (Optional) Transformer for the message key. - If not specified, the key is left as raw bytes. - "x-databricks-preview": |- - PRIVATE - "max_offsets_per_trigger": - "description": |- - Internal option to control the maximum number of offsets to process per trigger. - "x-databricks-preview": |- - PRIVATE - "starting_offset": - "description": |- - (Optional) Where to begin reading when no checkpoint exists. - Valid values: "latest" and "earliest". Defaults to "latest". - "x-databricks-preview": |- - PRIVATE - "topic_pattern": - "description": |- - Java regex pattern to subscribe to matching topics. - Only one of topics or topic_pattern must be specified. - "x-databricks-preview": |- - PRIVATE - "topics": - "description": |- - Topics to subscribe to. - Only one of topics or topic_pattern must be specified. - "x-databricks-preview": |- - PRIVATE - "value_transformer": - "description": |- - (Optional) Transformer for the message value. - If not specified, the value is left as raw bytes. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.ManualTrigger: {} -github.com/databricks/databricks-sdk-go/service/pipelines.MetaMarketingOptions: - "_": - "description": |- - Meta Marketing (Meta Ads) specific options for ingestion - "action_attribution_windows": - "description": |- - (Optional) Action attribution windows for insights reporting (e.g. "28d_click", "1d_view") - "action_breakdowns": - "description": |- - (Optional) Action breakdowns to configure for data aggregation - "action_report_time": - "description": |- - (Optional) Timing used to report action statistics (impression, conversion, mixed, or lifetime) - "breakdowns": - "description": |- - (Optional) Breakdowns to configure for data aggregation - "custom_insights_lookback_window": - "description": |- - (Optional) Window in days to revisit data during sync to capture - updated conversion data from the API. - "level": - "description": |- - (Optional) Granularity of data to pull (account, ad, adset, campaign) - "start_date": - "description": |- - (Optional) Start date in yyyy-MM-dd format (e.g. 2025-01-15). Data added - after this date will be ingested - "time_increment": - "description": |- - (Optional) Value in string by which to aggregate statistics (can take all_days, monthly or number of days) -github.com/databricks/databricks-sdk-go/service/pipelines.NotebookLibrary: - "path": - "description": |- - The absolute path of the source code. -github.com/databricks/databricks-sdk-go/service/pipelines.Notifications: - "alerts": - "description": |- - 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": - "description": |- - A list of email addresses notified when a configured alert is triggered. -github.com/databricks/databricks-sdk-go/service/pipelines.OperationTimeWindow: - "_": - "description": |- - Proto representing a window - "days_of_week": - "description": |- - Days of week in which the window is allowed to happen - If not specified all days of the week will be used. - "start_hour": - "description": |- - An integer between 0 and 23 denoting the start hour for the window in the 24-hour day. - "time_zone_id": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/pipelines.OutlookAttachmentMode: - "_": - "description": |- - Attachment behavior mode for Outlook ingestion - "enum": - - |- - ALL - - |- - NON_INLINE_ONLY - - |- - INLINE_ONLY - - |- - NONE -github.com/databricks/databricks-sdk-go/service/pipelines.OutlookBodyFormat: - "_": - "description": |- - Body format for Outlook email content - "enum": - - |- - TEXT_HTML - - |- - TEXT_PLAIN -github.com/databricks/databricks-sdk-go/service/pipelines.OutlookOptions: - "_": - "description": |- - Outlook specific options for ingestion - "attachment_mode": - "description": |- - (Optional) Controls which attachments to ingest. - If not specified, defaults to ALL. - "x-databricks-preview": |- - PRIVATE - "body_format": - "description": |- - (Optional) Defines how the body_content column is populated. - TEXT_HTML: Preserves full formatting, links, and styling. - TEXT_PLAIN: Converts body to plain text. Recommended for AI/RAG pipelines to reduce token usage and noise. - "x-databricks-preview": |- - PRIVATE - "folder_filter": - "description": |- - Deprecated. Use include_folders instead. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "include_folders": - "description": |- - (Optional) Filter mail folders to include in the sync. - If not specified, all folders will be synced. - Examples: Inbox, Sent Items, Custom_Folder - Filter semantics: OR between different folders. - "x-databricks-preview": |- - PRIVATE - "include_mailboxes": - "description": |- - (Optional) List of mailboxes to sync (e.g. mailbox email addresses or identifiers). - If not specified, all accessible mailboxes are ingested. - Filter semantics: OR between different mailboxes. - "x-databricks-preview": |- - PRIVATE - "include_senders": - "description": |- - (Optional) Filter emails by sender address. Uses exact email match. - Examples: user@vendor.com, alerts@system.io, noreply@company.com - If not specified, emails from all senders will be synced. - Filter semantics: OR between different senders. - "x-databricks-preview": |- - PRIVATE - "include_subjects": - "description": |- - (Optional) Filter emails by subject line. Values ending with "*" use prefix match (subject starts with - the part before "*"); otherwise substring match (subject contains the value). - Examples: "Invoice" (substring), "Re:*" (prefix), "Support Ticket", "URGENT*" - If not specified, emails with all subjects will be synced. - Filter semantics: OR between different subjects. - "x-databricks-preview": |- - PRIVATE - "sender_filter": - "description": |- - Deprecated. Use include_senders instead. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE - "start_date": - "description": |- - (Optional) Start date for the initial sync in YYYY-MM-DD format. - Format: YYYY-MM-DD (e.g., 2024-01-01) - This determines the earliest date from which to sync historical data. - If not specified, complete history is ingested. - "x-databricks-preview": |- - PRIVATE - "subject_filter": - "description": |- - Deprecated. Use include_subjects instead. - "deprecation_message": |- - This field is deprecated - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.PathPattern: - "include": - "description": |- - The source code to include for pipelines -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineCluster: - "apply_policy_default_values": - "description": |- - Note: This field won't be persisted. Only API users will check this field. - "autoscale": - "description": |- - 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. - "aws_attributes": - "description": |- - Attributes related to clusters running on Amazon Web Services. - If not specified at cluster creation, a set of default values will be used. - "azure_attributes": - "description": |- - Attributes related to clusters running on Microsoft Azure. - If not specified at cluster creation, a set of default values will be used. - "cluster_log_conf": - "description": |- - 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`. - "custom_tags": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - Whether to enable local disk encryption for the cluster. - "gcp_attributes": - "description": |- - Attributes related to clusters running on Google Cloud Platform. - If not specified at cluster creation, a set of default values will be used. - "init_scripts": - "description": |- - 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`. - "instance_pool_id": - "description": |- - The optional ID of the instance pool to which the cluster belongs. - "label": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - The ID of the cluster policy used to create the cluster if applicable. - "spark_conf": - "description": |- - An object containing a set of optional, user-specified Spark configuration key-value pairs. - See :method:clusters/create for more details. - "spark_env_vars": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineClusterAutoscale: - "max_workers": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineClusterAutoscaleMode: - "_": - "description": |- - 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. - "enum": - - |- - ENHANCED - - |- - LEGACY -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineDeployment: - "deployment_id": - "description": |- - ID of the deployment that manages this pipeline. Only set when `kind` is - `BUNDLE`. Used to look up deployment metadata from the Deployment - Metadata service. - "x-databricks-preview": |- - PRIVATE - "kind": - "description": |- - The deployment method that manages the pipeline. - "metadata_file_path": - "description": |- - The path to the file containing metadata about the deployment. - "version_id": - "description": |- - ID of the version of the deployment that produced this pipeline. Only - set when `kind` is `BUNDLE`. Identifies a specific snapshot of the - deployment in the Deployment Metadata service. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineLibrary: - "file": - "description": |- - The path to a file that defines a pipeline and is stored in the Databricks Repos. - "glob": - "description": |- - 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`. - "jar": - "description": |- - URI of the jar to be installed. Currently only DBFS is supported. - "x-databricks-preview": |- - PRIVATE - "maven": - "description": |- - Specification of a maven library to be installed. - "x-databricks-preview": |- - PRIVATE - "notebook": - "description": |- - The path to a notebook that defines a pipeline and is stored in the Databricks workspace. - "whl": - "description": |- - URI of the whl to be installed. - "deprecation_message": |- - This field is deprecated -github.com/databricks/databricks-sdk-go/service/pipelines.PipelinePermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - IS_OWNER - - |- - CAN_RUN - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineTrigger: - "cron": {} - "manual": {} -github.com/databricks/databricks-sdk-go/service/pipelines.PipelinesEnvironment: - "_": - "description": |- - 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 dependencies are supported. - "dependencies": - "description": |- - 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), - "environment_version": - "description": |- - The environment version of the serverless Python environment used to execute - customer Python code. Each environment version includes a specific Python - version and a curated set of pre-installed libraries with defined versions, - providing a stable and reproducible execution environment. - - Databricks supports a three-year lifecycle for each environment version. - For available versions and their included packages, see - https://docs.databricks.com/aws/en/release-notes/serverless/environment-version/ - - The value should be a string representing the environment version number, for example: `"4"`. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.PostgresCatalogConfig: - "_": - "description": |- - PG-specific catalog-level configuration parameters - "slot_config": - "description": |- - Optional. The Postgres slot configuration to use for logical replication -github.com/databricks/databricks-sdk-go/service/pipelines.PostgresSlotConfig: - "_": - "description": |- - PostgresSlotConfig contains the configuration for a Postgres logical replication slot - "publication_name": - "description": |- - The name of the publication to use for the Postgres source - "slot_name": - "description": |- - The name of the logical replication slot to use for the Postgres source -github.com/databricks/databricks-sdk-go/service/pipelines.ReportSpec: - "destination_catalog": - "description": |- - Required. Destination catalog to store table. - "destination_schema": - "description": |- - Required. Destination schema to store table. - "destination_table": - "description": |- - Required. Destination table name. The pipeline fails if a table with that name already exists. - "source_url": - "description": |- - Required. Report URL in the source system. - "table_configuration": - "description": |- - Configuration settings to control the ingestion of tables. These settings override the table_configuration defined in the IngestionPipelineDefinition object. -github.com/databricks/databricks-sdk-go/service/pipelines.RestartWindow: - "days_of_week": - "description": |- - Days of week in which the restart is allowed to happen (within a five-hour window starting at start_hour). - If not specified all days of the week will be used. - "x-databricks-preview": |- - PRIVATE - "start_hour": - "description": |- - An integer between 0 and 23 denoting the start hour for the restart window in the 24-hour day. - Continuous pipeline restart is triggered only within a five-hour window starting at this hour. - "x-databricks-preview": |- - PRIVATE - "time_zone_id": - "description": |- - Time zone id of restart 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. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.RunAs: - "_": - "description": |- - 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. - "service_principal_name": - "description": |- - Application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - "user_name": - "description": |- - The email of an active workspace user. Users can only set this field to their own email. -github.com/databricks/databricks-sdk-go/service/pipelines.SchemaSpec: - "connector_options": - "description": |- - (Optional) Source Specific Connector Options - "destination_catalog": - "description": |- - Required. Destination catalog to store tables. - "destination_schema": - "description": |- - 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": - "description": |- - The source catalog name. Might be optional depending on the type of source. - "source_schema": - "description": |- - Required. Schema name in the source database. - "table_configuration": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/pipelines.SharepointOptions: - "entity_type": - "description": |- - (Optional) The type of SharePoint entity to ingest. - If not specified, defaults to FILE. - "x-databricks-preview": |- - PRIVATE - "file_ingestion_options": - "description": |- - (Optional) File ingestion options for processing files. - "x-databricks-preview": |- - PRIVATE - "url": - "description": |- - Required. The SharePoint URL. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.SharepointOptionsSharepointEntityType: - "_": - "enum": - - |- - FILE - - |- - FILE_METADATA - - |- - PERMISSION - - |- - LIST -github.com/databricks/databricks-sdk-go/service/pipelines.SmartsheetOptions: - "_": - "description": |- - Smartsheet specific options for ingestion - "enforce_schema": - "description": |- - (Optional) When true, maps each column to its Smartsheet-declared type (Text/Number/Date/ - Checkbox/etc.). Cells that do not conform to the declared type are set to NULL. - When false, all columns land as STRING. Use false for sheets with irregular data or columns - that frequently violate their own declared type. - If not specified, defaults to true. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.SourceCatalogConfig: - "_": - "description": |- - SourceCatalogConfig contains catalog-level custom configuration parameters for each source - "postgres": - "description": |- - Postgres-specific catalog-level configuration parameters - "source_catalog": - "description": |- - Source catalog name -github.com/databricks/databricks-sdk-go/service/pipelines.SourceConfig: - "catalog": - "description": |- - Catalog-level source configuration parameters - "google_ads_config": - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.TableSpec: - "connector_options": - "description": |- - (Optional) Source Specific Connector Options - "destination_catalog": - "description": |- - Required. Destination catalog to store table. - "destination_schema": - "description": |- - Required. Destination schema to store table. - "destination_table": - "description": |- - 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": - "description": |- - Source catalog name. Might be optional depending on the type of source. - "source_schema": - "description": |- - Schema name in the source database. Might be optional depending on the type of source. - "source_table": - "description": |- - Required. Table name in the source database. - "table_configuration": - "description": |- - Configuration settings to control the ingestion of tables. These settings override the table_configuration defined in the IngestionPipelineDefinition object and the SchemaSpec. -github.com/databricks/databricks-sdk-go/service/pipelines.TableSpecificConfig: - "auto_full_refresh_policy": - "description": |- - (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. - "exclude_columns": - "description": |- - 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": - "description": |- - 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": - "description": |- - The primary key of the table used to apply changes. - "query_based_connector_config": - "description": |- - Configurations that are only applicable for query-based ingestion connectors. - "row_filter": - "description": |- - (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. - "salesforce_include_formula_fields": - "description": |- - If true, formula fields defined in the table are included in the ingestion. This setting is only valid for the Salesforce connector - "x-databricks-preview": |- - PRIVATE - "scd_type": - "description": |- - The SCD type to use to ingest the table. - "sequence_by": - "description": |- - 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. - "workday_report_parameters": - "description": |- - (Optional) Additional custom parameters for Workday Report - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.TableSpecificConfigScdType: - "_": - "description": |- - The SCD type to use to ingest the table. - "enum": - - |- - SCD_TYPE_1 - - |- - SCD_TYPE_2 - - |- - APPEND_ONLY -github.com/databricks/databricks-sdk-go/service/pipelines.TikTokAdsOptions: - "_": - "description": |- - TikTok Ads specific options for ingestion - "data_level": - "description": |- - (Optional) Data level for the report. - If not specified, defaults to AUCTION_CAMPAIGN. - "x-databricks-preview": |- - PRIVATE - "dimensions": - "description": |- - (Optional) Dimensions to include in the report. - Examples: "campaign_id", "adgroup_id", "ad_id", "stat_time_day", "stat_time_hour" - If not specified, defaults to campaign_id. - "x-databricks-preview": |- - PRIVATE - "lookback_window_days": - "description": |- - (Optional) Number of days to look back for report tables during incremental sync - to capture late-arriving conversions and attribution data. - If not specified, defaults to 7 days. - "x-databricks-preview": |- - PRIVATE - "metrics": - "description": |- - (Optional) Metrics to include in the report. - Examples: "spend", "impressions", "clicks", "conversion", "cpc" - If not specified, defaults to basic metrics (spend, impressions, clicks, etc.) - "x-databricks-preview": |- - PRIVATE - "query_lifetime": - "description": |- - (Optional) Whether to request lifetime metrics (all-time aggregated data). - When true, the report returns all-time data. - If not specified, defaults to false. - "x-databricks-preview": |- - PRIVATE - "report_type": - "description": |- - (Optional) Report type for the TikTok Ads API. - If not specified, defaults to BASIC. - "x-databricks-preview": |- - PRIVATE - "sync_start_date": - "description": |- - (Optional) Start date for the initial sync of report tables in YYYY-MM-DD format. - This determines the earliest date from which to sync historical data. - If not specified, defaults to 1 year of historical data for daily reports - and 30 days for hourly reports. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.TikTokAdsOptionsTikTokDataLevel: - "_": - "description": |- - Data level for TikTok Ads report aggregation. - "enum": - - |- - AUCTION_ADVERTISER - - |- - AUCTION_CAMPAIGN - - |- - AUCTION_ADGROUP - - |- - AUCTION_AD -github.com/databricks/databricks-sdk-go/service/pipelines.TikTokAdsOptionsTikTokReportType: - "_": - "description": |- - Report type for TikTok Ads API. - "enum": - - |- - BASIC - - |- - AUDIENCE - - |- - PLAYABLE_AD - - |- - DSA - - |- - BUSINESS_CENTER - - |- - GMV_MAX -github.com/databricks/databricks-sdk-go/service/pipelines.Transformer: - "_": - "description": |- - Specifies how to transform binary data into structured data. - "format": - "description": |- - Required: the wire format of the data. - "x-databricks-preview": |- - PRIVATE - "json_options": - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/pipelines.TransformerFormat: - "_": - "enum": - - |- - STRING - - |- - JSON -github.com/databricks/databricks-sdk-go/service/pipelines.ZendeskSupportOptions: - "_": - "description": |- - Zendesk Support specific options for ingestion - "start_date": - "description": |- - (Optional) Start date in YYYY-MM-DD format for the initial sync. - This determines the earliest date from which to sync historical data. - "x-databricks-preview": |- - PRIVATE -github.com/databricks/databricks-sdk-go/service/postgres.EndpointGroupSpec: - "enable_readable_secondaries": - "description": |- - Whether to allow read-only connections to read-write endpoints. Only relevant for read-write endpoints where - size.max > 1. - "max": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/postgres.EndpointSettings: - "_": - "description": |- - A collection of settings for a compute endpoint. - "pg_settings": - "description": |- - A raw representation of Postgres settings. -github.com/databricks/databricks-sdk-go/service/postgres.EndpointType: - "_": - "description": |- - The compute endpoint type. Either `read_write` or `read_only`. - "enum": - - |- - ENDPOINT_TYPE_READ_WRITE - - |- - ENDPOINT_TYPE_READ_ONLY -github.com/databricks/databricks-sdk-go/service/postgres.NewPipelineSpec: - "budget_policy_id": - "description": |- - Budget policy to set on the newly created pipeline. - "storage_catalog": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/postgres.ProjectCustomTag: - "key": - "description": |- - The key of the custom tag. - "value": - "description": |- - The value of the custom tag. -github.com/databricks/databricks-sdk-go/service/postgres.ProjectDefaultEndpointSettings: - "_": - "description": |- - A collection of settings for a compute endpoint. - "autoscaling_limit_max_cu": - "description": |- - The maximum number of Compute Units. Minimum value is 0.5. - "autoscaling_limit_min_cu": - "description": |- - The minimum number of Compute Units. Minimum value is 0.5. - "no_suspension": - "description": |- - 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": - "description": |- - A raw representation of Postgres settings. - "suspend_timeout_duration": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/postgres.SyncedTableSyncedTableSpecSyncedTableSchedulingPolicy: - "_": - "description": |- - Scheduling policy of the synced table's underlying pipeline. - "enum": - - |- - CONTINUOUS - - |- - TRIGGERED - - |- - SNAPSHOT -github.com/databricks/databricks-sdk-go/service/serving.Ai21LabsConfig: - "ai21labs_api_key": - "description": |- - 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": - "description": |- - 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`. -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayConfig: - "fallback_config": - "description": |- - 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. - "guardrails": - "description": |- - Configuration for AI Guardrails to prevent unwanted data and unsafe data in requests and responses. - "inference_table_config": - "description": |- - 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. - "rate_limits": - "description": |- - Configuration for rate limits which can be set to limit endpoint traffic. - "usage_tracking_config": - "description": |- - Configuration to enable usage tracking using system tables. - These tables allow you to monitor operational usage on endpoints and their associated costs. -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailParameters: - "invalid_keywords": - "description": |- - List of invalid keywords. - AI guardrail uses keyword or string matching to decide if the keyword exists in the request or response content. - "deprecation_message": |- - This field is deprecated - "pii": - "description": |- - Configuration for guardrail PII filter. - "safety": - "description": |- - Indicates whether the safety filter is enabled. - "valid_topics": - "description": |- - The list of allowed topics. - Given a chat request, this guardrail flags the request if its topic is not in the allowed topics. - "deprecation_message": |- - This field is deprecated -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailPiiBehavior: - "behavior": - "description": |- - Configuration for input guardrail filters. -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrailPiiBehaviorBehavior: - "_": - "enum": - - |- - NONE - - |- - BLOCK - - |- - MASK -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayGuardrails: - "input": - "description": |- - Configuration for input guardrail filters. - "output": - "description": |- - Configuration for output guardrail filters. -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayInferenceTableConfig: - "catalog_name": - "description": |- - 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": - "description": |- - Indicates whether the inference table is enabled. - "schema_name": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimit: - "calls": - "description": |- - Used to specify how many calls are allowed for a key within the renewal_period. - "key": - "description": |- - 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": - "description": |- - 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": - "description": |- - Renewal period field for a rate limit. Currently, only 'minute' is supported. - "tokens": - "description": |- - Used to specify how many tokens are allowed for a key within the renewal_period. -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitKey: - "_": - "enum": - - |- - user - - |- - endpoint - - |- - user_group - - |- - service_principal -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayRateLimitRenewalPeriod: - "_": - "enum": - - |- - minute -github.com/databricks/databricks-sdk-go/service/serving.AiGatewayUsageTrackingConfig: - "enabled": - "description": |- - Whether to enable usage tracking. -github.com/databricks/databricks-sdk-go/service/serving.AmazonBedrockConfig: - "aws_access_key_id": - "description": |- - 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": - "description": |- - 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": - "description": |- - The AWS region to use. Bedrock has to be enabled there. - "aws_secret_access_key": - "description": |- - 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": - "description": |- - 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": - "description": |- - The underlying provider in Amazon Bedrock. Supported values (case - insensitive) include: Anthropic, Cohere, AI21Labs, Amazon. - "instance_profile_arn": - "description": |- - 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`. -github.com/databricks/databricks-sdk-go/service/serving.AmazonBedrockConfigBedrockProvider: - "_": - "enum": - - |- - anthropic - - |- - cohere - - |- - ai21labs - - |- - amazon -github.com/databricks/databricks-sdk-go/service/serving.AnthropicConfig: - "anthropic_api_key": - "description": |- - 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": - "description": |- - 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`. -github.com/databricks/databricks-sdk-go/service/serving.ApiKeyAuth: - "key": - "description": |- - The name of the API key parameter used for authentication. - "value": - "description": |- - The Databricks secret key reference for an API Key. - If you prefer to paste your token directly, see `value_plaintext`. - "value_plaintext": - "description": |- - The API Key provided as a plaintext string. If you prefer to reference your - token using Databricks Secrets, see `value`. -github.com/databricks/databricks-sdk-go/service/serving.AutoCaptureConfigInput: - "_": - "description": |- - Deprecated: legacy inference table configuration. Please use AI Gateway inference tables instead. - See https://docs.databricks.com/aws/en/ai-gateway/inference-tables. - "catalog_name": - "description": |- - The name of the catalog in Unity Catalog. NOTE: On update, you cannot change the catalog name if the inference table is already enabled. - "enabled": - "description": |- - Indicates whether the inference table is enabled. - "schema_name": - "description": |- - The name of the schema in Unity Catalog. NOTE: On update, you cannot change the schema name if the inference table is already enabled. - "table_name_prefix": - "description": |- - The prefix of the table in Unity Catalog. NOTE: On update, you cannot change the prefix name if the inference table is already enabled. -github.com/databricks/databricks-sdk-go/service/serving.BearerTokenAuth: - "token": - "description": |- - The Databricks secret key reference for a token. - If you prefer to paste your token directly, see `token_plaintext`. - "token_plaintext": - "description": |- - The token provided as a plaintext string. If you prefer to reference your - token using Databricks Secrets, see `token`. -github.com/databricks/databricks-sdk-go/service/serving.CohereConfig: - "cohere_api_base": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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`. -github.com/databricks/databricks-sdk-go/service/serving.CustomProviderConfig: - "_": - "description": |- - Configs needed to create a custom provider model route. - "api_key_auth": - "description": |- - This is a field to provide API key authentication for the custom provider API. - You can only specify one authentication method. - "bearer_token_auth": - "description": |- - This is a field to provide bearer token authentication for the custom provider API. - You can only specify one authentication method. - "custom_provider_url": - "description": |- - This is a field to provide the URL of the custom provider API. -github.com/databricks/databricks-sdk-go/service/serving.DatabricksModelServingConfig: - "databricks_api_token": - "description": |- - 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": - "description": |- - 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": - "description": |- - The URL of the Databricks workspace containing the model serving endpoint - pointed to by this external model. -github.com/databricks/databricks-sdk-go/service/serving.EmailNotifications: - "on_update_failure": - "description": |- - A list of email addresses to be notified when an endpoint fails to update its configuration or state. - "on_update_success": - "description": |- - A list of email addresses to be notified when an endpoint successfully updates its configuration or state. -github.com/databricks/databricks-sdk-go/service/serving.EndpointCoreConfigInput: - "auto_capture_config": - "description": |- - Configuration for legacy Inference Tables which automatically log requests and responses to Unity - Catalog. - Deprecated: please use AI Gateway inference tables instead. See - https://docs.databricks.com/aws/en/ai-gateway/inference-tables. - "deprecation_message": |- - This field is deprecated - "served_entities": - "description": |- - The list of served entities under the serving endpoint config. - "served_models": - "description": |- - (Deprecated, use served_entities instead) The list of served models under the serving endpoint config. - "traffic_config": - "description": |- - The traffic configuration associated with the serving endpoint config. -github.com/databricks/databricks-sdk-go/service/serving.EndpointTag: - "key": - "description": |- - Key field for a serving endpoint tag. - "value": - "description": |- - Optional value field for a serving endpoint tag. -github.com/databricks/databricks-sdk-go/service/serving.ExternalModel: - "ai21labs_config": - "description": |- - AI21Labs Config. Only required if the provider is 'ai21labs'. - "amazon_bedrock_config": - "description": |- - Amazon Bedrock Config. Only required if the provider is 'amazon-bedrock'. - "anthropic_config": - "description": |- - Anthropic Config. Only required if the provider is 'anthropic'. - "cohere_config": - "description": |- - Cohere Config. Only required if the provider is 'cohere'. - "custom_provider_config": - "description": |- - Custom Provider Config. Only required if the provider is 'custom'. - "databricks_model_serving_config": - "description": |- - Databricks Model Serving Config. Only required if the provider is 'databricks-model-serving'. - "google_cloud_vertex_ai_config": - "description": |- - Google Cloud Vertex AI Config. Only required if the provider is 'google-cloud-vertex-ai'. - "name": - "description": |- - The name of the external model. - "openai_config": - "description": |- - OpenAI Config. Only required if the provider is 'openai'. - "palm_config": - "description": |- - PaLM Config. Only required if the provider is 'palm'. - "provider": - "description": |- - 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": - "description": |- - The task type of the external model. -github.com/databricks/databricks-sdk-go/service/serving.ExternalModelProvider: - "_": - "enum": - - |- - ai21labs - - |- - anthropic - - |- - amazon-bedrock - - |- - cohere - - |- - databricks-model-serving - - |- - google-cloud-vertex-ai - - |- - openai - - |- - palm - - |- - custom -github.com/databricks/databricks-sdk-go/service/serving.FallbackConfig: - "enabled": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/serving.GoogleCloudVertexAiConfig: - "private_key": - "description": |- - 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": - "description": |- - 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": - "description": |- - This is the Google Cloud project id that the service account is - associated with. - "region": - "description": |- - 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 -github.com/databricks/databricks-sdk-go/service/serving.OpenAiConfig: - "_": - "description": |- - Configs needed to create an OpenAI model route. - "microsoft_entra_client_id": - "description": |- - This field is only required for Azure AD OpenAI and is the Microsoft - Entra Client ID. - "microsoft_entra_client_secret": - "description": |- - 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": - "description": |- - 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": - "description": |- - This field is only required for Azure AD OpenAI and is the Microsoft - Entra Tenant ID. - "openai_api_base": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - 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": - "description": |- - This field is only required for Azure OpenAI and is the name of the - deployment resource for the Azure OpenAI service. - "openai_organization": - "description": |- - This is an optional field to specify the organization in OpenAI or Azure - OpenAI. -github.com/databricks/databricks-sdk-go/service/serving.PaLmConfig: - "palm_api_key": - "description": |- - 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": - "description": |- - 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`. -github.com/databricks/databricks-sdk-go/service/serving.RateLimit: - "calls": - "description": |- - Used to specify how many calls are allowed for a key within the renewal_period. - "key": - "description": |- - Key field for a serving endpoint rate limit. Currently, only 'user' and 'endpoint' are supported, with 'endpoint' being the default if not specified. - "renewal_period": - "description": |- - Renewal period field for a serving endpoint rate limit. Currently, only 'minute' is supported. -github.com/databricks/databricks-sdk-go/service/serving.RateLimitKey: - "_": - "enum": - - |- - user - - |- - endpoint -github.com/databricks/databricks-sdk-go/service/serving.RateLimitRenewalPeriod: - "_": - "enum": - - |- - minute -github.com/databricks/databricks-sdk-go/service/serving.Route: - "served_entity_name": {} - "served_model_name": - "description": |- - The name of the served model this route configures traffic for. - "traffic_percentage": - "description": |- - The percentage of endpoint traffic to send to this route. It must be an integer between 0 and 100 inclusive. -github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput: - "burst_scaling_enabled": - "description": |- - 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": - "description": |- - 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": {} - "environment_vars": - "description": |- - 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": - "description": |- - 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. - "instance_profile_arn": - "description": |- - ARN of the instance profile that the served entity uses to access AWS resources. - "max_provisioned_concurrency": - "description": |- - The maximum provisioned concurrency that the endpoint can scale up to. Do not use if workload_size is specified. - "max_provisioned_throughput": - "description": |- - The maximum tokens per second that the endpoint can scale up to. - "min_provisioned_concurrency": - "description": |- - The minimum provisioned concurrency that the endpoint can scale down to. Do not use if workload_size is specified. - "min_provisioned_throughput": - "description": |- - The minimum tokens per second that the endpoint can scale down to. - "name": - "description": |- - 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": - "description": |- - The number of model units provisioned. - "scale_to_zero_enabled": - "description": |- - Whether the compute resources for the served entity should scale down to zero. - "workload_size": - "description": |- - 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": - "description": |- - 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). -github.com/databricks/databricks-sdk-go/service/serving.ServedModelInput: - "burst_scaling_enabled": - "description": |- - 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": - "description": |- - 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": - "description": |- - ARN of the instance profile that the served entity uses to access AWS resources. - "max_provisioned_concurrency": - "description": |- - The maximum provisioned concurrency that the endpoint can scale up to. Do not use if workload_size is specified. - "max_provisioned_throughput": - "description": |- - The maximum tokens per second that the endpoint can scale up to. - "min_provisioned_concurrency": - "description": |- - The minimum provisioned concurrency that the endpoint can scale down to. Do not use if workload_size is specified. - "min_provisioned_throughput": - "description": |- - The minimum tokens per second that the endpoint can scale down to. - "model_name": {} - "model_version": {} - "name": - "description": |- - 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": - "description": |- - The number of model units provisioned. - "scale_to_zero_enabled": - "description": |- - Whether the compute resources for the served entity should scale down to zero. - "workload_size": - "description": |- - 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": - "description": |- - 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). -github.com/databricks/databricks-sdk-go/service/serving.ServedModelInputWorkloadType: - "_": - "description": |- - Please keep this in sync with with workload types in InferenceEndpointEntities.scala - "enum": - - |- - CPU - - |- - GPU_MEDIUM - - |- - GPU_SMALL - - |- - GPU_LARGE - - |- - MULTIGPU_MEDIUM - - |- - GPU_XLARGE -github.com/databricks/databricks-sdk-go/service/serving.ServingEndpointPermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - CAN_QUERY - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/serving.ServingModelWorkloadType: - "_": - "description": |- - Please keep this in sync with with workload types in InferenceEndpointEntities.scala - "enum": - - |- - CPU - - |- - GPU_MEDIUM - - |- - GPU_SMALL - - |- - GPU_LARGE - - |- - MULTIGPU_MEDIUM - - |- - GPU_XLARGE -github.com/databricks/databricks-sdk-go/service/serving.TrafficConfig: - "routes": - "description": |- - The list of routes that define traffic to each served entity. -github.com/databricks/databricks-sdk-go/service/sql.Aggregation: - "_": - "enum": - - |- - SUM - - |- - COUNT - - |- - COUNT_DISTINCT - - |- - AVG - - |- - MEDIAN - - |- - MIN - - |- - MAX - - |- - STDDEV -github.com/databricks/databricks-sdk-go/service/sql.AlertEvaluationState: - "_": - "description": |- - UNSPECIFIED - default unspecify value for proto enum, do not use it in the code - UNKNOWN - alert not yet evaluated - TRIGGERED - alert is triggered - OK - alert is not triggered - ERROR - alert evaluation failed - "enum": - - |- - UNKNOWN - - |- - TRIGGERED - - |- - OK - - |- - ERROR -github.com/databricks/databricks-sdk-go/service/sql.AlertLifecycleState: - "_": - "enum": - - |- - ACTIVE - - |- - DELETED -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Evaluation: - "comparison_operator": - "description": |- - Operator used for comparison in alert evaluation. - "empty_result_state": - "description": |- - Alert state if result is empty. Please avoid setting this field to be `UNKNOWN` because `UNKNOWN` state is planned to be deprecated. - "last_evaluated_at": - "description": |- - Timestamp of the last evaluation. - "x-databricks-field-behaviors_output_only": |- - true - "notification": - "description": |- - User or Notification Destination to notify when alert is triggered. - "source": - "description": |- - Source column from result to use to evaluate alert - "state": - "description": |- - Latest state of alert evaluation. - "x-databricks-field-behaviors_output_only": |- - true - "threshold": - "description": |- - Threshold to user for alert evaluation, can be a column or a value. -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Notification: - "notify_on_ok": - "description": |- - Whether to notify alert subscribers when alert returns back to normal. - "retrigger_seconds": - "description": |- - 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": {} -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Operand: - "column": {} - "value": {} -github.com/databricks/databricks-sdk-go/service/sql.AlertV2OperandColumn: - "aggregation": - "description": |- - If not set, the behavior is equivalent to using `First row` in the UI. - "display": {} - "name": {} -github.com/databricks/databricks-sdk-go/service/sql.AlertV2OperandValue: - "bool_value": {} - "double_value": {} - "string_value": {} -github.com/databricks/databricks-sdk-go/service/sql.AlertV2RunAs: - "service_principal_name": - "description": |- - Application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. - "user_name": - "description": |- - The email of an active workspace user. Can only set this field to their own email. -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Subscription: - "destination_id": {} - "user_email": {} -github.com/databricks/databricks-sdk-go/service/sql.Channel: - "_": - "description": |- - Configures the channel name and DBSQL version of the warehouse. CHANNEL_NAME_CUSTOM should be chosen only when `dbsql_version` is specified. - "dbsql_version": {} - "name": {} -github.com/databricks/databricks-sdk-go/service/sql.ChannelName: - "_": - "enum": - - |- - CHANNEL_NAME_PREVIEW - - |- - CHANNEL_NAME_CURRENT - - |- - CHANNEL_NAME_PREVIOUS - - |- - CHANNEL_NAME_CUSTOM -github.com/databricks/databricks-sdk-go/service/sql.ComparisonOperator: - "_": - "enum": - - |- - LESS_THAN - - |- - GREATER_THAN - - |- - EQUAL - - |- - NOT_EQUAL - - |- - GREATER_THAN_OR_EQUAL - - |- - LESS_THAN_OR_EQUAL - - |- - IS_NULL - - |- - IS_NOT_NULL -github.com/databricks/databricks-sdk-go/service/sql.CreateWarehouseRequestWarehouseType: - "_": - "enum": - - |- - TYPE_UNSPECIFIED - - |- - CLASSIC - - |- - PRO -github.com/databricks/databricks-sdk-go/service/sql.CronSchedule: - "pause_status": - "description": |- - Indicate whether this schedule is paused or not. - "quartz_cron_schedule": - "description": |- - 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": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/sql.EndpointTagPair: - "key": {} - "value": {} -github.com/databricks/databricks-sdk-go/service/sql.EndpointTags: - "custom_tags": {} -github.com/databricks/databricks-sdk-go/service/sql.SchedulePauseStatus: - "_": - "enum": - - |- - UNPAUSED - - |- - PAUSED -github.com/databricks/databricks-sdk-go/service/sql.SpotInstancePolicy: - "_": - "description": |- - 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. - "enum": - - |- - POLICY_UNSPECIFIED - - |- - COST_OPTIMIZED - - |- - RELIABILITY_OPTIMIZED -github.com/databricks/databricks-sdk-go/service/sql.WarehousePermissionLevel: - "_": - "description": |- - Permission level - "enum": - - |- - CAN_MANAGE - - |- - IS_OWNER - - |- - CAN_USE - - |- - CAN_MONITOR - - |- - CAN_VIEW -github.com/databricks/databricks-sdk-go/service/vectorsearch.DeltaSyncVectorIndexSpecRequest: - "columns_to_index": - "description": |- - [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": - "description": |- - [Optional] Select the columns to sync with the vector index. If you leave this field blank, all columns - from the source table are synced with the index. The primary key column and embedding source column or - embedding vector column are always synced. - "embedding_source_columns": - "description": |- - The columns that contain the embedding source. - "embedding_vector_columns": - "description": |- - The columns that contain the embedding vectors. - "embedding_writeback_table": - "description": |- - [Optional] Name of the Delta table to sync the vector index contents and computed embeddings to. - "pipeline_type": - "description": |- - 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": - "description": |- - The name of the source table. -github.com/databricks/databricks-sdk-go/service/vectorsearch.DirectAccessVectorIndexSpec: - "embedding_source_columns": - "description": |- - The columns that contain the embedding source. The format should be array[double]. - "embedding_vector_columns": - "description": |- - The columns that contain the embedding vectors. The format should be array[double]. - "schema_json": - "description": |- - The schema of the index in JSON format. - Supported types are `integer`, `long`, `float`, `double`, `boolean`, `string`, `date`, `timestamp`. - Supported types for vector column: `array`, `array`,`. -github.com/databricks/databricks-sdk-go/service/vectorsearch.EmbeddingSourceColumn: - "embedding_model_endpoint_name": - "description": |- - Name of the embedding model endpoint, used by default for both ingestion and querying. - "model_endpoint_name_for_query": - "description": |- - Name of the embedding model endpoint which, if specified, is used for querying (not ingestion). - "name": - "description": |- - Name of the column -github.com/databricks/databricks-sdk-go/service/vectorsearch.EmbeddingVectorColumn: - "embedding_dimension": - "description": |- - Dimension of the embedding vector - "name": - "description": |- - Name of the column -github.com/databricks/databricks-sdk-go/service/vectorsearch.EndpointType: - "_": - "description": |- - Type of endpoint. - "enum": - - |- - STORAGE_OPTIMIZED - - |- - STANDARD -github.com/databricks/databricks-sdk-go/service/vectorsearch.IndexSubtype: - "_": - "description": |- - 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. - "enum": - - |- - VECTOR - - |- - FULL_TEXT - - |- - HYBRID -github.com/databricks/databricks-sdk-go/service/vectorsearch.PipelineType: - "_": - "description": |- - 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. - "enum": - - |- - TRIGGERED - - |- - CONTINUOUS -github.com/databricks/databricks-sdk-go/service/vectorsearch.VectorIndexType: - "_": - "description": |- - 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. - "enum": - - |- - DELTA_SYNC - - |- - DIRECT_ACCESS -github.com/databricks/databricks-sdk-go/service/workspace.AzureKeyVaultSecretScopeMetadata: - "_": - "description": |- - The metadata of the Azure KeyVault for a secret scope of type `AZURE_KEYVAULT` - "dns_name": - "description": |- - The DNS of the KeyVault - "resource_id": - "description": |- - The resource id of the azure KeyVault that user wants to associate the scope with. -github.com/databricks/databricks-sdk-go/service/workspace.ScopeBackendType: - "_": - "description": |- - The types of secret scope backends in the Secret Manager. Azure KeyVault backed secret scopes - will be supported in a later release. - "enum": - - |- - DATABRICKS - - |- - AZURE_KEYVAULT diff --git a/bundle/internal/schema/annotations_openapi_overrides.yml b/bundle/internal/schema/annotations_openapi_overrides.yml deleted file mode 100644 index 25fc5869500..00000000000 --- a/bundle/internal/schema/annotations_openapi_overrides.yml +++ /dev/null @@ -1,1166 +0,0 @@ -github.com/databricks/cli/bundle/config/resources.Alert: - "evaluation": - "description": |- - PLACEHOLDER - "file_path": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER - "permissions": - "description": |- - PLACEHOLDER - "schedule": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.App: - "app_status": - "description": |- - PLACEHOLDER - "budget_policy_id": - "description": |- - PLACEHOLDER - "compute_size": - "description": |- - PLACEHOLDER - "compute_status": - "description": |- - PLACEHOLDER - "config": - "description": |- - PLACEHOLDER - "effective_budget_policy_id": - "description": |- - PLACEHOLDER - "effective_usage_policy_id": - "description": |- - PLACEHOLDER - "git_source": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "oauth2_app_client_id": - "description": |- - PLACEHOLDER - "oauth2_app_integration_id": - "description": |- - PLACEHOLDER - "permissions": - "description": |- - PLACEHOLDER - "service_principal_client_id": - "description": |- - PLACEHOLDER - "service_principal_id": - "description": |- - PLACEHOLDER - "service_principal_name": - "description": |- - PLACEHOLDER - "source_code_path": - "description": |- - PLACEHOLDER - "telemetry_export_destinations": - "description": |- - PLACEHOLDER - "usage_policy_id": - "description": |- - PLACEHOLDER - "user_api_scopes": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Catalog: - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Cluster: - "_": - "markdown_description": |- - The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). - "markdown_examples": |- - 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" - ``` - "data_security_mode": - "description": |- - PLACEHOLDER - "docker_image": - "description": |- - PLACEHOLDER - "kind": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER - "runtime_engine": - "description": |- - PLACEHOLDER - "workload_type": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Dashboard: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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). - "create_time": - "description": |- - The timestamp of when the dashboard was created. - "dashboard_id": - "description": |- - UUID identifying the dashboard. - "display_name": - "description": |- - The display name of the dashboard. - "embed_credentials": - "description": |- - PLACEHOLDER - "etag": - "description": |- - 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": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "lifecycle_state": - "description": |- - The state of the dashboard resource. Used for tracking trashed status. - "parent_path": - "description": |- - 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": - "description": |- - 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": - "description": |- - PLACEHOLDER - "serialized_dashboard": - "description": |- - 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": - "description": |- - The timestamp of when the dashboard was last updated by the user. - This field is excluded in List Dashboards responses. - "warehouse_id": - "description": |- - The warehouse ID used to run the dashboard. -github.com/databricks/cli/bundle/config/resources.DatabaseCatalog: - "create_database_if_not_exists": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "uid": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.DatabaseInstance: - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.ExternalLocation: - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Job: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a job with the resource key `hello-job` with one notebook task: - - ```yaml - resources: - jobs: - hello-job: - name: hello-job - tasks: - - task_key: hello-task - notebook_task: - notebook_path: ./hello.py - ``` - - 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). - "health": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER - "run_as": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.MlflowExperiment: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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 - ``` - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.MlflowModel: - "_": - "markdown_description": |- - 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. - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.ModelServingEndpoint: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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" - ``` - "description": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Pipeline: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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 - ``` - "dry_run": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER - "run_as": - "description": |- - PLACEHOLDER - "trigger": - "deprecation_message": |- - Use continuous instead -github.com/databricks/cli/bundle/config/resources.QualityMonitor: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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 - ``` - "inference_log": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "table_name": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.RegisteredModel: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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 - ``` - "aliases": - "description": |- - PLACEHOLDER - "browse_only": - "description": |- - PLACEHOLDER - "created_at": - "description": |- - PLACEHOLDER - "created_by": - "description": |- - PLACEHOLDER - "full_name": - "description": |- - PLACEHOLDER - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "metastore_id": - "description": |- - PLACEHOLDER - "owner": - "description": |- - PLACEHOLDER - "updated_at": - "description": |- - PLACEHOLDER - "updated_by": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Schema: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a pipeline with the resource key `my_pipeline` that creates a Unity Catalog schema with the key `my_schema` as the target: - - ```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 - ``` - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "properties": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.SecretScopePermissionLevel: - "_": - "enum": - - |- - READ - - |- - WRITE - - |- - MANAGE -github.com/databricks/cli/bundle/config/resources.SqlWarehouse: - "enable_photon": - "description": |- - Configures whether the warehouse should use Photon optimized clusters. - - Defaults to true. - "lifecycle": - "description": |- - 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. - "permissions": - "description": |- - PLACEHOLDER - "spot_instance_policy": - "description": |- - PLACEHOLDER - "warehouse_type": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.SyncedDatabaseTable: - "lifecycle": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.VectorSearchEndpoint: - "lifecycle": - "description": |- - PLACEHOLDER - "permissions": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.VectorSearchIndex: - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - PLACEHOLDER -github.com/databricks/cli/bundle/config/resources.Volume: - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - 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). - "grants": - "description": |- - PLACEHOLDER - "lifecycle": - "description": |- - 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. - "volume_type": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppDeployment: - "create_time": - "description": |- - PLACEHOLDER - "creator": - "description": |- - PLACEHOLDER - "deployment_artifacts": - "description": |- - PLACEHOLDER - "deployment_id": - "description": |- - PLACEHOLDER - "mode": - "description": |- - PLACEHOLDER - "source_code_path": - "description": |- - PLACEHOLDER - "status": - "description": |- - PLACEHOLDER - "update_time": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentArtifacts: - "source_code_path": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppDeploymentStatus: - "message": - "description": |- - PLACEHOLDER - "state": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResource: - "app": - "description": |- - PLACEHOLDER - "database": - "description": |- - PLACEHOLDER - "experiment": - "description": |- - PLACEHOLDER - "genie_space": - "description": |- - PLACEHOLDER - "job": - "description": |- - PLACEHOLDER - "postgres": - "description": |- - PLACEHOLDER - "secret": - "description": |- - PLACEHOLDER - "serving_endpoint": - "description": |- - PLACEHOLDER - "sql_warehouse": - "description": |- - PLACEHOLDER - "uc_securable": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceApp: - "name": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceDatabase: - "database_name": - "description": |- - PLACEHOLDER - "instance_name": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceExperiment: - "experiment_id": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceGenieSpace: - "name": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER - "space_id": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceJob: - "id": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourcePostgres: - "branch": - "description": |- - PLACEHOLDER - "database": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceSecret: - "key": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER - "scope": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceServingEndpoint: - "name": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceSqlWarehouse: - "id": - "description": |- - PLACEHOLDER - "permission": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.AppResourceUcSecurable: - "permission": - "description": |- - PLACEHOLDER - "securable_full_name": - "description": |- - PLACEHOLDER - "securable_type": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.ApplicationStatus: - "message": - "description": |- - PLACEHOLDER - "state": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/apps.ComputeStatus: - "message": - "description": |- - PLACEHOLDER - "state": {} -github.com/databricks/databricks-sdk-go/service/catalog.AwsSqsQueue: - "managed_resource_id": - "description": |- - PLACEHOLDER - "queue_url": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.AzureEncryptionSettings: - "azure_cmk_access_connector_id": - "description": |- - PLACEHOLDER - "azure_cmk_managed_identity_id": - "description": |- - PLACEHOLDER - "azure_tenant_id": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.AzureQueueStorage: - "managed_resource_id": - "description": |- - PLACEHOLDER - "queue_url": - "description": |- - PLACEHOLDER - "resource_group": - "description": |- - PLACEHOLDER - "subscription_id": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.EncryptionDetails: - "sse_encryption_details": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.FileEventQueue: - "managed_aqs": - "description": |- - PLACEHOLDER - "managed_pubsub": - "description": |- - PLACEHOLDER - "managed_sqs": - "description": |- - PLACEHOLDER - "provided_aqs": - "description": |- - PLACEHOLDER - "provided_pubsub": - "description": |- - PLACEHOLDER - "provided_sqs": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.GcpPubsub: - "managed_resource_id": - "description": |- - PLACEHOLDER - "subscription_name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.MonitorInferenceLog: - "granularities": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/catalog.MonitorTimeSeries: - "granularities": - "description": |- - 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. -github.com/databricks/databricks-sdk-go/service/catalog.RegisteredModelAlias: - "catalog_name": - "description": |- - PLACEHOLDER - "id": - "description": |- - PLACEHOLDER - "model_name": - "description": |- - PLACEHOLDER - "schema_name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.SseEncryptionDetails: - "algorithm": - "description": |- - PLACEHOLDER - "aws_kms_key_arn": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/catalog.SseEncryptionDetailsAlgorithm: - "_": - "description": |- - SSE algorithm to use for encrypting S3 objects - "enum": - - |- - AWS_SSE_KMS - - |- - AWS_SSE_S3 -github.com/databricks/databricks-sdk-go/service/compute.AwsAttributes: - "availability": - "description": |- - PLACEHOLDER - "ebs_volume_type": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/compute.AzureAttributes: - "availability": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/compute.ClusterSpec: - "data_security_mode": - "description": |- - PLACEHOLDER - "docker_image": - "description": |- - PLACEHOLDER - "kind": - "description": |- - PLACEHOLDER - "runtime_engine": - "description": |- - PLACEHOLDER - "workload_type": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/compute.DockerImage: - "basic_auth": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/compute.Environment: - "dependencies": - "description": |- - List of pip dependencies, as supported by the version of pip in this environment. - "java_dependencies": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/compute.GcpAttributes: - "availability": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/compute.InitScriptInfo: - "abfss": - "description": |- - Contains the Azure Data Lake Storage destination path -github.com/databricks/databricks-sdk-go/service/compute.LogAnalyticsInfo: - "log_analytics_primary_key": - "description": |- - The primary key for the Azure Log Analytics agent configuration - "log_analytics_workspace_id": - "description": |- - The workspace ID for the Azure Log Analytics agent configuration -github.com/databricks/databricks-sdk-go/service/database.SyncedTablePosition: - "delta_table_sync_info": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.AlertTaskSubscriber: - "destination_id": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.DashboardTask: - "dashboard_id": - "description": |- - PLACEHOLDER - "subscription": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.GenAiComputeTask: - "compute": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.GitSource: - "git_snapshot": - "description": |- - PLACEHOLDER - "sparse_checkout": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.JobEnvironment: - "spec": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.JobsHealthRule: - "metric": - "description": |- - PLACEHOLDER - "op": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.JobsHealthRules: - "rules": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.PythonOperatorTaskParameter: - "name": - "description": |- - PLACEHOLDER - "value": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.RunJobTask: - "python_named_params": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.Subscription: - "subscribers": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.SubscriptionSubscriber: - "destination_id": - "description": |- - PLACEHOLDER - "user_name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.Task: - "dbt_platform_task": - "description": |- - PLACEHOLDER - "gen_ai_compute_task": - "description": |- - PLACEHOLDER - "health": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.TriggerSettings: - "model": - "description": |- - PLACEHOLDER - "table_update": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/jobs.Webhook: - "id": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.ConnectorOptions: - "gdrive_options": - "description": |- - PLACEHOLDER - "kafka_options": - "description": |- - PLACEHOLDER - "sharepoint_options": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.CronTrigger: - "quartz_cron_schedule": - "description": |- - PLACEHOLDER - "timezone_id": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.FileIngestionOptions: - "corrupt_record_column": - "description": |- - PLACEHOLDER - "ignore_corrupt_files": - "description": |- - PLACEHOLDER - "infer_column_types": - "description": |- - PLACEHOLDER - "rescued_data_column": - "description": |- - PLACEHOLDER - "single_variant_column": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.GoogleDriveOptions: - "entity_type": - "description": |- - PLACEHOLDER - "file_ingestion_options": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.IngestionPipelineDefinition: - "netsuite_jar_path": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineLibrary: - "whl": - "deprecation_message": |- - This field is deprecated -github.com/databricks/databricks-sdk-go/service/pipelines.PipelineTrigger: - "cron": - "description": |- - PLACEHOLDER - "manual": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.SourceConfig: - "google_ads_config": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.TableSpecificConfig: - "workday_report_parameters": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/pipelines.Transformer: - "json_options": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/serving.Route: - "served_entity_name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/serving.ServedEntityInput: - "entity_version": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/serving.ServedModelInput: - "model_name": - "description": |- - PLACEHOLDER - "model_version": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Notification: - "subscriptions": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Operand: - "column": - "description": |- - PLACEHOLDER - "value": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.AlertV2OperandColumn: - "aggregation": - "description": |- - PLACEHOLDER - "display": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.AlertV2OperandValue: - "bool_value": - "description": |- - PLACEHOLDER - "double_value": - "description": |- - PLACEHOLDER - "string_value": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.AlertV2Subscription: - "destination_id": - "description": |- - PLACEHOLDER - "user_email": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.Channel: - "dbsql_version": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.EndpointTagPair: - "key": - "description": |- - PLACEHOLDER - "value": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/sql.EndpointTags: - "custom_tags": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/vectorsearch.DeltaSyncVectorIndexSpecRequest: - "columns_to_sync": - "description": |- - PLACEHOLDER - "embedding_source_columns": - "description": |- - PLACEHOLDER - "embedding_vector_columns": - "description": |- - PLACEHOLDER - "embedding_writeback_table": - "description": |- - PLACEHOLDER - "pipeline_type": - "description": |- - PLACEHOLDER - "source_table": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/vectorsearch.DirectAccessVectorIndexSpec: - "embedding_source_columns": - "description": |- - PLACEHOLDER - "embedding_vector_columns": - "description": |- - PLACEHOLDER - "schema_json": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/vectorsearch.EmbeddingSourceColumn: - "embedding_model_endpoint_name": - "description": |- - PLACEHOLDER - "model_endpoint_name_for_query": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER -github.com/databricks/databricks-sdk-go/service/vectorsearch.EmbeddingVectorColumn: - "embedding_dimension": - "description": |- - PLACEHOLDER - "name": - "description": |- - PLACEHOLDER diff --git a/bundle/internal/schema/main.go b/bundle/internal/schema/main.go index deaaf971c7b..e1badcd81f5 100644 --- a/bundle/internal/schema/main.go +++ b/bundle/internal/schema/main.go @@ -185,52 +185,53 @@ func removeOutputOnlyFields(typ reflect.Type, s jsonschema.Schema) jsonschema.Sc } func main() { - if len(os.Args) < 3 { - fmt.Println("Usage: go run main.go [--docs]") + if len(os.Args) < 4 { + fmt.Println("Usage: go run main.go [--docs]") os.Exit(1) } - // Directory with annotation files + // Directory with the annotations file workdir := os.Args[1] // Output file, where the generated JSON schema will be written to. outputFile := os.Args[2] + // The .codegen/cli.json spec. Its schema graph carries the descriptions, + // enums and field behaviors the CLI reflects onto its config types. + cliJSONFile := os.Args[3] // When --docs is passed, skip interpolation patterns and add sinceVersion annotations. // This generates a schema optimized for documentation. - docsMode := len(os.Args) >= 4 && os.Args[3] == "--docs" + docsMode := len(os.Args) >= 5 && os.Args[4] == "--docs" - generateSchema(workdir, outputFile, docsMode) + generateSchema(workdir, outputFile, cliJSONFile, docsMode) } -func generateSchema(workdir, outputFile string, docsMode bool) { +func generateSchema(workdir, outputFile, cliJSONFile string, docsMode bool) { annotationsPath := filepath.Join(workdir, "annotations.yml") - annotationsOpenApiPath := filepath.Join(workdir, "annotations_openapi.yml") - annotationsOpenApiOverridesPath := filepath.Join(workdir, "annotations_openapi_overrides.yml") - - // The .codegen/cli.json spec is the source for the generated annotation - // files. Its schema graph carries the descriptions, enums and field - // behaviors the CLI reflects onto its config types. When unset, the - // committed annotation files are used as-is. - cliJSONFile := os.Getenv("DATABRICKS_CLI_JSON") //nolint:forbidigo // main() entry point, no ctx - - var p *annotationParser - if cliJSONFile != "" { - schemas, err := parseCliJSON(cliJSONFile) - if err != nil { - log.Fatal(err) - } - p = newParser(schemas) + + schemas, err := parseCliJSON(cliJSONFile) + if err != nil { + log.Fatal(err) } - if p != nil { - fmt.Printf("Writing annotations to %s\n", annotationsOpenApiPath) - err := p.extractAnnotations(reflect.TypeFor[config.Root](), annotationsOpenApiPath, annotationsOpenApiOverridesPath) - if err != nil { - log.Fatal(err) - } + extracted, err := newParser(schemas).extractAnnotations(reflect.TypeFor[config.Root]()) + if err != nil { + log.Fatal(err) + } + + graph, err := newTypeGraph(reflect.TypeFor[config.Root]()) + if err != nil { + log.Fatal(err) + } + + fromFile, unknown, err := loadAnnotationsFile(annotationsPath, graph) + if err != nil { + log.Fatal(err) + } + for _, k := range unknown { + fmt.Printf("Dropping annotation at `%s`: no such field in the bundle configuration\n", k) } - a, err := newAnnotationHandler([]string{annotationsOpenApiPath, annotationsOpenApiOverridesPath, annotationsPath}) + a, err := newAnnotationHandler(extracted, fromFile) if err != nil { log.Fatal(err) } @@ -262,7 +263,7 @@ func generateSchema(workdir, outputFile string, docsMode bool) { } // Overwrite the input annotation file, adding missing annotations - err = a.syncWithMissingAnnotations(annotationsPath) + err = a.syncWithMissingAnnotations(annotationsPath, graph) if err != nil { log.Fatal(err) } diff --git a/bundle/internal/schema/main_test.go b/bundle/internal/schema/main_test.go index c708fe90504..7d010163686 100644 --- a/bundle/internal/schema/main_test.go +++ b/bundle/internal/schema/main_test.go @@ -10,15 +10,15 @@ import ( "testing" "github.com/databricks/cli/bundle/config" - "github.com/databricks/cli/bundle/internal/annotation" "github.com/databricks/cli/libs/dyn" "github.com/databricks/cli/libs/dyn/merge" "github.com/databricks/cli/libs/dyn/yamlloader" - "github.com/databricks/cli/libs/jsonschema" "github.com/stretchr/testify/assert" - "go.yaml.in/yaml/v3" + "github.com/stretchr/testify/require" ) +const cliJSONPath = "../../../.codegen/cli.json" + func copyFile(src, dst string) error { in, err := os.Open(src) if err != nil { @@ -41,35 +41,27 @@ func copyFile(src, dst string) error { } // Checks whether descriptions are added for new config fields in the annotations.yml file -// If this test fails either manually add descriptions to the `annotations.yml` or do the following: -// 1. for fields described outside of CLI package, refresh .codegen/cli.json (`./task generate-clijson`) and the annotation files (`./task generate-annotations`) -// 2. run `./task generate-schema` from the repository root to add placeholder descriptions +// If this test fails: +// 1. run `./task generate-schema` from the repository root to add placeholder descriptions // 2. replace all "PLACEHOLDER" values with the actual descriptions if possible -// 3. run `./task generate-schema` again to regenerate the schema with acutal descriptions +// 3. run `./task generate-schema` again to regenerate the schema with actual descriptions func TestRequiredAnnotationsForNewFields(t *testing.T) { workdir := t.TempDir() annotationsPath := path.Join(workdir, "annotations.yml") - annotationsOpenApiPath := path.Join(workdir, "annotations_openapi.yml") - annotationsOpenApiOverridesPath := path.Join(workdir, "annotations_openapi_overrides.yml") - // Copy existing annotation files from the same folder as this test err := copyFile("annotations.yml", annotationsPath) - assert.NoError(t, err) - err = copyFile("annotations_openapi.yml", annotationsOpenApiPath) - assert.NoError(t, err) - err = copyFile("annotations_openapi_overrides.yml", annotationsOpenApiOverridesPath) - assert.NoError(t, err) + require.NoError(t, err) - generateSchema(workdir, path.Join(t.TempDir(), "schema.json"), false) + generateSchema(workdir, path.Join(t.TempDir(), "schema.json"), cliJSONPath, false) originalFile, err := os.ReadFile("annotations.yml") - assert.NoError(t, err) + require.NoError(t, err) currentFile, err := os.ReadFile(annotationsPath) - assert.NoError(t, err) + require.NoError(t, err) original, err := yamlloader.LoadYAML("", bytes.NewBuffer(originalFile)) - assert.NoError(t, err) + require.NoError(t, err) current, err := yamlloader.LoadYAML("", bytes.NewBuffer(currentFile)) - assert.NoError(t, err) + require.NoError(t, err) // Collect added paths. var updatedFieldPaths []string @@ -83,68 +75,13 @@ func TestRequiredAnnotationsForNewFields(t *testing.T) { assert.Empty(t, updatedFieldPaths, "Missing JSON-schema descriptions for new config fields in bundle/internal/schema/annotations.yml:\n%s", strings.Join(updatedFieldPaths, "\n")) } -// Checks whether types in annotation files are still present in Config type +// Checks that the annotations file only contains entries that match the +// current bundle configuration structure. func TestNoDetachedAnnotations(t *testing.T) { - files := []string{ - "annotations.yml", - "annotations_openapi.yml", - "annotations_openapi_overrides.yml", - } - - types := map[string]bool{} - for _, file := range files { - annotations, err := getAnnotations(file) - assert.NoError(t, err) - for k := range annotations { - types[k] = false - } - } - - _, err := jsonschema.FromType(reflect.TypeFor[config.Root](), []func(reflect.Type, jsonschema.Schema) jsonschema.Schema{ - func(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { - delete(types, getPath(typ)) - return s - }, - }) - assert.NoError(t, err) + g, err := newTypeGraph(reflect.TypeFor[config.Root]()) + require.NoError(t, err) - for typ := range types { - t.Errorf("Type `%s` in annotations file is not found in `root.Config` type", typ) - } - assert.Empty(t, types, "Detached annotations found, regenerate schema and check for package path changes") -} - -func getAnnotations(path string) (annotation.File, error) { - b, err := os.ReadFile(path) - if err != nil { - return nil, err - } - - var data annotation.File - err = yaml.Unmarshal(b, &data) - return data, err -} - -//deadcode:allow disabled pending annotation system overhaul; preserved intentionally -func DisabledTestNoDuplicatedAnnotations(t *testing.T) { - // Check for duplicated annotations in annotation files - files := []string{ - "annotations_openapi_overrides.yml", - "annotations.yml", - } - - annotations := map[string]string{} - for _, file := range files { - annotationsFile, err := getAnnotations(file) - assert.NoError(t, err) - for typ, props := range annotationsFile { - for prop := range props { - key := typ + "_" + prop - if prevFile, ok := annotations[key]; ok { - t.Errorf("Annotation `%s` is duplicated in %s and %s", key, prevFile, file) - } - annotations[key] = file - } - } - } + _, unknown, err := loadAnnotationsFile("annotations.yml", g) + require.NoError(t, err) + assert.Empty(t, unknown, "Detached annotations found; run `./task generate-schema` to drop them") } diff --git a/bundle/internal/schema/parser.go b/bundle/internal/schema/parser.go index 3785bc78624..bf56ea98bd8 100644 --- a/bundle/internal/schema/parser.go +++ b/bundle/internal/schema/parser.go @@ -1,9 +1,7 @@ package main import ( - "bytes" "fmt" - "os" "path" "reflect" "slices" @@ -11,8 +9,6 @@ import ( "github.com/databricks/cli/bundle/internal/annotation" "github.com/databricks/cli/internal/clijson" - "github.com/databricks/cli/libs/dyn/convert" - "github.com/databricks/cli/libs/dyn/yamlloader" "github.com/databricks/cli/libs/jsonschema" ) @@ -121,27 +117,10 @@ func isOutputOnly(behaviors []string) *bool { } // Use the spec to load descriptions for the given type. -func (p *annotationParser) extractAnnotations(typ reflect.Type, outputPath, overridesPath string) error { +func (p *annotationParser) extractAnnotations(typ reflect.Type) (annotation.File, error) { annotations := annotation.File{} - overrides := annotation.File{} - b, err := os.ReadFile(overridesPath) - if err != nil { - return err - } - overridesDyn, err := yamlloader.LoadYAML(overridesPath, bytes.NewBuffer(b)) - if err != nil { - return err - } - err = convert.ToTyped(&overrides, overridesDyn) - if err != nil { - return err - } - if overrides == nil { - overrides = annotation.File{} - } - - _, err = jsonschema.FromType(typ, []func(reflect.Type, jsonschema.Schema) jsonschema.Schema{ + _, err := jsonschema.FromType(typ, []func(reflect.Type, jsonschema.Schema) jsonschema.Schema{ func(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { ref, ok := p.findRef(typ) if !ok { @@ -181,70 +160,13 @@ func (p *annotationParser) extractAnnotations(typ reflect.Type, outputPath, over DeprecationMessage: deprecationMessageFor(refProp.Deprecated), OutputOnly: isOutputOnly(refProp.Behaviors), } - if description == "" { - addEmptyOverride(k, basePath, overrides) - } - } else { - addEmptyOverride(k, basePath, overrides) } } return s }, }) if err != nil { - return err - } - - err = saveYamlWithStyle(overridesPath, overrides) - if err != nil { - return err - } - err = saveYamlWithStyle(outputPath, annotations) - if err != nil { - return err - } - err = prependCommentToFile(outputPath, "# This file is auto-generated. DO NOT EDIT.\n") - if err != nil { - return err - } - return nil -} - -func prependCommentToFile(outputPath, comment string) error { - b, err := os.ReadFile(outputPath) - if err != nil { - return err - } - f, err := os.OpenFile(outputPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644) - if err != nil { - return err - } - defer f.Close() - - _, err = f.WriteString(comment) - if err != nil { - return err - } - _, err = f.Write(b) - return err -} - -func addEmptyOverride(key, pkg string, overridesFile annotation.File) { - if overridesFile[pkg] == nil { - overridesFile[pkg] = map[string]annotation.Descriptor{} - } - - overrides := overridesFile[pkg] - if overrides[key].Description == "" { - overrides[key] = annotation.Descriptor{Description: annotation.Placeholder} - } - - a, ok := overrides[key] - if !ok { - a = annotation.Descriptor{} - } - if a.Description == "" { - a.Description = annotation.Placeholder + return nil, err } - overrides[key] = a + return annotations, nil } diff --git a/bundle/internal/schema/typegraph.go b/bundle/internal/schema/typegraph.go new file mode 100644 index 00000000000..d82a80bd233 --- /dev/null +++ b/bundle/internal/schema/typegraph.go @@ -0,0 +1,149 @@ +package main + +import ( + "container/list" + "fmt" + "reflect" + "slices" + "strings" + + "github.com/databricks/cli/libs/jsonschema" +) + +// typeGraph captures, for every annotatable type reachable from the root +// config type, the properties the JSON schema generator emits for it and the +// type each property resolves to. The property set and the resolution targets +// come from jsonschema.FromType itself so the graph cannot drift from the +// generated schema; reflection is only used to recover struct declaration +// order, which the schema's Properties map loses. +type typeGraph struct { + // root is the type path of the root type. + root string + // fields maps a type path to its properties in struct declaration order. + // Non-struct types (enums) are present with no properties. + fields map[string][]fieldEdge +} + +// fieldEdge is one property of a type: the property name and the type path of +// the type it resolves to after unwrapping pointers, slices and maps. typ is +// empty for properties whose type cannot carry annotations (primitives, +// interface). +type fieldEdge struct { + name string + typ string +} + +func newTypeGraph(root reflect.Type) (*typeGraph, error) { + g := &typeGraph{ + root: getPath(root), + fields: map[string][]fieldEdge{}, + } + + var ferr error + _, err := jsonschema.FromType(root, []func(reflect.Type, jsonschema.Schema) jsonschema.Schema{ + func(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { + refPath := getPath(typ) + if !strings.HasPrefix(refPath, "github.com") { + return s + } + + var edges []fieldEdge + if typ.Kind() == reflect.Struct { + for _, name := range structFieldNames(typ) { + prop, ok := s.Properties[name] + if !ok { + ferr = fmt.Errorf("field order for %s diverged from the generated schema: %s not in schema", refPath, name) + return s + } + edges = append(edges, fieldEdge{name: name, typ: resolveEdgeType(prop)}) + } + if len(edges) != len(s.Properties) { + ferr = fmt.Errorf("field order for %s diverged from the generated schema: %d fields, %d properties", refPath, len(edges), len(s.Properties)) + return s + } + } + + g.fields[refPath] = edges + return s + }, + }) + if err != nil { + return nil, err + } + return g, ferr +} + +// edge returns the property of the given type with the given name. +func (g *typeGraph) edge(typeKey, name string) (fieldEdge, bool) { + for _, e := range g.fields[typeKey] { + if e.name == name { + return e, true + } + } + return fieldEdge{}, false +} + +// structFieldNames returns the JSON property names of typ in struct +// declaration order, flattening embedded structs breadth-first with the same +// tag rules as jsonschema.FromType. newTypeGraph checks the result against the +// properties FromType actually emitted, so the two cannot silently diverge. +func structFieldNames(typ reflect.Type) []string { + var names []string + seen := map[string]bool{} + bfsQueue := list.New() + + for field := range typ.Fields() { + bfsQueue.PushBack(field) + } + for bfsQueue.Len() > 0 { + front := bfsQueue.Front() + field := front.Value.(reflect.StructField) + bfsQueue.Remove(front) + + if field.Anonymous { + fieldType := field.Type + if fieldType.Kind() == reflect.Pointer { + fieldType = fieldType.Elem() + } + for f := range fieldType.Fields() { + bfsQueue.PushBack(f) + } + continue + } + + bundleTags := strings.Split(field.Tag.Get("bundle"), ",") + if slices.Contains(bundleTags, "readonly") || slices.Contains(bundleTags, "internal") { + continue + } + + name := strings.Split(field.Tag.Get("json"), ",")[0] + if name == "" || name == "-" || !field.IsExported() || seen[name] { + continue + } + seen[name] = true + names = append(names, name) + } + return names +} + +// resolveEdgeType maps a property's $ref to the type path of its annotatable +// element type, unwrapping the slice/ and map/ levels that the schema's type +// paths insert for repeated and keyed fields. +func resolveEdgeType(prop *jsonschema.Schema) string { + if prop.Reference == nil { + return "" + } + ref := strings.TrimPrefix(*prop.Reference, "#/$defs/") + for { + switch { + case strings.HasPrefix(ref, "slice/"): + ref = strings.TrimPrefix(ref, "slice/") + case strings.HasPrefix(ref, "map/"): + ref = strings.TrimPrefix(ref, "map/") + case strings.HasPrefix(ref, "github.com"): + return ref + default: + return "" + } + } +} diff --git a/bundle/internal/schema/typegraph_test.go b/bundle/internal/schema/typegraph_test.go new file mode 100644 index 00000000000..a5bf186c7eb --- /dev/null +++ b/bundle/internal/schema/typegraph_test.go @@ -0,0 +1,76 @@ +package main + +import ( + "reflect" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +type tgRoot struct { + First tgNested `json:"first"` + ByName map[string]tgNested `json:"by_name,omitempty"` + Items []tgItem `json:"items,omitempty"` + Plain string `json:"plain,omitempty"` + Mode tgMode `json:"mode,omitempty"` + Skip string `json:"-"` + Hidden string `json:"hidden,omitempty" bundle:"internal"` +} + +type tgNested struct { + Description string `json:"description,omitempty"` + Fields string `json:"fields,omitempty"` + Again *tgNested `json:"again,omitempty"` +} + +type tgItem struct { + tgEmbedded + Name string `json:"name,omitempty"` +} + +type tgEmbedded struct { + Inner tgNested `json:"inner,omitempty"` +} + +type tgMode string + +func TestTypeGraph(t *testing.T) { + g, err := newTypeGraph(reflect.TypeFor[tgRoot]()) + require.NoError(t, err) + + rootKey := getPath(reflect.TypeFor[tgRoot]()) + nestedKey := getPath(reflect.TypeFor[tgNested]()) + itemKey := getPath(reflect.TypeFor[tgItem]()) + modeKey := getPath(reflect.TypeFor[tgMode]()) + + assert.Equal(t, rootKey, g.root) + + // Properties are in struct declaration order; map and slice fields resolve + // to their element type; fields skipped by the schema generator are absent. + assert.Equal(t, []fieldEdge{ + {name: "first", typ: nestedKey}, + {name: "by_name", typ: nestedKey}, + {name: "items", typ: itemKey}, + {name: "plain", typ: ""}, + {name: "mode", typ: modeKey}, + }, g.fields[rootKey]) + + // Top-level fields precede embedded ones, matching the schema generator. + assert.Equal(t, []fieldEdge{ + {name: "name", typ: ""}, + {name: "inner", typ: nestedKey}, + }, g.fields[itemKey]) + + // Cyclic self-reference resolves to the type itself. + assert.Equal(t, []fieldEdge{ + {name: "description", typ: ""}, + {name: "fields", typ: ""}, + {name: "again", typ: nestedKey}, + }, g.fields[nestedKey]) + + // Named string types (enums) are annotatable types without properties. + edges, ok := g.fields[modeKey] + assert.True(t, ok) + assert.Empty(t, edges) +} From 333418421d937e768db262c3ccef7cfcf4aee542 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Fri, 12 Jun 2026 21:55:48 +0200 Subject: [PATCH 2/8] Spell type-level annotation docs as a "type" block Replace the "_" entry inside "fields" with an explicit "type" key on the node, sibling to "fields". For map and sequence fields it documents each entry; for scalar fields it documents the value's type (enum values live here). Purely a file-format spelling change; the in-memory representation and the generated schema are unchanged. Co-authored-by: Isaac --- bundle/internal/schema/annotations.yml | 524 +++++++++--------- bundle/internal/schema/annotations_file.go | 72 ++- .../internal/schema/annotations_file_test.go | 31 +- 3 files changed, 322 insertions(+), 305 deletions(-) diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 0187b406beb..748bfb9c36d 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -6,11 +6,12 @@ # # The structure mirrors the bundle configuration tree: # - A node documents one field: its inline keys (description, -# markdown_description, ...) apply to the field itself, and "fields" holds -# the nodes of the type the field resolves to (map and sequence levels are -# unwrapped implicitly). -# - "_" inside "fields" documents the resolved type itself; for enum types -# it carries the enum values. +# markdown_description, ...) apply to the field itself. +# - "type" documents the type the field's value resolves to — for map and +# sequence fields, each entry. These docs are shared by every occurrence +# of the type; enum values also live here. +# - "fields" holds the nodes of that type's fields (map and sequence levels +# are unwrapped implicitly). # - Each type is expanded exactly once, at its first occurrence; fields of # types that occur again later (for example everything under "targets") # are documented at that first occurrence. @@ -100,13 +101,12 @@ bundle: "engine": "description": |- The deployment engine to use. Valid values are `terraform` and `direct`. Takes priority over `DATABRICKS_BUNDLE_ENGINE` environment variable. Default is "terraform". - "fields": - "_": - "enum": - - |- - terraform - - |- - direct + "type": + "enum": + - |- + terraform + - |- + direct "git": "description": |- The Git version control details that are associated with your bundle. @@ -654,36 +654,36 @@ resources: The cluster definitions for the bundle, where each key is the name of a cluster. "markdown_description": |- The cluster definitions for the bundle, where each key is the name of a cluster. See [\_](/dev-tools/bundles/resources.md#clusters). - "fields": - "_": - "markdown_description": |- - The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). - "markdown_examples": |- - The following example creates a cluster named `my_cluster` and sets that as the cluster to use to run the notebook in `my_job`: + "type": + "markdown_description": |- + The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). + "markdown_examples": |- + 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 + ```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" + 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" - ``` + jobs: + my_job: + tasks: + - task_key: test_task + notebook_task: + notebook_path: "./src/my_notebook.py" + ``` + "fields": "data_security_mode": "description": |- PLACEHOLDER @@ -730,24 +730,24 @@ resources: The dashboard definitions for the bundle, where each key is the name of the dashboard. "markdown_description": |- The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example includes and deploys the sample __NYC Taxi Trip Analysis__ dashboard to the Databricks workspace. + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + 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). + ``` 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). + 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). + "fields": "create_time": "description": |- The timestamp of when the dashboard was created. @@ -852,23 +852,23 @@ resources: The experiment definitions for the bundle, where each key is the name of the experiment. "markdown_description": |- The experiment definitions for the bundle, where each key is the name of the experiment. See [\_](/dev-tools/bundles/resources.md#experiments). - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines an experiment that all users can view: + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 - ``` + ```yaml + resources: + experiments: + experiment: + name: my_ml_experiment + permissions: + - level: CAN_READ + group_name: users + description: MLflow experiment used to track runs + ``` + "fields": "lifecycle": "description": |- 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. @@ -959,15 +959,14 @@ resources: "algorithm": "description": |- PLACEHOLDER - "fields": - "_": - "description": |- - SSE algorithm to use for encrypting S3 objects - "enum": - - |- - AWS_SSE_KMS - - |- - AWS_SSE_S3 + "type": + "description": |- + SSE algorithm to use for encrypting S3 objects + "enum": + - |- + AWS_SSE_KMS + - |- + AWS_SSE_S3 "aws_kms_key_arn": "description": |- PLACEHOLDER @@ -1031,25 +1030,25 @@ resources: The job definitions for the bundle, where each key is the name of the job. "markdown_description": |- The job definitions for the bundle, where each key is the name of the job. See [\_](/dev-tools/bundles/resources.md#jobs). - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a job with the resource key `hello-job` with one notebook task: + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + The following example defines a job with the resource key `hello-job` with one notebook task: - ```yaml - resources: - jobs: - hello-job: - name: hello-job - tasks: - - task_key: hello-task - notebook_task: - notebook_path: ./hello.py - ``` + ```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). + 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). + "fields": "environments": "fields": "spec": @@ -1247,32 +1246,32 @@ resources: The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. "markdown_description": |- 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). - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a Unity Catalog model serving endpoint: + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + 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" - ``` + ```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" + ``` + "fields": "config": "fields": "served_entities": @@ -1322,10 +1321,10 @@ resources: The model definitions for the bundle, where each key is the name of the model. "markdown_description": |- The model definitions for the bundle, where each key is the name of the model. See [\_](/dev-tools/bundles/resources.md#models). + "type": + "markdown_description": |- + 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. "fields": - "_": - "markdown_description": |- - 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. "lifecycle": "description": |- 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. @@ -1350,30 +1349,30 @@ resources: The pipeline definitions for the bundle, where each key is the name of the pipeline. "markdown_description": |- The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a pipeline with the resource key `hello-pipeline`: + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 - ``` + ```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 + ``` + "fields": "dry_run": "description": |- PLACEHOLDER @@ -1663,31 +1662,31 @@ resources: The quality monitor definitions for the bundle, where each key is the name of the quality monitor. "markdown_description": |- 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). - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a quality monitor: + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 - ``` + ```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 + ``` + "fields": "inference_log": "description": |- PLACEHOLDER @@ -1711,26 +1710,26 @@ resources: The registered model definitions for the bundle, where each key is the name of the Unity Catalog registered model. "markdown_description": |- 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) - "fields": - "_": - "markdown_description": |- - 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). - "markdown_examples": |- - The following example defines a registered model in Unity Catalog: + "type": + "markdown_description": |- + 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). + "markdown_examples": |- + 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 - ``` + ```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 + ``` + "fields": "aliases": "description": |- PLACEHOLDER @@ -1782,53 +1781,53 @@ resources: The schema definitions for the bundle, where each key is the name of the schema. "markdown_description": |- The schema definitions for the bundle, where each key is the name of the schema. See [\_](/dev-tools/bundles/resources.md#schemas). - "fields": - "_": - "markdown_description": |- - 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: + "type": + "markdown_description": |- + 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). - "markdown_examples": |- - The following example defines a pipeline with the resource key `my_pipeline` that creates a Unity Catalog schema with the key `my_schema` as the target: + - 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). + "markdown_examples": |- + The following example defines a pipeline with the resource key `my_pipeline` that creates a Unity Catalog schema with the key `my_schema` as the target: - ```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} + ```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. - ``` + 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). + 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: + 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 - ``` + ```yaml + resources: + schemas: + my_schema: + name: test-schema + grants: + - principal: users + privileges: + - CAN_MANAGE + - principal: my_team + privileges: + - CAN_READ + catalog_name: main + ``` + "fields": "grants": "description": |- PLACEHOLDER @@ -1866,15 +1865,14 @@ resources: "level": "description": |- The allowed permission for user, group, service principal defined for this permission. - "fields": - "_": - "enum": - - |- - READ - - |- - WRITE - - |- - MANAGE + "type": + "enum": + - |- + READ + - |- + WRITE + - |- + MANAGE "service_principal_name": "description": |- The application ID of an active service principal. This field translates to a `principal` field in secret scope ACL. @@ -2081,27 +2079,27 @@ resources: The volume definitions for the bundle, where each key is the name of the volume. "markdown_description": |- The volume definitions for the bundle, where each key is the name of the volume. See [\_](/dev-tools/bundles/resources.md#volumes). - "fields": - "_": - "markdown_description": |- - 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: + "type": + "markdown_description": |- + 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. + - 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). - "markdown_examples": |- - The following example creates a Unity Catalog volume with the key `my_volume`: + - 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). + "markdown_examples": |- + 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 - ``` + ```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). + 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). + "fields": "grants": "description": |- PLACEHOLDER @@ -2230,12 +2228,12 @@ targets: variables: "description": |- A Map that defines the custom variables for the bundle, where each key is the name of the variable, and the value is a Map that defines the variable. + "type": + "description": |- + Defines a custom variable for the bundle. + "markdown_description": |- + Defines a custom variable for the bundle. See [\_](/dev-tools/bundles/settings.md#variables). "fields": - "_": - "description": |- - Defines a custom variable for the bundle. - "markdown_description": |- - Defines a custom variable for the bundle. See [\_](/dev-tools/bundles/settings.md#variables). "default": "description": |- The default value for the variable. diff --git a/bundle/internal/schema/annotations_file.go b/bundle/internal/schema/annotations_file.go index b17e778705b..90f01b0cd9c 100644 --- a/bundle/internal/schema/annotations_file.go +++ b/bundle/internal/schema/annotations_file.go @@ -22,6 +22,13 @@ import ( // be named "fields" simply appear inside it like any other field. const fieldsKey = "fields" +// typeDocKey holds the documentation for the type a field's value resolves to +// (for map and sequence fields: each entry). It is applied to the type's +// shared $defs entry, so it shows up at every occurrence of the type; this is +// also where enum values live. Config fields named "type" do not clash: they +// appear inside "fields" like any other field. +const typeDocKey = "type" + const annotationsFileHeader = `# This file contains the documentation the CLI owns for the bundle # configuration JSON schema: docs for fields that do not exist in the upstream # API spec (.codegen/cli.json), and overrides of upstream docs. Documentation @@ -30,11 +37,12 @@ const annotationsFileHeader = `# This file contains the documentation the CLI ow # # The structure mirrors the bundle configuration tree: # - A node documents one field: its inline keys (description, -# markdown_description, ...) apply to the field itself, and "fields" holds -# the nodes of the type the field resolves to (map and sequence levels are -# unwrapped implicitly). -# - "_" inside "fields" documents the resolved type itself; for enum types -# it carries the enum values. +# markdown_description, ...) apply to the field itself. +# - "type" documents the type the field's value resolves to — for map and +# sequence fields, each entry. These docs are shared by every occurrence +# of the type; enum values also live here. +# - "fields" holds the nodes of that type's fields (map and sequence levels +# are unwrapped implicitly). # - Each type is expanded exactly once, at its first occurrence; fields of # types that occur again later (for example everything under "targets") # are documented at that first occurrence. @@ -83,7 +91,7 @@ type fileLoader struct { unknown []string } -// block loads one type's block: "_" plus field nodes. +// block loads one type's block of field nodes. func (l *fileLoader) block(v dyn.Value, typeKey, where string) error { if v.Kind() == dyn.KindNil { return nil @@ -100,13 +108,10 @@ func (l *fileLoader) block(v dyn.Value, typeKey, where string) error { child = key } - edge := fieldEdge{name: key} - if key != RootTypeKey { - edge, ok = l.graph.edge(typeKey, key) - if !ok { - l.unknown = append(l.unknown, child) - continue - } + edge, ok := l.graph.edge(typeKey, key) + if !ok { + l.unknown = append(l.unknown, child) + continue } err := l.node(pair.Value, typeKey, edge, child) if err != nil { @@ -116,8 +121,8 @@ func (l *fileLoader) block(v dyn.Value, typeKey, where string) error { return nil } -// node loads one field's node: inline descriptor keys plus an optional -// "fields" block for the type the field resolves to. +// node loads one field's node: inline descriptor keys, plus the optional +// "type" docs and "fields" block for the type the field resolves to. func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where string) error { if v.Kind() == dyn.KindNil { return nil @@ -136,6 +141,14 @@ func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where str if err != nil { return err } + case key == typeDocKey && edge.typ != "": + // Type docs are stored under the type's RootTypeKey entry. The + // synthetic edge has no element type, so nested "type" or + // "fields" keys inside the docs are flagged as unknown. + err := l.node(pair.Value, edge.typ, fieldEdge{name: RootTypeKey}, where+"."+typeDocKey) + if err != nil { + return err + } case descriptorKeys[key]: desc.SetLoc(key, nil, pair.Value) default: @@ -221,23 +234,12 @@ func (s *fileSaver) assignCanonical(typeKey string) { } } -// block renders one type's block: "_" first, then field nodes alphabetically. +// block renders one type's block of field nodes, emitted alphabetically. // Lines in the value locations encode the output order for the YAML saver. func (s *fileSaver) block(typeKey string) (map[string]dyn.Value, error) { out := map[string]dyn.Value{} line := 0 - if d, ok := s.take(typeKey, RootTypeKey); ok { - v, err := descriptorValue(d, line) - if err != nil { - return nil, err - } - if v.Kind() != dyn.KindNil { - out[RootTypeKey] = v - line++ - } - } - edges := slices.Clone(s.graph.fields[typeKey]) slices.SortFunc(edges, func(a, b fieldEdge) int { return strings.Compare(a.name, b.name) @@ -277,20 +279,30 @@ func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, } if s.expandAt[edgeKey{typeKey, edge.name}] { + // High line numbers sort the type docs and the fields block after + // the inline descriptor keys. + if d, ok := s.take(edge.typ, RootTypeKey); ok { + v, err := descriptorValue(d, 9999) + if err != nil { + return nil, err + } + if v.Kind() != dyn.KindNil { + out[typeDocKey] = v + } + } child, err := s.block(edge.typ) if err != nil { return nil, err } if len(child) > 0 { - // A high line number sorts the block after the descriptor keys. out[fieldsKey] = dyn.NewValue(child, []dyn.Location{{Line: 10000}}) } } return out, nil } -// descriptorValue converts a descriptor for a "_" entry, ordering its keys -// like the inline descriptors and placing it at the given line in its block. +// descriptorValue converts a type docs descriptor, ordering its keys like the +// inline descriptors and placing it at the given line in its node. func descriptorValue(d annotation.Descriptor, line int) (dyn.Value, error) { v, err := convert.FromTyped(d, dyn.NilValue) if err != nil || v.Kind() == dyn.KindNil { diff --git a/bundle/internal/schema/annotations_file_test.go b/bundle/internal/schema/annotations_file_test.go index 528ae2492c0..d26bf331b28 100644 --- a/bundle/internal/schema/annotations_file_test.go +++ b/bundle/internal/schema/annotations_file_test.go @@ -43,8 +43,8 @@ func TestAnnotationsFileRoundTrip(t *testing.T) { // Keys are emitted alphabetically; tgNested expands under `first` (its // canonical position in declaration order), so `by_name`, which resolves - // to the same type, carries no `fields` block. `plain` has no content and - // is omitted entirely. + // to the same type, carries no `type` or `fields` keys. `plain` has no + // content and is omitted entirely. expected := annotationsFileHeader + `by_name: "description": |- Map field. @@ -53,10 +53,10 @@ func TestAnnotationsFileRoundTrip(t *testing.T) { first: "description": |- First field. + "type": + "description": |- + A nested type. "fields": - "_": - "description": |- - A nested type. "again": "description": |- Recursive field. @@ -69,13 +69,12 @@ items: "description": |- Inner docs. mode: - "fields": - "_": - "enum": - - |- - a - - |- - b + "type": + "enum": + - |- + a + - |- + b ` assert.Equal(t, expected, string(b)) @@ -104,6 +103,9 @@ func TestAnnotationsFileUnknownEntries(t *testing.T) { bogus_key: |- Not a descriptor key. fields: + "_": + description: |- + The old type docs spelling is not a field. no_such_field: description: |- Field does not exist. @@ -112,6 +114,9 @@ plain: nested: description: |- Primitive fields have no nested fields. + type: + description: |- + Primitive fields have no type docs. `), 0o644) require.NoError(t, err) @@ -119,8 +124,10 @@ plain: require.NoError(t, err) assert.Equal(t, []string{ "first.bogus_key", + "first.fields._", "first.fields.no_such_field", "plain.fields", + "plain.type", }, unknown) // The valid entry is still loaded. From df475bd65d02c0f68fd1139e4bc3c8f721d291d6 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 13 Jun 2026 08:31:57 +0200 Subject: [PATCH 3/8] Deduplicate descriptor serialization in the annotations saver Fold the near-identical inline-descriptor and type-docs serialization paths into one descriptorToMap helper and hoist the shared key order to a package var. Document RootTypeKey as the in-memory sentinel. No change to the generated annotations file or schema. Co-authored-by: Isaac --- bundle/internal/schema/annotations_file.go | 48 +++++++++------------- bundle/internal/schema/parser.go | 5 +++ 2 files changed, 25 insertions(+), 28 deletions(-) diff --git a/bundle/internal/schema/annotations_file.go b/bundle/internal/schema/annotations_file.go index 90f01b0cd9c..9bd53c58866 100644 --- a/bundle/internal/schema/annotations_file.go +++ b/bundle/internal/schema/annotations_file.go @@ -63,6 +63,21 @@ var descriptorKeys = func() map[string]bool { return keys }() +// descriptorKeyOrder is the leading key order for a serialized descriptor, +// matching the formatting of the previous annotation files. Remaining keys +// follow alphabetically. +var descriptorKeyOrder = []string{"description", "markdown_description", "title", "default", "enum"} + +// descriptorToMap serializes d into dst with its keys ordered. It returns the +// nil value (writing nothing) when d carries no content. +func descriptorToMap(d annotation.Descriptor, dst map[string]dyn.Value) (dyn.Value, error) { + v, err := convert.FromTyped(d, dyn.NilValue) + if err != nil || v.Kind() == dyn.KindNil { + return dyn.NilValue, err + } + return yamlsaver.ConvertToMapValue(d, yamlsaver.NewOrder(descriptorKeyOrder), []string{}, dst) +} + // loadAnnotationsFile reads the tree-format annotations file and flattens it // into per-type annotations. Tree positions that do not resolve to a type or // field in the config (stale entries, typos) are returned in unknown; they @@ -262,32 +277,24 @@ func (s *fileSaver) block(typeKey string) (map[string]dyn.Value, error) { func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, error) { out := map[string]dyn.Value{} + // The inline descriptor keys are written directly into the node, sharing + // it with the "type" and "fields" keys added below. if d, ok := s.take(typeKey, edge.name); ok { - v, err := convert.FromTyped(d, dyn.NilValue) - if err != nil { + if _, err := descriptorToMap(d, out); err != nil { return nil, err } - if v.Kind() != dyn.KindNil { - // Order the descriptor keys with description first, like the - // previous annotation files. - order := yamlsaver.NewOrder([]string{"description", "markdown_description", "title", "default", "enum"}) - _, err = yamlsaver.ConvertToMapValue(d, order, []string{}, out) - if err != nil { - return nil, err - } - } } if s.expandAt[edgeKey{typeKey, edge.name}] { // High line numbers sort the type docs and the fields block after // the inline descriptor keys. if d, ok := s.take(edge.typ, RootTypeKey); ok { - v, err := descriptorValue(d, 9999) + v, err := descriptorToMap(d, map[string]dyn.Value{}) if err != nil { return nil, err } if v.Kind() != dyn.KindNil { - out[typeDocKey] = v + out[typeDocKey] = v.WithLocations([]dyn.Location{{Line: 9999}}) } } child, err := s.block(edge.typ) @@ -301,21 +308,6 @@ func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, return out, nil } -// descriptorValue converts a type docs descriptor, ordering its keys like the -// inline descriptors and placing it at the given line in its node. -func descriptorValue(d annotation.Descriptor, line int) (dyn.Value, error) { - v, err := convert.FromTyped(d, dyn.NilValue) - if err != nil || v.Kind() == dyn.KindNil { - return dyn.NilValue, err - } - order := yamlsaver.NewOrder([]string{"description", "markdown_description", "title", "default", "enum"}) - v, err = yamlsaver.ConvertToMapValue(d, order, []string{}, map[string]dyn.Value{}) - if err != nil { - return dyn.NilValue, err - } - return v.WithLocations([]dyn.Location{{Line: line}}), nil -} - // take returns the descriptor for the given type and field and marks it // consumed for the detached-entry report. func (s *fileSaver) take(typeKey, name string) (annotation.Descriptor, bool) { diff --git a/bundle/internal/schema/parser.go b/bundle/internal/schema/parser.go index bf56ea98bd8..266335e6401 100644 --- a/bundle/internal/schema/parser.go +++ b/bundle/internal/schema/parser.go @@ -16,6 +16,11 @@ type annotationParser struct { ref map[string]*clijson.SchemaJSON } +// RootTypeKey is the key under which a type's own descriptor is stored in an +// annotation.File, alongside its fields' descriptors. "_" is used because it +// cannot collide with a real field name (config has fields named "type", +// "fields", "description"). In the annotations file these docs are spelled +// "type"; this is only the in-memory key. const RootTypeKey = "_" // deprecationMessage is the message emitted for any field or type that the spec From aca404d702253affe06742797b7b2bd3faaaf56b Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 13 Jun 2026 08:40:36 +0200 Subject: [PATCH 4/8] Replace the "_" sentinel with an explicit TypeAnnotation struct The in-memory annotations keyed each type's docs by field name plus a magic "_" entry for the type itself, forcing "_" to dodge real field names (config has fields named type, fields, description). Model it instead as TypeAnnotation{Self, Fields}: Self is the type's own docs (applied to its $defs entry; also where enum values live), Fields is the per-field docs. The "_" sentinel and RootTypeKey are gone. No change to the generated annotations file or schema. Co-authored-by: Isaac --- bundle/internal/annotation/file.go | 39 ++++-- bundle/internal/schema/annotations.go | 21 +-- bundle/internal/schema/annotations_file.go | 130 ++++++++++++------ .../internal/schema/annotations_file_test.go | 32 +++-- bundle/internal/schema/parser.go | 17 +-- 5 files changed, 147 insertions(+), 92 deletions(-) diff --git a/bundle/internal/annotation/file.go b/bundle/internal/annotation/file.go index 6f2b294cc15..cd5474b4ae5 100644 --- a/bundle/internal/annotation/file.go +++ b/bundle/internal/annotation/file.go @@ -1,11 +1,32 @@ package annotation -// File is the in-memory representation of the annotations, keyed by Go type -// path and field name, e.g.: -// github.com/databricks/cli/bundle/config.Bundle: -// -// cluster_id: -// description: "Description" -// -// The key "_" holds the annotation for the type itself. -type File map[string]map[string]Descriptor +// TypeAnnotation holds the documentation for one Go type. Self documents the +// type itself — it is applied to the type's JSON-schema $defs entry and is +// where enum values live — and Fields documents each of the type's fields by +// JSON name. +type TypeAnnotation struct { + Self Descriptor `json:"type,omitempty"` + Fields map[string]Descriptor `json:"fields,omitempty"` +} + +// File is the in-memory annotations, keyed by Go type path, e.g. +// "github.com/databricks/cli/bundle/config.Bundle". +type File map[string]TypeAnnotation + +// SetField stores a descriptor for a field of typeKey, allocating the entry +// and its field map as needed. +func (f File) SetField(typeKey, name string, d Descriptor) { + ta := f[typeKey] + if ta.Fields == nil { + ta.Fields = map[string]Descriptor{} + } + ta.Fields[name] = d + f[typeKey] = ta +} + +// SetSelf stores the descriptor for the type itself. +func (f File) SetSelf(typeKey string, d Descriptor) { + ta := f[typeKey] + ta.Self = d + f[typeKey] = ta +} diff --git a/bundle/internal/schema/annotations.go b/bundle/internal/schema/annotations.go index b68260f7ee4..c61cb0f6fce 100644 --- a/bundle/internal/schema/annotations.go +++ b/bundle/internal/schema/annotations.go @@ -68,27 +68,14 @@ func (d *annotationHandler) addAnnotations(typ reflect.Type, s jsonschema.Schema return s } - annotations := d.parsedAnnotations[refPath] - if annotations == nil { - annotations = map[string]annotation.Descriptor{} - } - - rootTypeAnnotation, ok := annotations[RootTypeKey] - if ok { - assignAnnotation(&s, rootTypeAnnotation) - } + ta := d.parsedAnnotations[refPath] + assignAnnotation(&s, ta.Self) for k, v := range s.Properties { - item := annotations[k] + item := ta.Fields[k] if item.Description == "" { item.Description = annotation.Placeholder - - emptyAnnotations := d.missingAnnotations[refPath] - if emptyAnnotations == nil { - emptyAnnotations = map[string]annotation.Descriptor{} - d.missingAnnotations[refPath] = emptyAnnotations - } - emptyAnnotations[k] = annotation.Descriptor{Description: annotation.Placeholder} + d.missingAnnotations.SetField(refPath, k, annotation.Descriptor{Description: annotation.Placeholder}) } assignAnnotation(v, item) } diff --git a/bundle/internal/schema/annotations_file.go b/bundle/internal/schema/annotations_file.go index 9bd53c58866..2b7407a6a9f 100644 --- a/bundle/internal/schema/annotations_file.go +++ b/bundle/internal/schema/annotations_file.go @@ -78,6 +78,12 @@ func descriptorToMap(d annotation.Descriptor, dst map[string]dyn.Value) (dyn.Val return yamlsaver.ConvertToMapValue(d, yamlsaver.NewOrder(descriptorKeyOrder), []string{}, dst) } +// descriptorEmpty reports whether d carries no documentation. +func descriptorEmpty(d annotation.Descriptor) bool { + v, err := convert.FromTyped(d, dyn.NilValue) + return err == nil && v.Kind() == dyn.KindNil +} + // loadAnnotationsFile reads the tree-format annotations file and flattens it // into per-type annotations. Tree positions that do not resolve to a type or // field in the config (stale entries, typos) are returned in unknown; they @@ -136,8 +142,9 @@ func (l *fileLoader) block(v dyn.Value, typeKey, where string) error { return nil } -// node loads one field's node: inline descriptor keys, plus the optional -// "type" docs and "fields" block for the type the field resolves to. +// node loads one field's node: the inline descriptor for the field, the +// "type" docs for the type it resolves to, and the "fields" block of that +// type's fields. func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where string) error { if v.Kind() == dyn.KindNil { return nil @@ -157,13 +164,13 @@ func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where str return err } case key == typeDocKey && edge.typ != "": - // Type docs are stored under the type's RootTypeKey entry. The - // synthetic edge has no element type, so nested "type" or - // "fields" keys inside the docs are flagged as unknown. - err := l.node(pair.Value, edge.typ, fieldEdge{name: RootTypeKey}, where+"."+typeDocKey) + d, ok, err := l.descriptor(pair.Value, where+"."+typeDocKey) if err != nil { return err } + if ok { + l.data.SetSelf(edge.typ, d) + } case descriptorKeys[key]: desc.SetLoc(key, nil, pair.Value) default: @@ -171,19 +178,48 @@ func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where str } } + if desc.Len() > 0 { + d, err := toDescriptor(desc, where) + if err != nil { + return err + } + l.data.SetField(typeKey, edge.name, d) + } + return nil +} + +// descriptor parses a mapping of descriptor keys (the value of a "type" key). +// Non-descriptor keys are flagged as unknown. The second return is false when +// the mapping carries no descriptor keys. +func (l *fileLoader) descriptor(v dyn.Value, where string) (annotation.Descriptor, bool, error) { + m, ok := v.AsMap() + if !ok { + return annotation.Descriptor{}, false, fmt.Errorf("%s: expected a mapping, got %s", where, v.Kind()) + } + desc := dyn.NewMapping() + for _, pair := range m.Pairs() { + key := pair.Key.MustString() + if descriptorKeys[key] { + desc.SetLoc(key, nil, pair.Value) + } else { + l.unknown = append(l.unknown, where+"."+key) + } + } if desc.Len() == 0 { - return nil + return annotation.Descriptor{}, false, nil } + d, err := toDescriptor(desc, where) + return d, err == nil, err +} + +// toDescriptor converts a mapping of descriptor keys to a typed descriptor. +func toDescriptor(desc dyn.Mapping, where string) (annotation.Descriptor, error) { var d annotation.Descriptor err := convert.ToTyped(&d, dyn.V(desc)) if err != nil { - return fmt.Errorf("%s: %w", where, err) + return annotation.Descriptor{}, fmt.Errorf("%s: %w", where, err) } - if l.data[typeKey] == nil { - l.data[typeKey] = map[string]annotation.Descriptor{} - } - l.data[typeKey][edge.name] = d - return nil + return d, nil } // saveAnnotationsFile writes data to path in the canonical tree layout: a @@ -193,11 +229,12 @@ func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where str // exist) are returned as detached and are not written. func saveAnnotationsFile(path string, data annotation.File, g *typeGraph) ([]string, error) { s := &fileSaver{ - graph: g, - data: data, - visited: map[string]bool{g.root: true}, - expandAt: map[edgeKey]bool{}, - consumed: map[edgeKey]bool{}, + graph: g, + data: data, + visited: map[string]bool{g.root: true}, + expandAt: map[edgeKey]bool{}, + consumed: map[edgeKey]bool{}, + selfConsumed: map[string]bool{}, } s.assignCanonical(g.root) @@ -229,11 +266,12 @@ type edgeKey struct { } type fileSaver struct { - graph *typeGraph - data annotation.File - visited map[string]bool - expandAt map[edgeKey]bool - consumed map[edgeKey]bool + graph *typeGraph + data annotation.File + visited map[string]bool + expandAt map[edgeKey]bool + consumed map[edgeKey]bool + selfConsumed map[string]bool } // assignCanonical walks the type graph depth-first in struct declaration @@ -272,31 +310,33 @@ func (s *fileSaver) block(typeKey string) (map[string]dyn.Value, error) { return out, nil } -// node renders one field's node: the inline descriptor plus, at the field's -// canonical position, the "fields" block of the type it resolves to. +// node renders one field's node: the inline field descriptor plus, at the +// field's canonical position, the resolved type's "type" docs and the +// "fields" block of its fields. func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, error) { out := map[string]dyn.Value{} // The inline descriptor keys are written directly into the node, sharing // it with the "type" and "fields" keys added below. - if d, ok := s.take(typeKey, edge.name); ok { + if d, ok := s.takeField(typeKey, edge.name); ok { if _, err := descriptorToMap(d, out); err != nil { return nil, err } } if s.expandAt[edgeKey{typeKey, edge.name}] { - // High line numbers sort the type docs and the fields block after - // the inline descriptor keys. - if d, ok := s.take(edge.typ, RootTypeKey); ok { - v, err := descriptorToMap(d, map[string]dyn.Value{}) - if err != nil { - return nil, err - } - if v.Kind() != dyn.KindNil { - out[typeDocKey] = v.WithLocations([]dyn.Location{{Line: 9999}}) - } + // Expanding a type accounts for its self docs, whether or not it has + // any. High line numbers sort the type docs and the fields block + // after the inline descriptor keys. + s.selfConsumed[edge.typ] = true + v, err := descriptorToMap(s.data[edge.typ].Self, map[string]dyn.Value{}) + if err != nil { + return nil, err + } + if v.Kind() != dyn.KindNil { + out[typeDocKey] = v.WithLocations([]dyn.Location{{Line: 9999}}) } + child, err := s.block(edge.typ) if err != nil { return nil, err @@ -308,21 +348,25 @@ func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, return out, nil } -// take returns the descriptor for the given type and field and marks it -// consumed for the detached-entry report. -func (s *fileSaver) take(typeKey, name string) (annotation.Descriptor, bool) { - d, ok := s.data[typeKey][name] +// takeField returns the descriptor for a field and marks it consumed for the +// detached-entry report. +func (s *fileSaver) takeField(typeKey, name string) (annotation.Descriptor, bool) { + d, ok := s.data[typeKey].Fields[name] if ok { s.consumed[edgeKey{typeKey, name}] = true } return d, ok } -// detached returns the data entries no tree position consumed, sorted. +// detached returns the data entries no tree position consumed, sorted. These +// are fields or types that no longer exist in the config. func (s *fileSaver) detached() []string { var out []string - for typeKey, fields := range s.data { - for name := range fields { + for typeKey, ta := range s.data { + if !s.selfConsumed[typeKey] && !descriptorEmpty(ta.Self) { + out = append(out, typeKey+": (type)") + } + for name := range ta.Fields { if !s.consumed[edgeKey{typeKey, name}] { out = append(out, typeKey+": "+name) } diff --git a/bundle/internal/schema/annotations_file_test.go b/bundle/internal/schema/annotations_file_test.go index d26bf331b28..d4dbb80e817 100644 --- a/bundle/internal/schema/annotations_file_test.go +++ b/bundle/internal/schema/annotations_file_test.go @@ -17,19 +17,25 @@ func TestAnnotationsFileRoundTrip(t *testing.T) { data := annotation.File{ getPath(reflect.TypeFor[tgRoot]()): { - "first": {Description: "First field."}, - "by_name": {Description: "Map field.", MarkdownDescription: "Map field. See [_](/foo.md)."}, + Fields: map[string]annotation.Descriptor{ + "first": {Description: "First field."}, + "by_name": {Description: "Map field.", MarkdownDescription: "Map field. See [_](/foo.md)."}, + }, }, getPath(reflect.TypeFor[tgNested]()): { - "_": {Description: "A nested type."}, - "description": {Description: annotation.Placeholder}, - "again": {Description: "Recursive field."}, + Self: annotation.Descriptor{Description: "A nested type."}, + Fields: map[string]annotation.Descriptor{ + "description": {Description: annotation.Placeholder}, + "again": {Description: "Recursive field."}, + }, }, getPath(reflect.TypeFor[tgMode]()): { - "_": {Enum: []any{"a", "b"}}, + Self: annotation.Descriptor{Enum: []any{"a", "b"}}, }, getPath(reflect.TypeFor[tgItem]()): { - "inner": {Description: "Inner docs."}, + Fields: map[string]annotation.Descriptor{ + "inner": {Description: "Inner docs."}, + }, }, } @@ -131,7 +137,7 @@ plain: }, unknown) // The valid entry is still loaded. - assert.Equal(t, "Valid entry.", data[getPath(reflect.TypeFor[tgRoot]())]["first"].Description) + assert.Equal(t, "Valid entry.", data[getPath(reflect.TypeFor[tgRoot]())].Fields["first"].Description) } func TestAnnotationsFileDetachedEntries(t *testing.T) { @@ -140,10 +146,15 @@ func TestAnnotationsFileDetachedEntries(t *testing.T) { data := annotation.File{ getPath(reflect.TypeFor[tgRoot]()): { - "no_such_field": {Description: "Stale."}, + Fields: map[string]annotation.Descriptor{ + "no_such_field": {Description: "Stale."}, + }, }, "github.com/databricks/cli/no/such.Type": { - "field": {Description: "Stale."}, + Self: annotation.Descriptor{Description: "Stale type."}, + Fields: map[string]annotation.Descriptor{ + "field": {Description: "Stale."}, + }, }, } @@ -152,6 +163,7 @@ func TestAnnotationsFileDetachedEntries(t *testing.T) { require.NoError(t, err) assert.Equal(t, []string{ "github.com/databricks/cli/bundle/internal/schema.tgRoot: no_such_field", + "github.com/databricks/cli/no/such.Type: (type)", "github.com/databricks/cli/no/such.Type: field", }, detached) } diff --git a/bundle/internal/schema/parser.go b/bundle/internal/schema/parser.go index 266335e6401..742fb76ae1e 100644 --- a/bundle/internal/schema/parser.go +++ b/bundle/internal/schema/parser.go @@ -16,13 +16,6 @@ type annotationParser struct { ref map[string]*clijson.SchemaJSON } -// RootTypeKey is the key under which a type's own descriptor is stored in an -// annotation.File, alongside its fields' descriptors. "_" is used because it -// cannot collide with a real field name (config has fields named "type", -// "fields", "description"). In the annotations file these docs are spelled -// "type"; this is only the in-memory key. -const RootTypeKey = "_" - // deprecationMessage is the message emitted for any field or type that the spec // marks as deprecated. The spec (.codegen/cli.json) carries only a deprecated // flag, not a message, so we synthesize a fixed one here. @@ -133,15 +126,13 @@ func (p *annotationParser) extractAnnotations(typ reflect.Type) (annotation.File } basePath := getPath(typ) - pkg := map[string]annotation.Descriptor{} - annotations[basePath] = pkg // The contract carries no schema-level launch stage, so a type is // never itself marked private-preview — only its fields are (below). if ref.Description != "" || ref.Enum != nil { - pkg[RootTypeKey] = annotation.Descriptor{ + annotations.SetSelf(basePath, annotation.Descriptor{ Description: ref.Description, Enum: enumValues(ref.Enum), - } + }) } for k := range s.Properties { @@ -159,12 +150,12 @@ func (p *annotationParser) extractAnnotations(typ reflect.Type) (annotation.File } } - pkg[k] = annotation.Descriptor{ + annotations.SetField(basePath, k, annotation.Descriptor{ Description: description, Preview: preview, DeprecationMessage: deprecationMessageFor(refProp.Deprecated), OutputOnly: isOutputOnly(refProp.Behaviors), - } + }) } } return s From f31f69e5e05fcee2b0e2b616e79a3de2e533cf8c Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 13 Jun 2026 09:30:11 +0200 Subject: [PATCH 5/8] Order type-graph fields by schema membership, not replicated skip rules structFieldNames re-implemented the generator's readonly/internal/ exported/json-tag skip rules and then cross-checked the result against the emitted schema. The schema's property set is already authoritative, so order the names by struct declaration and keep only those the schema emitted; reflection now supplies order alone. A count check still catches a struct walk that fails to reach a property. Co-authored-by: Isaac --- bundle/internal/schema/typegraph.go | 34 +++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/bundle/internal/schema/typegraph.go b/bundle/internal/schema/typegraph.go index d82a80bd233..b412844d286 100644 --- a/bundle/internal/schema/typegraph.go +++ b/bundle/internal/schema/typegraph.go @@ -4,7 +4,6 @@ import ( "container/list" "fmt" "reflect" - "slices" "strings" "github.com/databricks/cli/libs/jsonschema" @@ -49,16 +48,14 @@ func newTypeGraph(root reflect.Type) (*typeGraph, error) { var edges []fieldEdge if typ.Kind() == reflect.Struct { - for _, name := range structFieldNames(typ) { - prop, ok := s.Properties[name] - if !ok { - ferr = fmt.Errorf("field order for %s diverged from the generated schema: %s not in schema", refPath, name) - return s - } - edges = append(edges, fieldEdge{name: name, typ: resolveEdgeType(prop)}) + for _, name := range structFieldOrder(typ, s.Properties) { + edges = append(edges, fieldEdge{name: name, typ: resolveEdgeType(s.Properties[name])}) } + // structFieldOrder only orders names the schema emitted, so a + // mismatch means its struct walk failed to reach a property — + // i.e. it diverged from the generator's own field handling. if len(edges) != len(s.Properties) { - ferr = fmt.Errorf("field order for %s diverged from the generated schema: %d fields, %d properties", refPath, len(edges), len(s.Properties)) + ferr = fmt.Errorf("type graph for %s reached %d of %d schema properties", refPath, len(edges), len(s.Properties)) return s } } @@ -83,11 +80,12 @@ func (g *typeGraph) edge(typeKey, name string) (fieldEdge, bool) { return fieldEdge{}, false } -// structFieldNames returns the JSON property names of typ in struct -// declaration order, flattening embedded structs breadth-first with the same -// tag rules as jsonschema.FromType. newTypeGraph checks the result against the -// properties FromType actually emitted, so the two cannot silently diverge. -func structFieldNames(typ reflect.Type) []string { +// structFieldOrder returns the names in props ordered by where each field is +// declared in typ, flattening embedded structs breadth-first like +// jsonschema.FromType. Membership in props is authoritative — it already +// reflects every skip rule the generator applies — so reflection here only +// recovers the declaration order the schema's property map loses. +func structFieldOrder(typ reflect.Type, props map[string]*jsonschema.Schema) []string { var names []string seen := map[string]bool{} bfsQueue := list.New() @@ -111,13 +109,11 @@ func structFieldNames(typ reflect.Type) []string { continue } - bundleTags := strings.Split(field.Tag.Get("bundle"), ",") - if slices.Contains(bundleTags, "readonly") || slices.Contains(bundleTags, "internal") { + name := strings.Split(field.Tag.Get("json"), ",")[0] + if seen[name] { continue } - - name := strings.Split(field.Tag.Get("json"), ",")[0] - if name == "" || name == "-" || !field.IsExported() || seen[name] { + if _, ok := props[name]; !ok { continue } seen[name] = true From 963339b9e2d3c442274aed7075b351c3fc74fa45 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 13 Jun 2026 09:30:11 +0200 Subject: [PATCH 6/8] Spell structural annotation keys as $type and $fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A config field named "type" (artifacts.*.type, variables.*.type) was told apart from the structural type-docs key only by nesting level. Prefix the two structural keys with "$" — matching the JSON-Schema convention this file documents — so they can never be confused with or collide with a field of the same name, which always appears as a bare key inside "$fields". Also tidy the saver: a takeSelf accessor mirrors takeField, and the ordering line numbers are named constants. No change to the generated schema. Co-authored-by: Isaac --- bundle/internal/schema/annotations.yml | 333 +++++++++--------- bundle/internal/schema/annotations_file.go | 60 ++-- .../internal/schema/annotations_file_test.go | 30 +- 3 files changed, 220 insertions(+), 203 deletions(-) diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 748bfb9c36d..853538785cb 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -4,13 +4,14 @@ # for everything else is inherited from cli.json at generation time and must # not be duplicated here. # -# The structure mirrors the bundle configuration tree: +# The structure mirrors the bundle configuration tree. The "$type" and +# "$fields" keys are structural; every other key is a config field name. # - A node documents one field: its inline keys (description, # markdown_description, ...) apply to the field itself. -# - "type" documents the type the field's value resolves to — for map and +# - "$type" documents the type the field's value resolves to — for map and # sequence fields, each entry. These docs are shared by every occurrence # of the type; enum values also live here. -# - "fields" holds the nodes of that type's fields (map and sequence levels +# - "$fields" holds the nodes of that type's fields (map and sequence levels # are unwrapped implicitly). # - Each type is expanded exactly once, at its first occurrence; fields of # types that occur again later (for example everything under "targets") @@ -35,7 +36,7 @@ artifacts: build: poetry build path: . ``` - "fields": + "$fields": "build": "description": |- An optional set of build commands to run locally before deployment. @@ -48,7 +49,7 @@ artifacts: "files": "description": |- The relative or absolute path to the built artifact files. - "fields": + "$fields": "source": "description": |- Required. The artifact source file. @@ -65,7 +66,7 @@ bundle: The bundle attributes when deploying to this target. "markdown_description": |- The bundle attributes when deploying to this target, - "fields": + "$fields": "cluster_id": "description": |- The ID of a cluster to use to run the bundle. @@ -84,14 +85,14 @@ bundle: The definition of the bundle deployment "markdown_description": |- The definition of the bundle deployment. For supported attributes see [\_](/dev-tools/bundles/deployment-modes.md). - "fields": + "$fields": "fail_on_active_runs": "description": |- Whether to fail on active runs. If this is set to true a deployment that is running can be interrupted. "lock": "description": |- The deployment lock attributes. - "fields": + "$fields": "enabled": "description": |- Whether this lock is enabled. @@ -101,7 +102,7 @@ bundle: "engine": "description": |- The deployment engine to use. Valid values are `terraform` and `direct`. Takes priority over `DATABRICKS_BUNDLE_ENGINE` environment variable. Default is "terraform". - "type": + "$type": "enum": - |- terraform @@ -112,7 +113,7 @@ bundle: 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 [\_](/dev-tools/bundles/settings.md#git). - "fields": + "$fields": "branch": "description": |- The Git branch name. @@ -137,20 +138,20 @@ environments: experimental: "description": |- Defines attributes for experimental features. - "fields": + "$fields": "pydabs": "description": |- The PyDABs configuration. "deprecation_message": |- Deprecated: please use python instead - "fields": + "$fields": "enabled": "description": |- Whether or not PyDABs (Private Preview) is enabled "python": "description": |- Configures loading of Python code defined with 'databricks-bundles' package. - "fields": + "$fields": "mutators": "description": |- Mutators contains a list of fully qualified function paths to mutator functions. @@ -229,11 +230,11 @@ resources: : : ``` - "fields": + "$fields": "alerts": "description": |- PLACEHOLDER - "fields": + "$fields": "create_time": "description": |- PLACEHOLDER @@ -252,13 +253,13 @@ resources: "evaluation": "description": |- PLACEHOLDER - "fields": + "$fields": "notification": - "fields": + "$fields": "subscriptions": "description": |- PLACEHOLDER - "fields": + "$fields": "destination_id": "description": |- PLACEHOLDER @@ -266,7 +267,7 @@ resources: "description": |- PLACEHOLDER "source": - "fields": + "$fields": "aggregation": "description": |- PLACEHOLDER @@ -277,14 +278,14 @@ resources: "description": |- PLACEHOLDER "threshold": - "fields": + "$fields": "column": "description": |- PLACEHOLDER "value": "description": |- PLACEHOLDER - "fields": + "$fields": "bool_value": "description": |- PLACEHOLDER @@ -338,9 +339,9 @@ resources: The app resource defines a Databricks app. "markdown_description": |- The app resource defines a [Databricks app](/api/workspace/apps/create). For information about Databricks Apps, see [\_](/dev-tools/databricks-apps/index.md). - "fields": + "$fields": "active_deployment": - "fields": + "$fields": "create_time": "description": |- PLACEHOLDER @@ -350,7 +351,7 @@ resources: "deployment_artifacts": "description": |- PLACEHOLDER - "fields": + "$fields": "source_code_path": "description": |- PLACEHOLDER @@ -366,7 +367,7 @@ resources: "status": "description": |- PLACEHOLDER - "fields": + "$fields": "message": "description": |- PLACEHOLDER @@ -379,7 +380,7 @@ resources: "app_status": "description": |- PLACEHOLDER - "fields": + "$fields": "message": "description": |- PLACEHOLDER @@ -401,21 +402,21 @@ resources: "compute_status": "description": |- PLACEHOLDER - "fields": + "$fields": "message": "description": |- PLACEHOLDER "config": "description": |- PLACEHOLDER - "fields": + "$fields": "command": "description": |- PLACEHOLDER "env": "description": |- PLACEHOLDER - "fields": + "$fields": "name": "description": |- PLACEHOLDER @@ -448,7 +449,7 @@ resources: "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -462,11 +463,11 @@ resources: "description": |- PLACEHOLDER "resources": - "fields": + "$fields": "app": "description": |- PLACEHOLDER - "fields": + "$fields": "name": "description": |- PLACEHOLDER @@ -476,7 +477,7 @@ resources: "database": "description": |- PLACEHOLDER - "fields": + "$fields": "database_name": "description": |- PLACEHOLDER @@ -489,7 +490,7 @@ resources: "experiment": "description": |- PLACEHOLDER - "fields": + "$fields": "experiment_id": "description": |- PLACEHOLDER @@ -499,7 +500,7 @@ resources: "genie_space": "description": |- PLACEHOLDER - "fields": + "$fields": "name": "description": |- PLACEHOLDER @@ -512,7 +513,7 @@ resources: "job": "description": |- PLACEHOLDER - "fields": + "$fields": "id": "description": |- PLACEHOLDER @@ -522,7 +523,7 @@ resources: "postgres": "description": |- PLACEHOLDER - "fields": + "$fields": "branch": "description": |- PLACEHOLDER @@ -535,7 +536,7 @@ resources: "secret": "description": |- PLACEHOLDER - "fields": + "$fields": "key": "description": |- PLACEHOLDER @@ -548,7 +549,7 @@ resources: "serving_endpoint": "description": |- PLACEHOLDER - "fields": + "$fields": "name": "description": |- PLACEHOLDER @@ -558,7 +559,7 @@ resources: "sql_warehouse": "description": |- PLACEHOLDER - "fields": + "$fields": "id": "description": |- PLACEHOLDER @@ -568,7 +569,7 @@ resources: "uc_securable": "description": |- PLACEHOLDER - "fields": + "$fields": "permission": "description": |- PLACEHOLDER @@ -605,7 +606,7 @@ resources: "catalogs": "description": |- PLACEHOLDER - "fields": + "$fields": "comment": "description": |- PLACEHOLDER @@ -619,9 +620,9 @@ resources: "description": |- PLACEHOLDER "managed_encryption_settings": - "fields": + "$fields": "azure_encryption_settings": - "fields": + "$fields": "azure_cmk_access_connector_id": "description": |- PLACEHOLDER @@ -654,7 +655,7 @@ resources: The cluster definitions for the bundle, where each key is the name of a cluster. "markdown_description": |- The cluster definitions for the bundle, where each key is the name of a cluster. See [\_](/dev-tools/bundles/resources.md#clusters). - "type": + "$type": "markdown_description": |- The cluster resource defines an [all-purpose cluster](/api/workspace/clusters/create). "markdown_examples": |- @@ -683,7 +684,7 @@ resources: notebook_task: notebook_path: "./src/my_notebook.py" ``` - "fields": + "$fields": "data_security_mode": "description": |- PLACEHOLDER @@ -696,7 +697,7 @@ resources: "lifecycle": "description": |- 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. - "fields": + "$fields": "prevent_destroy": "description": |- Lifecycle setting to prevent the resource from being destroyed. @@ -706,7 +707,7 @@ resources: "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -730,7 +731,7 @@ resources: The dashboard definitions for the bundle, where each key is the name of the dashboard. "markdown_description": |- The dashboard definitions for the bundle, where each key is the name of the dashboard. See [\_](/dev-tools/bundles/resources.md#dashboards). - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -747,7 +748,7 @@ resources: 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). - "fields": + "$fields": "create_time": "description": |- The timestamp of when the dashboard was created. @@ -793,7 +794,7 @@ resources: "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- The name of the group that has the permission set in level. @@ -824,7 +825,7 @@ resources: "database_catalogs": "description": |- PLACEHOLDER - "fields": + "$fields": "create_database_if_not_exists": "description": |- PLACEHOLDER @@ -837,7 +838,7 @@ resources: "database_instances": "description": |- PLACEHOLDER - "fields": + "$fields": "effective_capacity": "description": |- PLACEHOLDER @@ -852,7 +853,7 @@ resources: The experiment definitions for the bundle, where each key is the name of the experiment. "markdown_description": |- The experiment definitions for the bundle, where each key is the name of the experiment. See [\_](/dev-tools/bundles/resources.md#experiments). - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -868,14 +869,14 @@ resources: group_name: users description: MLflow experiment used to track runs ``` - "fields": + "$fields": "lifecycle": "description": |- 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. "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -891,7 +892,7 @@ resources: "external_locations": "description": |- PLACEHOLDER - "fields": + "$fields": "comment": "description": |- PLACEHOLDER @@ -899,11 +900,11 @@ resources: "description": |- PLACEHOLDER "effective_file_event_queue": - "fields": + "$fields": "managed_aqs": "description": |- PLACEHOLDER - "fields": + "$fields": "managed_resource_id": "description": |- PLACEHOLDER @@ -919,7 +920,7 @@ resources: "managed_pubsub": "description": |- PLACEHOLDER - "fields": + "$fields": "managed_resource_id": "description": |- PLACEHOLDER @@ -929,7 +930,7 @@ resources: "managed_sqs": "description": |- PLACEHOLDER - "fields": + "$fields": "managed_resource_id": "description": |- PLACEHOLDER @@ -951,15 +952,15 @@ resources: "encryption_details": "description": |- PLACEHOLDER - "fields": + "$fields": "sse_encryption_details": "description": |- PLACEHOLDER - "fields": + "$fields": "algorithm": "description": |- PLACEHOLDER - "type": + "$type": "description": |- SSE algorithm to use for encrypting S3 objects "enum": @@ -997,7 +998,7 @@ resources: "genie_spaces": "description": |- PLACEHOLDER - "fields": + "$fields": "description": "description": |- Description of the Genie space shown alongside the title in the Databricks UI. @@ -1030,7 +1031,7 @@ resources: The job definitions for the bundle, where each key is the name of the job. "markdown_description": |- The job definitions for the bundle, where each key is the name of the job. See [\_](/dev-tools/bundles/resources.md#jobs). - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -1048,13 +1049,13 @@ resources: ``` 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). - "fields": + "$fields": "environments": - "fields": + "$fields": "spec": "description": |- PLACEHOLDER - "fields": + "$fields": "dependencies": "description": |- List of pip dependencies, as supported by the version of pip in this environment. @@ -1062,7 +1063,7 @@ resources: "description": |- PLACEHOLDER "git_source": - "fields": + "$fields": "git_snapshot": "description": |- PLACEHOLDER @@ -1072,11 +1073,11 @@ resources: "health": "description": |- PLACEHOLDER - "fields": + "$fields": "rules": "description": |- PLACEHOLDER - "fields": + "$fields": "metric": "description": |- PLACEHOLDER @@ -1084,11 +1085,11 @@ resources: "description": |- PLACEHOLDER "job_clusters": - "fields": + "$fields": "new_cluster": - "fields": + "$fields": "aws_attributes": - "fields": + "$fields": "availability": "description": |- PLACEHOLDER @@ -1096,12 +1097,12 @@ resources: "description": |- PLACEHOLDER "azure_attributes": - "fields": + "$fields": "availability": "description": |- PLACEHOLDER "log_analytics_info": - "fields": + "$fields": "log_analytics_primary_key": "description": |- The primary key for the Azure Log Analytics agent configuration @@ -1114,17 +1115,17 @@ resources: "docker_image": "description": |- PLACEHOLDER - "fields": + "$fields": "basic_auth": "description": |- PLACEHOLDER "gcp_attributes": - "fields": + "$fields": "availability": "description": |- PLACEHOLDER "init_scripts": - "fields": + "$fields": "abfss": "description": |- Contains the Azure Data Lake Storage destination path @@ -1140,14 +1141,14 @@ resources: "lifecycle": "description": |- 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. - "fields": + "$fields": "prevent_destroy": "description": |- Lifecycle setting to prevent the resource from being destroyed. "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -1163,7 +1164,7 @@ resources: "run_as": "description": |- PLACEHOLDER - "fields": + "$fields": "service_principal_name": "description": |- The application ID of an active service principal. Setting this field requires the `servicePrincipal/user` role. @@ -1171,27 +1172,27 @@ resources: "description": |- The email of an active workspace user. Non-admin users can only set this field to their own email. "tasks": - "fields": + "$fields": "alert_task": - "fields": + "$fields": "subscribers": - "fields": + "$fields": "destination_id": "description": |- PLACEHOLDER "dashboard_task": - "fields": + "$fields": "dashboard_id": "description": |- PLACEHOLDER "subscription": "description": |- PLACEHOLDER - "fields": + "$fields": "subscribers": "description": |- PLACEHOLDER - "fields": + "$fields": "destination_id": "description": |- PLACEHOLDER @@ -1204,7 +1205,7 @@ resources: "gen_ai_compute_task": "description": |- PLACEHOLDER - "fields": + "$fields": "compute": "description": |- PLACEHOLDER @@ -1212,9 +1213,9 @@ resources: "description": |- PLACEHOLDER "python_operator_task": - "fields": + "$fields": "parameters": - "fields": + "$fields": "name": "description": |- PLACEHOLDER @@ -1222,19 +1223,19 @@ resources: "description": |- PLACEHOLDER "run_job_task": - "fields": + "$fields": "python_named_params": "description": |- PLACEHOLDER "webhook_notifications": - "fields": + "$fields": "on_duration_warning_threshold_exceeded": - "fields": + "$fields": "id": "description": |- PLACEHOLDER "trigger": - "fields": + "$fields": "model": "description": |- PLACEHOLDER @@ -1246,7 +1247,7 @@ resources: The model serving endpoint definitions for the bundle, where each key is the name of the model serving endpoint. "markdown_description": |- 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). - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -1271,16 +1272,16 @@ resources: - key: "team" value: "data science" ``` - "fields": + "$fields": "config": - "fields": + "$fields": "served_entities": - "fields": + "$fields": "entity_version": "description": |- PLACEHOLDER "served_models": - "fields": + "$fields": "model_name": "description": |- PLACEHOLDER @@ -1288,9 +1289,9 @@ resources: "description": |- PLACEHOLDER "traffic_config": - "fields": + "$fields": "routes": - "fields": + "$fields": "served_entity_name": "description": |- PLACEHOLDER @@ -1303,7 +1304,7 @@ resources: "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -1321,17 +1322,17 @@ resources: The model definitions for the bundle, where each key is the name of the model. "markdown_description": |- The model definitions for the bundle, where each key is the name of the model. See [\_](/dev-tools/bundles/resources.md#models). - "type": + "$type": "markdown_description": |- 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. - "fields": + "$fields": "lifecycle": "description": |- 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. "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -1349,7 +1350,7 @@ resources: The pipeline definitions for the bundle, where each key is the name of the pipeline. "markdown_description": |- The pipeline definitions for the bundle, where each key is the name of the pipeline. See [\_](/dev-tools/bundles/resources.md#pipelines). - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -1372,39 +1373,39 @@ resources: - notebook: path: ./pipeline.py ``` - "fields": + "$fields": "dry_run": "description": |- PLACEHOLDER "ingestion_definition": - "fields": + "$fields": "netsuite_jar_path": "description": |- PLACEHOLDER "objects": - "fields": + "$fields": "report": - "fields": + "$fields": "table_configuration": - "fields": + "$fields": "workday_report_parameters": "description": |- PLACEHOLDER "schema": - "fields": + "$fields": "connector_options": - "fields": + "$fields": "gdrive_options": "description": |- PLACEHOLDER - "fields": + "$fields": "entity_type": "description": |- PLACEHOLDER "file_ingestion_options": "description": |- PLACEHOLDER - "fields": + "$fields": "corrupt_record_column": "description": |- PLACEHOLDER @@ -1423,9 +1424,9 @@ resources: "kafka_options": "description": |- PLACEHOLDER - "fields": + "$fields": "key_transformer": - "fields": + "$fields": "json_options": "description": |- PLACEHOLDER @@ -1433,12 +1434,12 @@ resources: "description": |- PLACEHOLDER "source_configurations": - "fields": + "$fields": "google_ads_config": "description": |- PLACEHOLDER "libraries": - "fields": + "$fields": "whl": "deprecation_message": |- This field is deprecated @@ -1451,7 +1452,7 @@ resources: "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -1470,11 +1471,11 @@ resources: "trigger": "deprecation_message": |- Use continuous instead - "fields": + "$fields": "cron": "description": |- PLACEHOLDER - "fields": + "$fields": "quartz_cron_schedule": "description": |- PLACEHOLDER @@ -1487,7 +1488,7 @@ resources: "postgres_branches": "description": |- PLACEHOLDER - "fields": + "$fields": "branch_id": "description": |- PLACEHOLDER @@ -1524,7 +1525,7 @@ resources: "postgres_catalogs": "description": |- 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. - "fields": + "$fields": "branch": "description": |- PLACEHOLDER @@ -1543,7 +1544,7 @@ resources: "postgres_endpoints": "description": |- PLACEHOLDER - "fields": + "$fields": "autoscaling_limit_max_cu": "description": |- PLACEHOLDER @@ -1583,7 +1584,7 @@ resources: "postgres_projects": "description": |- PLACEHOLDER - "fields": + "$fields": "budget_policy_id": "description": |- PLACEHOLDER @@ -1623,7 +1624,7 @@ resources: "postgres_synced_tables": "description": |- 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. - "fields": + "$fields": "branch": "description": |- PLACEHOLDER @@ -1662,7 +1663,7 @@ resources: The quality monitor definitions for the bundle, where each key is the name of the quality monitor. "markdown_description": |- 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). - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -1686,11 +1687,11 @@ resources: quartz_cron_expression: 0 0 8 * * ? # Run Every day at 8am timezone_id: UTC ``` - "fields": + "$fields": "inference_log": "description": |- PLACEHOLDER - "fields": + "$fields": "granularities": "description": |- 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. @@ -1701,7 +1702,7 @@ resources: "description": |- PLACEHOLDER "time_series": - "fields": + "$fields": "granularities": "description": |- 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. @@ -1710,7 +1711,7 @@ resources: The registered model definitions for the bundle, where each key is the name of the Unity Catalog registered model. "markdown_description": |- 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) - "type": + "$type": "markdown_description": |- 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). "markdown_examples": |- @@ -1729,11 +1730,11 @@ resources: - EXECUTE principal: account users ``` - "fields": + "$fields": "aliases": "description": |- PLACEHOLDER - "fields": + "$fields": "catalog_name": "description": |- PLACEHOLDER @@ -1781,7 +1782,7 @@ resources: The schema definitions for the bundle, where each key is the name of the schema. "markdown_description": |- The schema definitions for the bundle, where each key is the name of the schema. See [\_](/dev-tools/bundles/resources.md#schemas). - "type": + "$type": "markdown_description": |- 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: @@ -1827,7 +1828,7 @@ resources: - CAN_READ catalog_name: main ``` - "fields": + "$fields": "grants": "description": |- PLACEHOLDER @@ -1842,7 +1843,7 @@ resources: The secret scope definitions for the bundle, where each key is the name of the secret scope. "markdown_description": |- 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). - "fields": + "$fields": "backend_type": "description": |- The backend type the scope will be created with. If not specified, will default to `DATABRICKS` @@ -1858,14 +1859,14 @@ resources: "permissions": "description": |- The permissions to apply to the secret scope. Permissions are managed via secret scope ACLs. - "fields": + "$fields": "group_name": "description": |- The name of the group that has the permission set in level. This field translates to a `principal` field in secret scope ACL. "level": "description": |- The allowed permission for user, group, service principal defined for this permission. - "type": + "$type": "enum": - |- READ @@ -1884,9 +1885,9 @@ resources: The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. "markdown_description": |- The SQL warehouse definitions for the bundle, where each key is the name of the warehouse. See [\_](/dev-tools/bundles/resources.md#sql_warehouses). - "fields": + "$fields": "channel": - "fields": + "$fields": "dbsql_version": "description": |- PLACEHOLDER @@ -1904,7 +1905,7 @@ resources: "permissions": "description": |- PLACEHOLDER - "fields": + "$fields": "group_name": "description": |- PLACEHOLDER @@ -1921,11 +1922,11 @@ resources: "description": |- PLACEHOLDER "tags": - "fields": + "$fields": "custom_tags": "description": |- PLACEHOLDER - "fields": + "$fields": "key": "description": |- PLACEHOLDER @@ -1938,13 +1939,13 @@ resources: "synced_database_tables": "description": |- PLACEHOLDER - "fields": + "$fields": "data_synchronization_status": "description": |- PLACEHOLDER - "fields": + "$fields": "last_sync": - "fields": + "$fields": "delta_table_sync_info": "description": |- PLACEHOLDER @@ -1975,7 +1976,7 @@ resources: "vector_search_endpoints": "description": |- PLACEHOLDER - "fields": + "$fields": "budget_policy_id": "description": |- PLACEHOLDER @@ -2000,18 +2001,18 @@ resources: "vector_search_indexes": "description": |- PLACEHOLDER - "fields": + "$fields": "delta_sync_index_spec": "description": |- PLACEHOLDER - "fields": + "$fields": "columns_to_sync": "description": |- PLACEHOLDER "embedding_source_columns": "description": |- PLACEHOLDER - "fields": + "$fields": "embedding_model_endpoint_name": "description": |- PLACEHOLDER @@ -2024,7 +2025,7 @@ resources: "embedding_vector_columns": "description": |- PLACEHOLDER - "fields": + "$fields": "embedding_dimension": "description": |- PLACEHOLDER @@ -2043,7 +2044,7 @@ resources: "direct_access_index_spec": "description": |- PLACEHOLDER - "fields": + "$fields": "embedding_source_columns": "description": |- PLACEHOLDER @@ -2079,7 +2080,7 @@ resources: The volume definitions for the bundle, where each key is the name of the volume. "markdown_description": |- The volume definitions for the bundle, where each key is the name of the volume. See [\_](/dev-tools/bundles/resources.md#volumes). - "type": + "$type": "markdown_description": |- 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: @@ -2099,7 +2100,7 @@ resources: ``` 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). - "fields": + "$fields": "grants": "description": |- PLACEHOLDER @@ -2117,7 +2118,7 @@ run_as: scripts: "description": |- PLACEHOLDER - "fields": + "$fields": "content": "description": |- PLACEHOLDER @@ -2131,7 +2132,7 @@ targets: Defines deployment targets for the bundle. "markdown_description": |- Defines deployment targets for the bundle. See [\_](/dev-tools/bundles/settings.md#targets) - "fields": + "$fields": "artifacts": "description": |- The artifacts to include in the target deployment. @@ -2163,7 +2164,7 @@ targets: "presets": "description": |- The deployment presets for the target. - "fields": + "$fields": "artifacts_dynamic_version": "description": |- Whether to enable dynamic_version on all artifacts. @@ -2196,7 +2197,7 @@ targets: "sync": "description": |- The local paths to sync to the target workspace when a bundle is run or deployed. - "fields": + "$fields": "exclude": "description": |- A list of files or folders to exclude from the bundle. @@ -2209,7 +2210,7 @@ targets: "variables": "description": |- The custom variable definitions for the target. - "fields": + "$fields": "default": "description": |- The default value for the variable. @@ -2228,12 +2229,12 @@ targets: variables: "description": |- A Map that defines the custom variables for the bundle, where each key is the name of the variable, and the value is a Map that defines the variable. - "type": + "$type": "description": |- Defines a custom variable for the bundle. "markdown_description": |- Defines a custom variable for the bundle. See [\_](/dev-tools/bundles/settings.md#variables). - "fields": + "$fields": "default": "description": |- The default value for the variable. @@ -2245,7 +2246,7 @@ variables: 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. "markdown_description": |- 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. - "fields": + "$fields": "alert": "description": |- The name of the alert for which to retrieve an ID. @@ -2290,7 +2291,7 @@ workspace: Defines the Databricks workspace for the bundle. "markdown_description": |- Defines the Databricks workspace for the bundle. See [\_](/dev-tools/bundles/settings.md#workspace). - "fields": + "$fields": "account_id": "description": |- The Databricks account ID. diff --git a/bundle/internal/schema/annotations_file.go b/bundle/internal/schema/annotations_file.go index 2b7407a6a9f..1e176ccc836 100644 --- a/bundle/internal/schema/annotations_file.go +++ b/bundle/internal/schema/annotations_file.go @@ -17,17 +17,29 @@ import ( "github.com/databricks/cli/libs/dyn/yamlsaver" ) -// fieldsKey nests a type's block inside the node of a field that resolves to -// it. It cannot clash with descriptor keys, and config fields that happen to -// be named "fields" simply appear inside it like any other field. -const fieldsKey = "fields" - +// fieldsKey nests a type's block of field nodes inside the node of a field +// that resolves to it. +// // typeDocKey holds the documentation for the type a field's value resolves to // (for map and sequence fields: each entry). It is applied to the type's // shared $defs entry, so it shows up at every occurrence of the type; this is -// also where enum values live. Config fields named "type" do not clash: they -// appear inside "fields" like any other field. -const typeDocKey = "type" +// also where enum values live. +// +// Both are "$"-prefixed so they cannot be mistaken for — or collide with — a +// config field of the same name (e.g. artifacts.*.type), which always appears +// as a bare key inside "$fields". +const ( + fieldsKey = "$fields" + typeDocKey = "$type" +) + +// lineTypeDoc and lineFields sort the "$type" and "$fields" keys after a +// node's inline descriptor keys, which the saver orders with small line +// numbers (see descriptorKeyOrder). +const ( + lineTypeDoc = 9999 + lineFields = 10000 +) const annotationsFileHeader = `# This file contains the documentation the CLI owns for the bundle # configuration JSON schema: docs for fields that do not exist in the upstream @@ -35,13 +47,14 @@ const annotationsFileHeader = `# This file contains the documentation the CLI ow # for everything else is inherited from cli.json at generation time and must # not be duplicated here. # -# The structure mirrors the bundle configuration tree: +# The structure mirrors the bundle configuration tree. The "$type" and +# "$fields" keys are structural; every other key is a config field name. # - A node documents one field: its inline keys (description, # markdown_description, ...) apply to the field itself. -# - "type" documents the type the field's value resolves to — for map and +# - "$type" documents the type the field's value resolves to — for map and # sequence fields, each entry. These docs are shared by every occurrence # of the type; enum values also live here. -# - "fields" holds the nodes of that type's fields (map and sequence levels +# - "$fields" holds the nodes of that type's fields (map and sequence levels # are unwrapped implicitly). # - Each type is expanded exactly once, at its first occurrence; fields of # types that occur again later (for example everything under "targets") @@ -143,7 +156,7 @@ func (l *fileLoader) block(v dyn.Value, typeKey, where string) error { } // node loads one field's node: the inline descriptor for the field, the -// "type" docs for the type it resolves to, and the "fields" block of that +// "$type" docs for the type it resolves to, and the "$fields" block of that // type's fields. func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where string) error { if v.Kind() == dyn.KindNil { @@ -188,7 +201,7 @@ func (l *fileLoader) node(v dyn.Value, typeKey string, edge fieldEdge, where str return nil } -// descriptor parses a mapping of descriptor keys (the value of a "type" key). +// descriptor parses a mapping of descriptor keys (the value of a "$type" key). // Non-descriptor keys are flagged as unknown. The second return is false when // the mapping carries no descriptor keys. func (l *fileLoader) descriptor(v dyn.Value, where string) (annotation.Descriptor, bool, error) { @@ -311,13 +324,13 @@ func (s *fileSaver) block(typeKey string) (map[string]dyn.Value, error) { } // node renders one field's node: the inline field descriptor plus, at the -// field's canonical position, the resolved type's "type" docs and the +// field's canonical position, the resolved type's "$type" docs and the // "fields" block of its fields. func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, error) { out := map[string]dyn.Value{} // The inline descriptor keys are written directly into the node, sharing - // it with the "type" and "fields" keys added below. + // it with the "$type" and "$fields" keys added below. if d, ok := s.takeField(typeKey, edge.name); ok { if _, err := descriptorToMap(d, out); err != nil { return nil, err @@ -325,16 +338,12 @@ func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, } if s.expandAt[edgeKey{typeKey, edge.name}] { - // Expanding a type accounts for its self docs, whether or not it has - // any. High line numbers sort the type docs and the fields block - // after the inline descriptor keys. - s.selfConsumed[edge.typ] = true - v, err := descriptorToMap(s.data[edge.typ].Self, map[string]dyn.Value{}) + v, err := descriptorToMap(s.takeSelf(edge.typ), map[string]dyn.Value{}) if err != nil { return nil, err } if v.Kind() != dyn.KindNil { - out[typeDocKey] = v.WithLocations([]dyn.Location{{Line: 9999}}) + out[typeDocKey] = v.WithLocations([]dyn.Location{{Line: lineTypeDoc}}) } child, err := s.block(edge.typ) @@ -342,7 +351,7 @@ func (s *fileSaver) node(typeKey string, edge fieldEdge) (map[string]dyn.Value, return nil, err } if len(child) > 0 { - out[fieldsKey] = dyn.NewValue(child, []dyn.Location{{Line: 10000}}) + out[fieldsKey] = dyn.NewValue(child, []dyn.Location{{Line: lineFields}}) } } return out, nil @@ -358,6 +367,13 @@ func (s *fileSaver) takeField(typeKey, name string) (annotation.Descriptor, bool return d, ok } +// takeSelf returns a type's own descriptor and marks it accounted for, whether +// or not it carries any docs (expanding the type is what consumes it). +func (s *fileSaver) takeSelf(typeKey string) annotation.Descriptor { + s.selfConsumed[typeKey] = true + return s.data[typeKey].Self +} + // detached returns the data entries no tree position consumed, sorted. These // are fields or types that no longer exist in the config. func (s *fileSaver) detached() []string { diff --git a/bundle/internal/schema/annotations_file_test.go b/bundle/internal/schema/annotations_file_test.go index d4dbb80e817..42899b0c184 100644 --- a/bundle/internal/schema/annotations_file_test.go +++ b/bundle/internal/schema/annotations_file_test.go @@ -49,7 +49,7 @@ func TestAnnotationsFileRoundTrip(t *testing.T) { // Keys are emitted alphabetically; tgNested expands under `first` (its // canonical position in declaration order), so `by_name`, which resolves - // to the same type, carries no `type` or `fields` keys. `plain` has no + // to the same type, carries no `$type` or `$fields` keys. `plain` has no // content and is omitted entirely. expected := annotationsFileHeader + `by_name: "description": |- @@ -59,10 +59,10 @@ func TestAnnotationsFileRoundTrip(t *testing.T) { first: "description": |- First field. - "type": + "$type": "description": |- A nested type. - "fields": + "$fields": "again": "description": |- Recursive field. @@ -70,12 +70,12 @@ first: "description": |- PLACEHOLDER items: - "fields": + "$fields": "inner": "description": |- Inner docs. mode: - "type": + "$type": "enum": - |- a @@ -108,19 +108,19 @@ func TestAnnotationsFileUnknownEntries(t *testing.T) { Valid entry. bogus_key: |- Not a descriptor key. - fields: - "_": - description: |- - The old type docs spelling is not a field. + type: + description: |- + Unprefixed "type" is not the structural key, so it is unknown here. + $fields: no_such_field: description: |- Field does not exist. plain: - fields: + $fields: nested: description: |- Primitive fields have no nested fields. - type: + $type: description: |- Primitive fields have no type docs. `), 0o644) @@ -130,10 +130,10 @@ plain: require.NoError(t, err) assert.Equal(t, []string{ "first.bogus_key", - "first.fields._", - "first.fields.no_such_field", - "plain.fields", - "plain.type", + "first.type", + "first.$fields.no_such_field", + "plain.$fields", + "plain.$type", }, unknown) // The valid entry is still loaded. From 4f4fe2ce2a1a4943f8fabda6aeb860b64d08fdfe Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Sat, 13 Jun 2026 09:32:06 +0200 Subject: [PATCH 7/8] Inline the single-use parseCliJSON helper It wrapped clijson.Parse with an empty-schemas check and was called once. Fold it into generateSchema and drop cli_json.go. Co-authored-by: Isaac --- bundle/internal/schema/cli_json.go | 25 ------------------------- bundle/internal/schema/main.go | 11 +++++++++-- 2 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 bundle/internal/schema/cli_json.go diff --git a/bundle/internal/schema/cli_json.go b/bundle/internal/schema/cli_json.go deleted file mode 100644 index ec661adb8c3..00000000000 --- a/bundle/internal/schema/cli_json.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/databricks/cli/internal/clijson" -) - -// parseCliJSON reads .codegen/cli.json via the shared clijson.Parse and returns -// its schema graph keyed by SDK type name (e.g. "jobs.JobSettings"). The -// annotation parser matches Go SDK types against these keys directly; refs -// between schemas are stored as bare type names, so no $ref reconstruction is -// needed. -func parseCliJSON(path string) (map[string]*clijson.SchemaJSON, error) { - doc, err := clijson.Parse(path) - if err != nil { - return nil, err - } - - if len(doc.Schemas) == 0 { - return nil, fmt.Errorf("no schemas found in %s", path) - } - - return doc.Schemas, nil -} diff --git a/bundle/internal/schema/main.go b/bundle/internal/schema/main.go index e1badcd81f5..634bf6f52d7 100644 --- a/bundle/internal/schema/main.go +++ b/bundle/internal/schema/main.go @@ -12,6 +12,7 @@ import ( "github.com/databricks/cli/bundle/config" "github.com/databricks/cli/bundle/config/resources" "github.com/databricks/cli/bundle/config/variable" + "github.com/databricks/cli/internal/clijson" "github.com/databricks/cli/libs/dyn/dynvar" "github.com/databricks/cli/libs/jsonschema" "github.com/databricks/databricks-sdk-go/service/jobs" @@ -208,12 +209,18 @@ func main() { func generateSchema(workdir, outputFile, cliJSONFile string, docsMode bool) { annotationsPath := filepath.Join(workdir, "annotations.yml") - schemas, err := parseCliJSON(cliJSONFile) + // The cli.json schema graph is keyed by SDK type name (e.g. + // "jobs.JobSettings"); the annotation parser matches Go SDK types against + // those keys directly. + doc, err := clijson.Parse(cliJSONFile) if err != nil { log.Fatal(err) } + if len(doc.Schemas) == 0 { + log.Fatalf("no schemas found in %s", cliJSONFile) + } - extracted, err := newParser(schemas).extractAnnotations(reflect.TypeFor[config.Root]()) + extracted, err := newParser(doc.Schemas).extractAnnotations(reflect.TypeFor[config.Root]()) if err != nil { log.Fatal(err) } From f71bb884ce8b20c696716d69dc57ee1899f0c101 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Mon, 15 Jun 2026 10:25:03 +0200 Subject: [PATCH 8/8] Address review: prune type graph to the schema's fields The type graph was built from the unpruned schema, so fields the generator deletes (jobs.GitSource.git_snapshot, resources.Pipeline.dry_run) stayed valid graph edges and kept stale PLACEHOLDER entries alive in annotations.yml even though they can never appear in the schema. Build the graph with the structural prune transforms (removeJobsFields, removePipelineFields) applied, via a shared configTypeGraph used by both the generator and TestNoDetachedAnnotations, so the file only documents fields the schema actually emits. The two stale entries are dropped. Also: surface all type-graph drift errors via errors.Join instead of keeping only the last; add a direct test for annotation.File's SetField/SetSelf; document why descriptorToMap/descriptorEmpty rely on a nil reference; and align the two "Dropping annotation" warnings. No change to the generated schema. Co-authored-by: Isaac --- bundle/internal/annotation/file_test.go | 36 ++++++++++++++ bundle/internal/schema/annotations.go | 2 +- bundle/internal/schema/annotations.yml | 6 --- bundle/internal/schema/annotations_file.go | 8 ++- bundle/internal/schema/main.go | 12 ++++- bundle/internal/schema/main_test.go | 4 +- bundle/internal/schema/typegraph.go | 57 ++++++++++++---------- 7 files changed, 87 insertions(+), 38 deletions(-) create mode 100644 bundle/internal/annotation/file_test.go diff --git a/bundle/internal/annotation/file_test.go b/bundle/internal/annotation/file_test.go new file mode 100644 index 00000000000..22d04d93877 --- /dev/null +++ b/bundle/internal/annotation/file_test.go @@ -0,0 +1,36 @@ +package annotation + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFileSetField(t *testing.T) { + f := File{} + + // SetField allocates the type entry and its field map on first use. + f.SetField("pkg.Type", "a", Descriptor{Description: "A"}) + f.SetField("pkg.Type", "b", Descriptor{Description: "B"}) + + assert.Equal(t, "A", f["pkg.Type"].Fields["a"].Description) + assert.Equal(t, "B", f["pkg.Type"].Fields["b"].Description) + + // A later SetField overwrites the field, leaving siblings intact. + f.SetField("pkg.Type", "a", Descriptor{Description: "A2"}) + assert.Equal(t, "A2", f["pkg.Type"].Fields["a"].Description) + assert.Equal(t, "B", f["pkg.Type"].Fields["b"].Description) +} + +func TestFileSetSelf(t *testing.T) { + f := File{} + + f.SetSelf("pkg.Type", Descriptor{Description: "the type"}) + assert.Equal(t, "the type", f["pkg.Type"].Self.Description) + + // SetSelf and SetField populate the same entry without clobbering each + // other. + f.SetField("pkg.Type", "a", Descriptor{Description: "A"}) + assert.Equal(t, "the type", f["pkg.Type"].Self.Description) + assert.Equal(t, "A", f["pkg.Type"].Fields["a"].Description) +} diff --git a/bundle/internal/schema/annotations.go b/bundle/internal/schema/annotations.go index c61cb0f6fce..f204c67581f 100644 --- a/bundle/internal/schema/annotations.go +++ b/bundle/internal/schema/annotations.go @@ -96,7 +96,7 @@ func (d *annotationHandler) syncWithMissingAnnotations(outputPath string, g *typ return err } for _, k := range detached { - fmt.Printf("Dropping annotation for `%s`: no such field in the bundle configuration\n", k) + fmt.Printf("Dropping annotation for `%s`: no matching field in the bundle configuration\n", k) } return nil } diff --git a/bundle/internal/schema/annotations.yml b/bundle/internal/schema/annotations.yml index 853538785cb..b195106b989 100644 --- a/bundle/internal/schema/annotations.yml +++ b/bundle/internal/schema/annotations.yml @@ -1064,9 +1064,6 @@ resources: PLACEHOLDER "git_source": "$fields": - "git_snapshot": - "description": |- - PLACEHOLDER "sparse_checkout": "description": |- PLACEHOLDER @@ -1374,9 +1371,6 @@ resources: path: ./pipeline.py ``` "$fields": - "dry_run": - "description": |- - PLACEHOLDER "ingestion_definition": "$fields": "netsuite_jar_path": diff --git a/bundle/internal/schema/annotations_file.go b/bundle/internal/schema/annotations_file.go index 1e176ccc836..5c93610036a 100644 --- a/bundle/internal/schema/annotations_file.go +++ b/bundle/internal/schema/annotations_file.go @@ -83,6 +83,11 @@ var descriptorKeyOrder = []string{"description", "markdown_description", "title" // descriptorToMap serializes d into dst with its keys ordered. It returns the // nil value (writing nothing) when d carries no content. +// +// The empty check relies on the dyn.NilValue reference: with a nil reference, +// FromTyped omits zero-valued fields, so an all-zero descriptor collapses to +// KindNil rather than an empty map. Do not pass a map reference here, or empty +// descriptors would start serializing as "{}". func descriptorToMap(d annotation.Descriptor, dst map[string]dyn.Value) (dyn.Value, error) { v, err := convert.FromTyped(d, dyn.NilValue) if err != nil || v.Kind() == dyn.KindNil { @@ -91,7 +96,8 @@ func descriptorToMap(d annotation.Descriptor, dst map[string]dyn.Value) (dyn.Val return yamlsaver.ConvertToMapValue(d, yamlsaver.NewOrder(descriptorKeyOrder), []string{}, dst) } -// descriptorEmpty reports whether d carries no documentation. +// descriptorEmpty reports whether d carries no documentation. See +// descriptorToMap for why the nil reference is what makes this work. func descriptorEmpty(d annotation.Descriptor) bool { v, err := convert.FromTyped(d, dyn.NilValue) return err == nil && v.Kind() == dyn.KindNil diff --git a/bundle/internal/schema/main.go b/bundle/internal/schema/main.go index 634bf6f52d7..77f236f420d 100644 --- a/bundle/internal/schema/main.go +++ b/bundle/internal/schema/main.go @@ -206,6 +206,14 @@ func main() { generateSchema(workdir, outputFile, cliJSONFile, docsMode) } +// configTypeGraph builds the type graph for the bundle config root with the +// schema generator's structural field prunes applied, so the annotations file +// only documents fields the generated schema actually contains. Both the +// generator and the detached-annotation test use it to stay in lockstep. +func configTypeGraph() (*typeGraph, error) { + return newTypeGraph(reflect.TypeFor[config.Root](), removeJobsFields, removePipelineFields) +} + func generateSchema(workdir, outputFile, cliJSONFile string, docsMode bool) { annotationsPath := filepath.Join(workdir, "annotations.yml") @@ -225,7 +233,7 @@ func generateSchema(workdir, outputFile, cliJSONFile string, docsMode bool) { log.Fatal(err) } - graph, err := newTypeGraph(reflect.TypeFor[config.Root]()) + graph, err := configTypeGraph() if err != nil { log.Fatal(err) } @@ -235,7 +243,7 @@ func generateSchema(workdir, outputFile, cliJSONFile string, docsMode bool) { log.Fatal(err) } for _, k := range unknown { - fmt.Printf("Dropping annotation at `%s`: no such field in the bundle configuration\n", k) + fmt.Printf("Dropping annotation at `%s`: no matching field in the bundle configuration\n", k) } a, err := newAnnotationHandler(extracted, fromFile) diff --git a/bundle/internal/schema/main_test.go b/bundle/internal/schema/main_test.go index 7d010163686..393674690fc 100644 --- a/bundle/internal/schema/main_test.go +++ b/bundle/internal/schema/main_test.go @@ -5,11 +5,9 @@ import ( "io" "os" "path" - "reflect" "strings" "testing" - "github.com/databricks/cli/bundle/config" "github.com/databricks/cli/libs/dyn" "github.com/databricks/cli/libs/dyn/merge" "github.com/databricks/cli/libs/dyn/yamlloader" @@ -78,7 +76,7 @@ func TestRequiredAnnotationsForNewFields(t *testing.T) { // Checks that the annotations file only contains entries that match the // current bundle configuration structure. func TestNoDetachedAnnotations(t *testing.T) { - g, err := newTypeGraph(reflect.TypeFor[config.Root]()) + g, err := configTypeGraph() require.NoError(t, err) _, unknown, err := loadAnnotationsFile("annotations.yml", g) diff --git a/bundle/internal/schema/typegraph.go b/bundle/internal/schema/typegraph.go index b412844d286..27f6eb2981c 100644 --- a/bundle/internal/schema/typegraph.go +++ b/bundle/internal/schema/typegraph.go @@ -2,8 +2,10 @@ package main import ( "container/list" + "errors" "fmt" "reflect" + "slices" "strings" "github.com/databricks/cli/libs/jsonschema" @@ -32,42 +34,47 @@ type fieldEdge struct { typ string } -func newTypeGraph(root reflect.Type) (*typeGraph, error) { +// newTypeGraph builds the graph for root. The transforms are the schema +// generator's structural field-pruning transforms; they run before each type's +// fields are recorded so the graph mirrors the fields the schema actually +// emits (a field the generator deletes must not be documentable). Annotation- +// dependent prunes like output-only removal are not replicated: those fields +// carry upstream docs, so they never surface as undocumented placeholders. +func newTypeGraph(root reflect.Type, transforms ...func(reflect.Type, jsonschema.Schema) jsonschema.Schema) (*typeGraph, error) { g := &typeGraph{ root: getPath(root), fields: map[string][]fieldEdge{}, } - var ferr error - _, err := jsonschema.FromType(root, []func(reflect.Type, jsonschema.Schema) jsonschema.Schema{ - func(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { - refPath := getPath(typ) - if !strings.HasPrefix(refPath, "github.com") { - return s - } + var errs []error + capture := func(typ reflect.Type, s jsonschema.Schema) jsonschema.Schema { + refPath := getPath(typ) + if !strings.HasPrefix(refPath, "github.com") { + return s + } - var edges []fieldEdge - if typ.Kind() == reflect.Struct { - for _, name := range structFieldOrder(typ, s.Properties) { - edges = append(edges, fieldEdge{name: name, typ: resolveEdgeType(s.Properties[name])}) - } - // structFieldOrder only orders names the schema emitted, so a - // mismatch means its struct walk failed to reach a property — - // i.e. it diverged from the generator's own field handling. - if len(edges) != len(s.Properties) { - ferr = fmt.Errorf("type graph for %s reached %d of %d schema properties", refPath, len(edges), len(s.Properties)) - return s - } + var edges []fieldEdge + if typ.Kind() == reflect.Struct { + for _, name := range structFieldOrder(typ, s.Properties) { + edges = append(edges, fieldEdge{name: name, typ: resolveEdgeType(s.Properties[name])}) + } + // structFieldOrder only orders names the schema emitted, so a + // mismatch means its struct walk failed to reach a property — + // i.e. it diverged from the generator's own field handling. + if len(edges) != len(s.Properties) { + errs = append(errs, fmt.Errorf("type graph for %s reached %d of %d schema properties", refPath, len(edges), len(s.Properties))) } + } - g.fields[refPath] = edges - return s - }, - }) + g.fields[refPath] = edges + return s + } + + _, err := jsonschema.FromType(root, append(slices.Clone(transforms), capture)) if err != nil { return nil, err } - return g, ferr + return g, errors.Join(errs...) } // edge returns the property of the given type with the given name.