Databricks Data Engineer Professional Question 304
Select 1You are tasked with deploying a Databricks job using the Databricks CLI. After deployment, you need to monitor its execution and retrieve the latest run status. Which sequence of CLI commands would you use to achieve this?
- A
Use
databricks jobs createto deploy the job, thendatabricks jobs run-nowto trigger it, and finallydatabricks runs getto retrieve the latest run status. - B
Use
databricks jobs deployto deploy the job, thendatabricks jobs startto trigger it, and finallydatabricks jobs statusto check the latest run status. - C
Use
databricks jobs createto deploy the job, thendatabricks runs submitto trigger it, and finallydatabricks runs getto fetch the latest run status. - D
Use
databricks jobs createto deploy the job, thendatabricks jobs run-nowto trigger it, and finallydatabricks jobs getto fetch the latest run status. - E
Use
databricks jobs createto deploy the job, thendatabricks runs submitto trigger it, and finallydatabricks jobs getto fetch the latest run status.
Show answer and explanation
Correct answer: A
Explanation
To deploy and monitor Databricks jobs using the CLI, you must first deploy the job configuration using databricks jobs create. To execute the job, the databricks jobs run-now command is used. Finally, you can monitor the job's execution and retrieve its runtime details using databricks runs get. This sequence ensures proper deployment, execution, and monitoring of jobs.
- A. Correct.
This is the correct sequence of commands. The
databricks jobs createcommand is used to deploy the job configuration,databricks jobs run-nowtriggers the job, anddatabricks runs getretrieves details about the latest job run, including its status. - B. Incorrect.
This is incorrect because there is no
databricks jobs deployordatabricks jobs statuscommand in the Databricks CLI. - C. Incorrect.
This is incorrect because
databricks runs submitis used for submitting runs manually using a JSON payload, not for triggering a job that has already been deployed. - D. Incorrect.
This is incorrect because
databricks jobs getretrieves information about job configurations, not the runtime status of a particular job run. - E. Incorrect.
This is incorrect because
databricks runs submitis not the correct command to trigger an already created job, anddatabricks jobs getdoes not provide run status information.