โ06-12-2024 06:02 AM
Hi all,
I am calling get job run list API to get all task ids and refer them in dbt-artifacts view created by dbt job run. The question is I can see 'task run id' on screen but it doesn't come back in api response? Is there a way to get it? I checked all the other api's for task_id in it but have no luck!
โ06-12-2024 12:39 PM
Never mind, I have found task_run_id present in getrun api
https://docs.databricks.com/api/azure/workspace/jobs/getrun
I overlooked at first instance as it is buried under nested json structure
tasks[] > run_id.
This clarifies and solves my problem!
โ06-12-2024 06:45 AM
@Gaurav19
I can see in the documentation that /api/2.1/jobs/runs/list contains the run_id. https://docs.databricks.com/api/workspace/jobs/listruns
It's hard to tell what is wrong based on screenshot. Could you share some more details?
โ06-12-2024 08:06 AM
@daniel_sahal - thanks for responding!
In the screenshot, you can see "Job ID", "Job run ID" and "Task run ID". I need the third one "Task run ID" - the list API does return run_id as you mentioned, but it is "Job run ID".
to give a context: I need the task id to find which dbt model and test got executed as part of the run - I am executing below query for that to co-relate a job run with model/test execution from dbt-artifacts:
โ06-12-2024 12:39 PM
Never mind, I have found task_run_id present in getrun api
https://docs.databricks.com/api/azure/workspace/jobs/getrun
I overlooked at first instance as it is buried under nested json structure
tasks[] > run_id.
This clarifies and solves my problem!
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