As part of ensuring security, sensitive information will not get printed directly on the Databricks notebooks. Sometimes this good feature becomes a trouble for the developers. For example, if you want to verify the value using a code snippet due to the lack of direct access to the vault, the direct output will show REDACTED.

To overcome this problem, we can use a simple code snippet which just iterates over the string and combines it again. The code snippet is given below. The same approach can be used for other scenarios also.

value = dbutils.secrets.get(scope="myScope", key="myKey")
for char in value:
print(char, end='\u200B')

I hope this example is useful. Feel free to comment below this post if you have any questions or feedback.