| name | databricks-upgrade-migration |
| description | Upgrade Databricks runtime versions and migrate between features.
Use when upgrading DBR versions, migrating to Unity Catalog,
or updating deprecated APIs and features.
Trigger with phrases like "databricks upgrade", "DBR upgrade",
"databricks migration", "unity catalog migration", "hive to unity".
|
| allowed-tools | Read, Write, Edit, Bash(databricks:*), Grep |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| compatible-with | claude-code, codex, openclaw |
| tags | ["saas","databricks","migration"] |
Databricks Upgrade & Migration
Overview
Upgrade Databricks Runtime versions and migrate from Hive Metastore to Unity Catalog. Covers version compatibility, deprecated config removal, table migration via SYNC/CTAS, API endpoint updates, and Delta protocol upgrades.
Prerequisites
- Admin access to workspace
- Test environment (dev/staging) for validation before prod
- Inventory of current workloads and dependencies
Instructions
Step 1: Runtime Version Upgrade
Version Compatibility Matrix
| Current DBR | Target DBR | Key Changes | Effort |
|---|
| 12.x LTS | 13.3 LTS | Spark 3.4, Python 3.10 default | Low |
| 13.3 LTS | 14.3 LTS | Spark 3.5, improved AQE, Liquid Clustering GA | Medium |
| 14.x | 15.x LTS | Unity Catalog mandatory, legacy DBFS deprecated | High |
Automated Upgrade Script
from databricks.sdk import WorkspaceClient
w = WorkspaceClient()
def plan_cluster_upgrade(
cluster_id: str,
target_version: str = "14.3.x-scala2.12",
dry_run: bool = True,
) -> dict:
"""Plan and optionally execute a DBR version upgrade."""
cluster = w.clusters.get(cluster_id)
plan = {
"cluster_id": cluster_id,
"cluster_name": cluster.cluster_name,
"current_version": cluster.spark_version,
"target_version": target_version,
"removals": [],
"warnings": [],
}
deprecated = {
"spark.databricks.delta.preview.enabled": "GA in 13.x+",
"spark.sql.legacy.createHiveTableByDefault": ,
: ,
: ,
}
key, reason deprecated.items():
cluster.spark_conf key cluster.spark_conf:
plan[].append({: key, : reason})
target_version target_version:
plan[].append()
dry_run:
clean_conf = {
k: v k, v (cluster.spark_conf {}).items()
k deprecated
}
w.clusters.edit(
cluster_id=cluster_id,
spark_version=target_version,
cluster_name=cluster.cluster_name,
spark_conf=clean_conf,
node_type_id=cluster.node_type_id,
num_workers=cluster.num_workers,
)
plan[] =
:
plan[] =
plan
cluster w.clusters.():
plan = plan_cluster_upgrade(cluster.cluster_id, dry_run=)
plan[] plan[]:
()
r plan[]:
()
w_ plan[]:
()