Contents

Chapter 1

Databricks Workspace Toolkit

Databricks Workspace Toolkit

Automate Databricks workspace management β€” clusters, jobs, secrets, Unity Catalog, and permissions.

Stop clicking through the UI. Manage your entire Databricks workspace programmatically with production-ready Python wrappers around the Databricks REST APIs.



What You Get

  • Workspace management β€” List, create, delete, import/export notebooks programmatically
  • Cluster automation β€” Create clusters, resize, manage pools, enforce auto-termination policies
  • Job orchestration β€” Create multi-task workflows, manage schedules, configure notifications
  • Secret management β€” Create scopes, store secrets, manage ACLs for secure credential handling
  • Unity Catalog setup β€” Bootstrap catalogs, schemas, tables, grants, and external locations
  • Permissions manager β€” Configure RBAC for clusters, jobs, notebooks, and SQL warehouses
  • Cluster policies β€” Cost control templates with instance type restrictions and spot pricing
  • Job templates β€” Ready-to-use ETL and ML training job definitions
  • Shell scripts β€” Bootstrap workspace setup and backup/export notebooks
  • Admin dashboard β€” Databricks notebook showing cluster usage, job status, and costs

File Tree

databricks-workspace-toolkit/
β”œβ”€β”€ README.md
β”œβ”€β”€ manifest.json
β”œβ”€β”€ LICENSE
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ workspace_manager.py       # Notebook CRUD, import/export
β”‚   β”œβ”€β”€ cluster_manager.py         # Cluster lifecycle, pools, policies
β”‚   β”œβ”€β”€ job_manager.py             # Jobs API: create, run, notifications
β”‚   β”œβ”€β”€ secret_manager.py          # Secret scopes and ACLs
β”‚   β”œβ”€β”€ unity_catalog_setup.py     # UC bootstrap: catalogs, schemas, grants
β”‚   └── permissions_manager.py     # RBAC for workspace resources
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ cluster_policies.json      # Cost control cluster policies
β”‚   β”œβ”€β”€ workspace_config.yaml      # Environment configuration
β”‚   └── job_templates/
β”‚       β”œβ”€β”€ etl_job.json           # Multi-task ETL pipeline job
β”‚       └── ml_training_job.json   # ML training with GPU cluster
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ setup_workspace.sh         # Bootstrap workspace setup
β”‚   └── export_workspace.sh        # Backup notebooks and configs
β”œβ”€β”€ notebooks/
β”‚   └── admin_dashboard.py         # Admin overview dashboard
└── guides/
    └── workspace-management.md    # Best practices guide
Chapter 2

Getting Started

Follow this guide to get databricks workspace toolkit up and running in your environment.

Getting Started

1. Configure Your Workspace

yaml
# configs/workspace_config.yaml
workspace:
  host: "https://adb-1234567890.12.azuredatabricks.net"
  token_env_var: "DATABRICKS_TOKEN"

2. Create a Cluster

python
from src.cluster_manager import ClusterManager

mgr = ClusterManager.from_config("configs/workspace_config.yaml")
cluster_id = mgr.create_cluster(
    name="etl-cluster-prod",
    node_type_id="Standard_DS3_v2",
    num_workers=4,
    auto_terminate_minutes=30,
    spark_conf={"spark.sql.shuffle.partitions": "200"},
)

3. Create a Multi-Task Job

python
from src.job_manager import JobManager

mgr = JobManager.from_config("configs/workspace_config.yaml")
job_id = mgr.create_job_from_template("configs/job_templates/etl_job.json")
mgr.run_now(job_id)

Architecture

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚           Databricks Workspace           β”‚
 β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
 β”‚  β”‚Clustersβ”‚ β”‚  Jobs  β”‚ β”‚Unity Catalogβ”‚ β”‚
 β”‚  β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜ β”‚
 β”‚      β”‚          β”‚             β”‚         β”‚
 β”‚  β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”     β”‚
 β”‚  β”‚     Databricks REST APIs       β”‚     β”‚
 β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚     Workspace Toolkit (this product)    β”‚
 β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
 β”‚  β”‚ Cluster  β”‚ β”‚   Job   β”‚ β”‚  Unity  β”‚ β”‚
 β”‚  β”‚ Manager  β”‚ β”‚ Manager β”‚ β”‚ Catalog β”‚ β”‚
 β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
 β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
 β”‚  β”‚Workspace β”‚ β”‚ Secret  β”‚ β”‚ Perms   β”‚ β”‚
 β”‚  β”‚ Manager  β”‚ β”‚ Manager β”‚ β”‚ Manager β”‚ β”‚
 β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Chapter 3
πŸ”’ Available in full product

Requirements

You’ve reached the end of the free preview

Get the full Databricks Workspace Toolkit and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $59 →
πŸ“¦ Free sample included — download another copy for the full product.
Databricks Workspace Toolkit v1.0.0 β€” Free Preview