@Aravind Raam - Thanks for the question and using MS Q&A platform.
To optimize resource usage with jobs that orchestrate multiple tasks, use shared job clusters. A shared job cluster allows multiple tasks in the same job run to reuse the cluster. You can use a single job cluster to run all tasks that are part of the job, or multiple job clusters optimized for specific workloads. To use a shared job cluster:
- Select New Job Clusters when you create a task and complete the cluster configuration.
- Select the new cluster when adding a task to the job, or create a new job cluster. Any cluster you configure when you select New Job Clusters is available to any task in the job.
For more details, refer to Use shared job clusters.
OR
There is a way to configure the same job cluster for multiple jobs that are part of the same workflow in Azure Databricks. You can use a single job cluster for all the jobs in your workflow by creating a Databricks cluster and then using that cluster for all the jobs in your workflow.
For more details, refer to https://stackoverflow.com/questions/76716693/how-to-run-same-databricks-notebook-from-different-job-concurrently.
OR
To do this, you can create a Databricks cluster with the required configuration and then specify that cluster as the job cluster for all the jobs in your workflow. You can do this by setting the existing_cluster_id
parameter in the job configuration to the ID of the cluster you created.
Here's an example of how you can set the existing_cluster_id
parameter in the job configuration:
{
"name": "job1",
"new_cluster": false,
"existing_cluster_id": "1234-567890-abcdefg",
"notebook_task": {
"notebook_path": "/path/to/notebook",
"base_parameters": {
"param1": "value1",
"param2": "value2"
}
}
}
In this example, the existing_cluster_id
parameter is set to the ID of the cluster you created. You can use this same configuration for all the jobs in your workflow, and they will all use the same cluster.
Hope this helps. Do let us know if you any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.