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 to update num_workers dynamically in a job cluster

NickLee
New Contributor III

I am setting up a workflows with the UI. In the first task, a dynamic value for the next task's num_workers is calculated based on actual data size. In the subsequent task, I'd like to use this calculated num_workers to update the job cluster's default num_workers. Is this possible? Thanks.

NickLee_0-1722018584496.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Kaniz_Fatma
Community Manager
Community Manager

Hi @NickLeeTo dynamically update the num_workers in a job cluster within Azure Databricks, you can utilize the Jobs API 2.0. This allows you to modify job settings, including the number of worker nodes, based on dynamically calculated values from previous tasks in your workflow.

View solution in original post

3 REPLIES 3

NickLee
New Contributor III

wonder if anyone has similar experience? thanks

Kaniz_Fatma
Community Manager
Community Manager

Hi @NickLeeTo dynamically update the num_workers in a job cluster within Azure Databricks, you can utilize the Jobs API 2.0. This allows you to modify job settings, including the number of worker nodes, based on dynamically calculated values from previous tasks in your workflow.

NickLee
New Contributor III

Thank you! Will give it a try.

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