
Answer-first summary for fast verification
Answer: The string "REDACTED" will be printed.
Databricks Secrets is designed to securely store credentials and reference them in notebooks and jobs. To prevent accidental exposure of secret values, Databricks redacts secrets read using `dbutils.secrets.get()`. When these values are displayed in notebook cell output, they are replaced with the `[REDACTED]` string, ensuring sensitive information is not inadvertently revealed. This behavior is consistent regardless of the user's permissions, focusing on security by default. References: - [Databricks Secrets Redaction](https://docs.databricks.com/security/secrets/redaction.html) - [Databricks Secrets Overview](https://docs.databricks.com/security/secrets/index.html)
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
When executing the following code block in a notebook: db_password = dbutils.secrets.get(scope="dev", key="database_password") print(db_password), what will be the outcome?
A
An interactive input box will appear in the notebook
B
The string "REDACTED" will be printed.
C
The error message "Secrets can not be printed" will be shown
D
The string value of the password will be printed in plain text.
E
If the user has "Can Read" permission, the string value of the password will be printed in plain text. Otherwise, the string "REDACTED" will be printed.
No comments yet.