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
New Contributor III
New 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
New Contributor III
New 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.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!