Go SDK for the Databricks platform. Auto-generated API clients from OpenAPI specs, with hand-written authentication, configuration, and transport infrastructure.
For scoped coding rules, skills, and prompt templates, see the .agent/ directory.
- api-design.md — API design principles for the Databricks SDK.
- error-handling.md — Error handling conventions for the Databricks SDK.
- style-guide.md — Go code style and naming conventions for the Databricks SDK.
- testing.md — Testing standards and anti-patterns for the Databricks SDK.
- write-pr-description — Write or improve a GitHub pull request description.
- code-review.md — Review PR or code changes for backward compatibility, correctness, and style.
Prerequisites: Go 1.24+ (see go.mod), goimports, staticcheck, gotestsum.
make build # go build ./...
make test # Unit tests with coverage
make fmt # goimports + gofmt
make lint # staticcheck ./...
make integration # Integration tests (requires cloud env)
make vendor # Vendor dependencies
make coverage # View HTML coverage report
make codegen # Regenerate service/ from OpenAPI specsCI runs make test across Go 1.24, 1.25, and 1.26; lint and fmt run on Go 1.26.
Code must compile on all CI versions — do not use stdlib APIs newer than Go 1.24
(the module's minimum version in go.mod) without a local shim.
├── apierr/ # API error types and handling
├── client/ # High-level DatabricksClient (wraps workspace + account APIs)
├── config/ # Authentication and client configuration (core, hand-written)
├── credentials/ # Credential providers (OAuth, PAT, Azure, GCP, etc.)
├── experimental/ # Experimental features and generated mocks
├── httpclient/ # HTTP transport layer, request/response handling
├── internal/ # Internal utilities
├── listing/ # Iterator patterns for paginated API responses
├── logger/ # Logging infrastructure
├── marshal/ # JSON marshalling utilities
├── openapi/ # Code generator (reads OpenAPI specs, generates service/)
├── retries/ # Retry logic and policies
├── service/ # Auto-generated API service clients (DO NOT EDIT)
├── useragent/ # User-agent string construction
├── .codegen/ # Code generation templates (.tmpl files)
└── qa/ # Integration test helpers (RandomName, RandomEmail, etc.)
service/— API service clients, generated from OpenAPI specs. Every file starts with// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.experimental/mocks/— Mock implementations, generated by mockery. Every file starts with// Code generated by mockery. DO NOT EDIT.
To regenerate: make codegen (requires OpenAPI specs).
After regenerating, run make fmt and make lint.
Hand-written code lives in: config/, credentials/, httpclient/, apierr/,
listing/, retries/, marshal/, logger/, useragent/, client/, internal/, openapi/.
- Do NOT edit files in
service/orexperimental/mocks/— they are auto-generated and will be overwritten - Do NOT use
context.Background()in production code (only in tests) - Do NOT add new files to
service/manually — update OpenAPI specs and runmake codegen - Do NOT add dependencies without checking license compatibility (Apache 2.0 required)
- Do NOT break backwards compatibility of exported APIs without discussion
- Do NOT use
os.Exit()outside ofmain.goentry points
- New API service client? → Update OpenAPI spec, run
make codegen - New auth method? →
credentials/(implementCredentialsProviderinterface) - Auth config change? →
config/ - HTTP transport change? →
httpclient/ - New error type? →
apierr/ - New pagination pattern? →
listing/ - Retry logic change? →
retries/ - Code generation change? →
openapi/and.codegen/templates - Experimental/unstable API? →
experimental/orconfig/experimental/
PR template requires: Changes (linked issues + functionality) and Tests sections.
All PRs must have the DCO sign-off (git commit -s).
Run make fmt test lint before submitting.
Every PR must update NEXT_CHANGELOG.md under the appropriate section
(Breaking Changes, New Features and Improvements, Bug Fixes, Documentation,
Internal Changes, or API Changes). CI will fail if the file is not modified.
For PRs that don't need a changelog entry (e.g., documentation-only, CI config,
agentic coding infrastructure), add NO_CHANGELOG=true to the PR description body.