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

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now