Databricks Certified Data Engineer - Professional

Databricks Certified Data Engineer - Professional

Get started today

Ultimate access to all questions.


When utilizing User-defined Functions (UDFs) for data processing, which strategy best reduces the likelihood of sensitive data exposure through logs or error messages?




Explanation:

The most effective approach to safeguard sensitive data in User-defined Functions (UDFs) is to implement explicit error handling that sanitizes or masks sensitive data in error outputs. This method ensures that sensitive information is not inadvertently exposed through logs or error messages. While disabling logging (Option B) might seem like a solution, it hampers debugging and monitoring efforts. Relying solely on built-in SQL functions (Option D) may not always be feasible, and encrypting data within UDFs (Option A) adds unnecessary complexity and potential performance issues without directly addressing the risk of data exposure in logs or error messages.