@api-emulator/databricks
v0.1.0
Published
Databricks emulator for workspace identity, cluster, job, workspace, and SQL statement REST APIs.
Readme
@api-emulator/databricks
Databricks emulator for workspace identity, cluster, job, workspace, and SQL statement REST APIs.
Part of api-emulator — local drop-in replacement services for CI and no-network sandboxes.
Install
npm install @api-emulator/databricksRun
npx -p api-emulator api --plugin ./@databricks/api-emulator.mjs --service databricksEndpoints
GET /api/2.0/preview/scim/v2/Me— returns the current fake workspace userGET /api/2.0/clusters/list— lists seeded clustersGET /api/2.1/jobs/list— lists jobsPOST /api/2.1/jobs/create— creates a jobPOST /api/2.1/jobs/run-now— creates a completed runGET /api/2.1/jobs/runs/get— fetches a runGET /api/2.0/workspace/list— lists workspace objectsGET /api/2.0/sql/warehouses— lists SQL warehousesPOST /api/2.0/sql/statements— executes a deterministic SQL statement
Auth
Use any fake bearer token, for example Authorization: Bearer dapi-emulator. CLI and SDK smoke tests should point DATABRICKS_HOST at the emulator and use DATABRICKS_TOKEN=dapi-emulator.
Seed Configuration
databricks:
currentUser:
userName: emulator_user
clusters:
- cluster_id: dbc-cluster-0001
state: RUNNING