cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How Can I update the DBR versions of all my jobs in one go?

brickster_2018
Databricks Employee
Databricks Employee

I keep it a point to use the latest DBR versions for my workloads and mostly we leverage those new features. But I have 300 jobs on the Databricks workspace and updating the DBR versions for each job manually is difficult to do. Any quick hack

1 ACCEPTED SOLUTION

Accepted Solutions

brickster_2018
Databricks Employee
Databricks Employee

Below code snippet can be helpful if you are using Databricks CLI

for jobid in `databricks jobs list | awk '{print $1}'`;
 do databricks jobs get --job-id $jobid | jq .settings > /tmp/jobs/$jobid.json; done
 
sed -i 's/"spark_version": ".*"/"spark_version": "6.4.x-scala2.11"/g' *
 
for jobid in `databricks jobs list | awk '{print $1}'`; do
databricks jobs reset --job-id $jobid --json-file /tmp/jobs/$jobid.json;
done

View solution in original post

1 REPLY 1

brickster_2018
Databricks Employee
Databricks Employee

Below code snippet can be helpful if you are using Databricks CLI

for jobid in `databricks jobs list | awk '{print $1}'`;
 do databricks jobs get --job-id $jobid | jq .settings > /tmp/jobs/$jobid.json; done
 
sed -i 's/"spark_version": ".*"/"spark_version": "6.4.x-scala2.11"/g' *
 
for jobid in `databricks jobs list | awk '{print $1}'`; do
databricks jobs reset --job-id $jobid --json-file /tmp/jobs/$jobid.json;
done

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group