Databricks Data Engineer Professional Question 298
Select 3You are tasked with configuring the Databricks CLI to automate interactions with your Databricks workspace. After installing the CLI, what steps must you perform to authenticate and verify your configuration before executing commands such as creating a cluster?
- A
Generate a personal access token from the Databricks user interface and configure the CLI using the token.
- B
Use the
databricks configurecommand to authenticate and set the host and token information. - C
Verify the CLI configuration by running the
databricks clusters listcommand to ensure it returns valid results. - D
Directly use the Databricks CLI without authentication, as it automatically inherits permissions from your cloud environment.
- E
Manually edit the Databricks CLI configuration file to include your username and password for authentication.
Show answer and explanation
Correct answers: A, B, C
Explanation
To use the Databricks CLI, you must first configure it with a personal access token generated from the Databricks UI. The databricks configure command is used to set up the host and token. To verify the configuration, you can run a simple command like databricks clusters list. Other methods, such as inheriting permissions from the cloud environment or using username/password authentication, are not supported by the Databricks CLI.
- A. Correct.
Correct: A personal access token is required for authentication with the Databricks CLI. This token must be generated from the Databricks user interface under the User Settings section.
- B. Correct.
Correct: The
databricks configurecommand is the standard way to set up the CLI by providing the Databricks workspace host URL and the personal access token. - C. Correct.
Correct: Running a command like
databricks clusters listensures that the CLI is correctly configured and can interact with the Databricks workspace. - D. Incorrect.
Incorrect: The Databricks CLI does not inherit permissions from the cloud environment. Explicit authentication is required using a personal access token.
- E. Incorrect.
Incorrect: The Databricks CLI does not support username and password authentication. Authentication must be done using a personal access token.