Databricks Data Engineer Professional Question 307
Select 2You are tasked with creating a workflow where a Databricks job is cloned, executed, and its run output is exported for analysis. Using the Databricks REST API, which of the following steps are required to achieve this workflow?
- A
Use the POST /jobs/create endpoint to clone the job.
- B
Use the POST /jobs/run-now endpoint to trigger the run of the cloned job.
- C
Use the GET /jobs/get-output endpoint to retrieve the run output.
- D
Use the POST /jobs/update endpoint to modify the job configuration before triggering the run.
- E
Use the DELETE /jobs/delete endpoint to clean up the original job after cloning.
Show answer and explanation
Correct answers: B, C
Explanation
To clone a job, you typically retrieve the existing job's configuration using the GET /jobs/get endpoint and then re-use that configuration with POST /jobs/create. After cloning, the POST /jobs/run-now endpoint is used to trigger the execution of the cloned job. Once the job run is completed, the GET /jobs/get-output endpoint allows retrieval of the run output. Modifying or deleting jobs is not required for this workflow.
- A. Incorrect.
Incorrect: To clone a job, you do not use the POST /jobs/create endpoint. Instead, you use the POST /jobs/create endpoint with the configuration of an existing job, which involves retrieving the job details first using GET /jobs/get.
- B. Correct.
Correct: The POST /jobs/run-now endpoint is used to trigger an immediate run of a specified job, including a cloned one.
- C. Correct.
Correct: The GET /jobs/get-output endpoint retrieves the output of a completed run, which is essential for analyzing the results of the workflow.
- D. Incorrect.
Incorrect: The POST /jobs/update endpoint is used for modifying an existing job configuration but is not required for cloning or triggering a job run.
- E. Incorrect.
Incorrect: The DELETE /jobs/delete endpoint is used to delete jobs, which is not a required step in the given workflow.