nerdexam
Databricks

CERTIFIED-DATA-ENGINEER-PROFESSIONAL · Question #6

The security team is exploring whether or not the Databricks secrets module can be leveraged for connecting to an external database. After testing the code with all Python variables being defined with

The correct answer is E. The connection to the external table will succeed; the string "redacted" will be printed.. This is the correct answer because the code is using the dbutils.secrets.get method to retrieve the password from the secrets module and store it in a variable. The secrets module allows users to securely store and access sensitive information such as passwords, tokens, or API ke

Databricks Security and Access Control

Question

The security team is exploring whether or not the Databricks secrets module can be leveraged for connecting to an external database. After testing the code with all Python variables being defined with strings, they upload the password to the secrets module and configure the correct permissions for the currently active user. They then modify their code to the following (leaving all other variables unchanged). Which statement describes what will happen when the above code is executed?

Exhibit

CERTIFIED-DATA-ENGINEER-PROFESSIONAL question #6 exhibit

Options

  • AThe connection to the external table will fail; the string "redacted" will be printed.
  • BAn interactive input box will appear in the notebook; if the right password is provided, the
  • CAn interactive input box will appear in the notebook; if the right password is provided, the
  • DThe connection to the external table will succeed; the string value of password will be printed in
  • EThe connection to the external table will succeed; the string "redacted" will be printed.

How the community answered

(30 responses)
  • A
    3% (1)
  • B
    3% (1)
  • E
    93% (28)

Explanation

This is the correct answer because the code is using the dbutils.secrets.get method to retrieve the password from the secrets module and store it in a variable. The secrets module allows users to securely store and access sensitive information such as passwords, tokens, or API keys. The connection to the external table will succeed because the password variable will contain the actual password value. However, when printing the password variable, the string "redacted" will be displayed instead of the plain text password, as a security measure to prevent exposing sensitive information in notebooks.

Topics

#Databricks Secrets#Security#dbutils#Credential Management

Community Discussion

No community discussion yet for this question.

Full CERTIFIED-DATA-ENGINEER-PROFESSIONAL Practice