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 ID from Asset Bundles

robbe
New Contributor III

When using Asset Bundles to deploy jobs, how does one get the job ID of the resources that are created?

I would like to deploy some jobs through asset bundles, get the job IDs, and then trigger these jobs programmatically outside the CI/CD pipeline using the rest API in Python. Though the output of the databricks bundle deploy command does not seem to include the ID of the jobs that are created so I can't pass them to subsequent steps / other systems.

I understand that I can get the job ID using the UI but I would like to orchestrate my CI/CD without the need to provide a manual input.

Thank you in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

mhiltner
Contributor III

Hey, not sure if this will do the trick, but i've thought about two workarounds:

1. Check if the "databricks bundle run my_job" suits your case. It accepts the name as the key to run here. 

2. Would it be an option for you to use databricks jobs list command (you can also filter with job names) and extract the job id? 

View solution in original post

2 REPLIES 2

mhiltner
Contributor III

Hey, not sure if this will do the trick, but i've thought about two workarounds:

1. Check if the "databricks bundle run my_job" suits your case. It accepts the name as the key to run here. 

2. Would it be an option for you to use databricks jobs list command (you can also filter with job names) and extract the job id? 

robbe
New Contributor III

Thanks @mhiltner. I don't need to run jobs, just to get the ID. So I think that solution 2) is the way to go here. I'll accept the solution.

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