10-18-2024 03:25 AM
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}}
10-18-2024 05:31 AM
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.
10-18-2024 04:47 AM
Hi @MihaiTache ,
It seems you have found the answer. Do you need any other help?
10-18-2024 05:03 AM
{{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.
10-18-2024 05:31 AM
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.
10-18-2024 07:56 AM - edited 10-18-2024 07:57 AM
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