
Answer-first summary for fast verification
Answer: Initiate the job run by making a POST request to the '/2.0/jobs/run-now' endpoint with the job ID, then access the output by making a GET request to the '/2.0/jobs/runs/get' endpoint, including the 'run_id' parameter obtained from the run-now response.
Option C is the correct approach because it accurately describes the process of triggering a job run using the '/2.0/jobs/run-now' endpoint and retrieving the output with the '/2.0/jobs/runs/get' endpoint by specifying the 'run_id' parameter. This method ensures that the job is triggered efficiently and the output is retrieved correctly, leveraging the Databricks REST API's capabilities for automation and scalability. The other options either misuse the API endpoints or lack the necessary parameters to successfully complete the task.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In a scenario where you are working with Databricks on Azure and need to automate the process of triggering a job run and subsequently retrieving its output for analysis, which of the following approaches correctly utilizes the Databricks REST API to achieve this? Consider the need for efficiency, scalability, and the correct use of API endpoints and parameters. Choose the best option from the following:
A
Trigger the job run by making a POST request to the '/2.0/jobs/run-now' endpoint with the necessary job parameters, then retrieve the output by making a GET request to the '/2.0/jobs/export' endpoint without specifying any parameters.
B
Submit the job run by making a POST request to the '/2.0/jobs/runs/submit' endpoint with the job configuration, then fetch the output by making a GET request to the '/2.0/jobs/runs/get' endpoint, including the 'run_id' parameter in the request.
C
Initiate the job run by making a POST request to the '/2.0/jobs/run-now' endpoint with the job ID, then access the output by making a GET request to the '/2.0/jobs/runs/get' endpoint, including the 'run_id' parameter obtained from the run-now response.
D
Start the job run by making a POST request to the '/2.0/jobs/submit' endpoint with the job details, then download the output by making a GET request to the '/2.0/jobs/export-output' endpoint, including the 'run_id' parameter.