Databricks Data Engineer Professional Question 306
Select 2You are a data engineer tasked with deploying a Databricks job using the Databricks CLI. The job executes a notebook that performs ETL operations on a Delta table. After deploying the job, you need to monitor its execution and retrieve its run status. Which set of Databricks CLI commands would you use to achieve this?
- A
Use the
databricks jobs createcommand to deploy the job and thedatabricks jobs listcommand to retrieve the job's status. - B
Use the
databricks jobs createcommand to deploy the job and thedatabricks jobs run-nowcommand to trigger the job and monitor its run status. - C
Use the
databricks jobs uploadcommand to deploy the job and thedatabricks jobs runs-getcommand to retrieve the job's run status. - D
Use the
databricks jobs createcommand to deploy the job and thedatabricks jobs runs-getcommand to monitor the job's execution. - E
Use the
databricks jobs run-nowcommand to deploy and trigger the job and thedatabricks jobs runs-listcommand to monitor the job's execution history.
Show answer and explanation
Correct answers: B, D
Explanation
To deploy a Databricks job using the CLI, the databricks jobs create command is used. To monitor the job, you can either trigger it using databricks jobs run-now or retrieve its status with databricks jobs runs-get. Both approaches are valid for deployment and monitoring, making options 2 and 4 correct.
- A. Incorrect.
The
databricks jobs createcommand is valid for deploying a job, but thedatabricks jobs listcommand only lists jobs and does not provide specific run status details. - B. Correct.
This is correct. The
databricks jobs createcommand is used to deploy the job, and thedatabricks jobs run-nowcommand triggers the job and provides details about the run. - C. Incorrect.
The
databricks jobs uploadcommand is invalid for job deployment. Thedatabricks jobs runs-getcommand can retrieve specific run details, but the deployment step here is incorrect. - D. Correct.
This is correct. The
databricks jobs createcommand is used to deploy the job, and thedatabricks jobs runs-getcommand retrieves the status of a specific job run. - E. Incorrect.
The
databricks jobs run-nowcommand can trigger a job but cannot deploy it. Additionally, while thedatabricks jobs runs-listcommand provides a history of runs, it is not specific to monitoring a single job's execution in real-time.