Skip to content
cloudemu
Services

Databricks

Azure Databricks ARM workspace control plane plus a workspace data plane the real databricks-sdk-go drives end-to-end

azr Databricks

Emulates both layers of Azure Databricks — the ARM workspace control plane (Microsoft.Databricks/workspaces) that provisions a workspace and the workspace data plane (Databricks REST API) that runs clusters, jobs, and more inside it. The real databricks-sdk-go, pointed at the emulator, creates a workspace over ARM, discovers its URL, and then drives the data plane against in-memory state.

Reach for it in tests when your code stands up a workspace and then operates on it — creating clusters, submitting jobs, managing policies — so you can cover that full ARM-then-data-plane flow without a real Databricks account. Both layers share one backend, so a workspace created over ARM is immediately usable over the data-plane API.

ProviderServiceSDK-compatDriver
AzureDatabricks (ARM workspace + workspace data plane)✓ Liveazure.Databricks

Drive both layers with the real SDK#

Register the same mock as both the ARM control plane and the data plane, then let databricks-sdk-go walk the real flow — provision over ARM, read the returned URL, operate against it. The config-discovery endpoint is served automatically, so no manual workspace configuration is needed:

import (
    "github.com/stackshy/cloudemu/v2"
    azureserver "github.com/stackshy/cloudemu/v2/server/azure"
)

cp := cloudemu.NewAzure()
ts := httptest.NewTLSServer(azureserver.New(azureserver.Drivers{
    Databricks:          cp.Databricks, // ARM control plane
    DatabricksDataPlane: cp.Databricks, // workspace data plane (same backend)
}))

// databricks-sdk-go clients:
//   1. Create the workspace via ARM (armdatabricks).
//   2. Read the returned WorkspaceURL, which points at this server's data plane.
//   3. Call clusters/jobs/etc. against that URL — the SDK's config-discovery
//      endpoint (/.well-known/databricks-config) is served automatically.

See the SDK-Compat Server page for the Azure TLS setup.

Drive both layers with the Portable Go API#

The azure.Databricks mock implements both driver interfaces, so you can provision a workspace and operate its data plane directly — create the workspace, spin up a cluster, then kick off a job run:

import dbxdriver "github.com/stackshy/cloudemu/v2/services/databricks/driver"

ws, _ := azure.Databricks.CreateWorkspace(ctx, dbxdriver.WorkspaceConfig{
    Name: "analytics", ResourceGroup: "rg-prod", Location: "eastus",
})

cluster, _ := azure.Databricks.CreateCluster(ctx, dbxdriver.ClusterConfig{
    Name: "etl", SparkVersion: "14.3.x-scala2.12",
    NodeTypeID: "Standard_D4s_v3", NumWorkers: 2,
})

runID, _ := azure.Databricks.RunJobNow(ctx, jobID)

Behavior & fidelity#

BehaviorWhat happens
Deterministic workspace URLCreateWorkspace synthesizes an adb-{workspaceId}.{shard}.azuredatabricks.net host from a numeric ID derived from the resource group and name, so identical inputs always yield the same URL.
Auto-discovery is servedThe /.well-known/databricks-config host-metadata endpoint lets databricks-sdk-go locate the workspace automatically.
Shared backendThe ARM control plane and data plane share one in-memory store, so a workspace created over ARM is immediately usable over the data-plane API.
Extended ARM is store-and-echoBeyond workspaces, the ARM resources persist and list faithfully, but the underlying Azure networking side effects are not simulated.
Access connectors get an identityA system-assigned access-connector identity is synthesized with principal and tenant IDs.
Peerings auto-connectA created VNet peering springs to Connected/Succeeded.

SDK-compat — Live#

The real databricks-sdk-go drives both layers end-to-end; the same semantics are available through the Portable Go API above.

LayerCoverage
ARM control planeWorkspaces, access connectors, private endpoints and links, VNet peerings, outbound dependencies, operations
Data plane (core)Clusters, instance pools, jobs, runs, cluster policies, libraries, permissions
Data plane (nested)DBFS, Repos, Git credentials, Secrets, workspace files, SCIM, tokens, pipelines, query history, SQL warehouses, serving endpoints, Unity Catalog

See SDK-Compat for the full per-operation list.

On this page

On this page