Databricks Certified Data Engineer Professional Practice Questions

Databricks Certified Data Engineer Professional exam preparation

Databricks Certified Data Engineer Professional practice questions in English: 178 questions with explanations. The mock exam has 60 questions and 120 minutes.

Databricks Certified Data Engineer Professional free question 7 / 10 · Domain 6: Ensuring Data Security and Compliance

In a dynamic view, you want to show the full email address only to members of the account-level group auditors and only the domain part to everyone else. You wrote CASE WHEN is_member('auditors') THEN email ELSE regexp_extract(email, '^.@(.)$', 1) END, but even members of auditors see only the domain. How do you fix it?

  1. Rewrite is_member('auditors') as is_account_group_member('auditors')
  2. Recreate the view, grant auditors SELECT on the base table sales_raw as well, and then have them read the view
  3. Run the cluster that reads the view in dedicated access mode and upgrade it to Databricks Runtime 15.4 LTS or above
  4. Wrap the group name in backticks, as in `auditors`, so that it is resolved as an account-level group
Show the answer and explanation

Answer: A

Why this is correct
Under Create a dynamic view, the documentation lists three functions used in dynamic views on Unity Catalog. session_user() returns the email address of the current user. is_account_group_member() returns TRUE if the current user is a member of an account-level group and is recommended for dynamic views against Unity Catalog data. is_member() returns membership of workspace-level groups, is kept for compatibility with the Hive metastore, and does not evaluate membership of account-level groups. auditors is an account-level group, so is_member() gives FALSE.

Why the other options are wrong
"Wrap the group name in backticks, as in auditors, so that it is resolved as an account-level group" … Backticks quote names that contain special characters and do not change where the group is looked up. is_member() checks workspace-level groups, so how you write the name does not make it evaluate membership of an account-level group.
"Recreate the view, grant auditors SELECT on the base table sales_raw as well, and then have them read the view" … Whether the full address is visible depends on whether the CASE condition is TRUE, and adding SELECT on the base table does not change how the condition is evaluated. Databricks recommends not letting users read the tables and views that a dynamic view refers to.
"Run the cluster that reads the view in dedicated access mode and upgrade it to Databricks Runtime 15.4 LTS or above" … If the compute requirements are not met, a dynamic view cannot be read at all, but here the view is being read and only the condition is FALSE. The cause is the choice of function, and changing the compute does not change how is_member() evaluates.

Key point
Returning only the domain with regexp_extract is an example of pseudonymization: a form that everyone can use for analysis and that makes individuals hard to identify. The result of CASE is replaced with a string or the original column when the query is analyzed, so column-level control does not hurt performance. Use is_account_group_member() for group checks in row filter and column mask functions too.

Go to the Databricks Certified Data Engineer Professional practice app (10 free questions; purchase unlocks all questions)

See the full practice set