Databricks Data Engineer Professional Question 305
Single answerYou are tasked with deploying a Databricks job using the Databricks CLI. The job's configuration is defined in a JSON file named job-config.json. Which command would you use to deploy the job to Databricks?
- A
databricks jobs create --json-file job-config.json
- B
databricks jobs deploy --json-file job-config.json
- C
databricks jobs run-now --json-file job-config.json
- D
databricks jobs update --json-file job-config.json
Show answer and explanation
Correct answer: A
Explanation
To deploy a new job in Databricks using the CLI, the databricks jobs create command must be used along with the --json-file option to specify the job configuration file. Other commands like run-now or update are used for different purposes, and deploy is not a valid subcommand in the Databricks CLI.
- A. Correct.
This is the correct command to create a new Databricks job using a configuration JSON file.
- B. Incorrect.
This is an incorrect command because
databricks jobs deployis not a valid Databricks CLI subcommand. - C. Incorrect.
This is incorrect because
databricks jobs run-nowis used to immediately execute an existing job, not to create or deploy a new one. - D. Incorrect.
This is incorrect because
databricks jobs updateis used to update an existing job, not to create a new job.