Databricks Data Engineer Professional Question 300
Select 4You are a data engineer tasked with deploying a notebook to a Databricks workspace and starting a cluster using the Databricks CLI. Before executing any commands, you need to ensure that the CLI is properly authenticated. Which of the following steps are required to authenticate the Databricks CLI and perform the task successfully?
- A
Generate a Databricks access token and configure the CLI using
databricks configure --token. - B
Install the Databricks CLI using
pip install databricks-cli. - C
Execute the
databricks workspace importcommand directly without configuring the CLI. - D
Configure the Databricks CLI to use a profile with workspace and token details.
- E
Start the cluster using the Databricks CLI command
databricks clusters start.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To interact with the Databricks workspace and clusters using the CLI, you must first install the CLI, authenticate it by generating an access token, and configure it with the appropriate workspace details. After configuration, you can execute commands such as databricks clusters start or databricks workspace import. Skipping the authentication or configuration steps will result in errors when using CLI commands.
- A. Correct.
Correct: To authenticate the Databricks CLI, you need to generate an access token in the Databricks UI and configure the CLI using the
databricks configure --tokencommand. - B. Correct.
Correct: The Databricks CLI must be installed on your system using a package manager like pip before you can use it.
- C. Incorrect.
Incorrect: The
databricks workspace importcommand cannot be executed without prior configuration of the CLI, as the CLI needs to be authenticated first. - D. Correct.
Correct: Configuring the CLI with a profile that includes workspace and token information is essential for interacting with the workspace.
- E. Correct.
Correct: To start a cluster, you must use the
databricks clusters startcommand after configuring the CLI and ensuring it is authenticated.