{"id":1036,"date":"2023-07-07T14:26:23","date_gmt":"2023-07-07T14:26:23","guid":{"rendered":"https:\/\/bandittracker.com\/?p=1036"},"modified":"2023-07-07T14:26:24","modified_gmt":"2023-07-07T14:26:24","slug":"run-a-job-from-a-databricks-notebook","status":"publish","type":"post","link":"https:\/\/bandittracker.com\/run-a-job-from-a-databricks-notebook\/","title":{"rendered":"How To Run A Job From A Databricks Notebook"},"content":{"rendered":"\n

A common Databricks task is to schedule a job that calls a notebook. However, sometimes you will want to do this in reverse. In other words, you want to run a notebook that launches a job.<\/p>\n\n\n\n

This is most likely when you have set up a job that you want to test without creating a new task. It’s also handy when you are testing how a job performs repeatedly i.e. you want to run it multiple times in a loop.<\/p>\n\n\n\n

There are two ways to do this. Both methods use the REST API that Databricks provides to interact with jobs. This article walks through each method with examples.<\/p>\n\n\n\n

\n

Table of Contents<\/p>\n