cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

How to build master workflow for all the jobs present in workflow using databricks?

Ria
New Contributor

Suppose there are multiple job have been created using databricks workflow, now the requirement is to make one master workflow to trigger all the workflow depending on different condition like: some are supposed to trigger on daily basis, some on monthly basis, and some on weekly basis. Other condition to be checked is, before executing a job we need to check its dependency over other job, if So then we have to execute that workflow first then trigger next.

4 REPLIES 4

Ajay-Pandey
Esteemed Contributor III

Hi @Riya Vadhwani​ ,

Till now you cannot call databricks workflow job from another job, you can use databricks workflow job API to run your other job.

Please refer to this link for more information regarding JOB API

Anonymous
Not applicable

Hi @Riya Vadhwani​ 

Hope everything is going great.

Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you. 

Cheers!

erigaud
Honored Contributor

A nice way to do this is to use the databricks python sdk : 

 

 

 

(%pip install databricks-sdk)

from databricks.sdk import WorkspaceClient
if condition:
    DATABRICKS_HOST = "your-hostname"
    DATABRICKS_TOKEN = "your-personnal-access-token"
    w = WorkspaceClient(host=DATABRICKS_HOST, token=DATABRICKS_TOKEN)
    w.jobs.run_now(your-job-id)

 

 

pvignesh92
Honored Contributor

@Ria Hi , This feature was in development when I attended last Quarter Roadmap and I thought it is available in the latest versions or could be even in Private Preview. You can check with your Databricks Solution Architect. Even if not now, could be coming up pretty soon. 

pvignesh92_0-1689342038661.png

 

 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.