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:ย 

Get job run_id of run_job_task in an orchestration job

MihaiTache
Visitor

Hi,

I have a Databricks job which orchestrates the run of two jobs: job1 and job2 using run_job_task.

job2 depends on job1 and would need to use the run_id of job1 as a parameter. How can this be done?

I see that you can only easily access the task run id of the job {{tasks.job1.run_id}}

 

3 REPLIES 3

filipniziol
Contributor

Hi @MihaiTache ,

It seems you have found the answer. Do you need any other help?

{{tasks.job1.run_id}} provides the task run_id of the task under which job1 is run. What I'm looking for is the actual job run_id of job1, which doesn't seem available at first glance.

Hi @MihaiTache ,

thank you for clarification.
As per documentation this value reference is not available out-of-the-box:
What is a dynamic value reference? | Databricks on AWS

A workaround is to use shared location available for 2 jobs.
As part of job1 you would store its value and job2 would read the saved value from shared location.

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