Databricks Data Engineer Professional · Section 6 · 8% of the exam
Implement a compliant data pipeline that enforces PII detection and masking controls across batch and streaming workloads using Unity Catalog features.
One of the objectives of the Databricks Certified Data Engineer Professional exam, in the section “Ensuring Data Security and Compliance”. Here is what it covers, the points to remember and a question to try.
What it covers
Protecting personal data means choosing the right de-identification technique, applying it at write time or read time, detecting PII as batch and streaming data arrives, and erasing a person completely from Delta tables, their history and every downstream copy.
Points to remember
- Pseudonymised data (salted hash, token, ciphertext) is still personal data under the GDPR; anonymised data is not, and usually needs generalisation plus suppression.
- Hashing:
sha2(concat(secret_salt, value), 256)keeps joins; an unsalted hash of an email is guessable. Tokenisation: random token plus a restricted vault, reversible by compliance. - Generalisation lowers precision (
year(), decade buckets,left(postcode, 3),date_trunc); suppression removes values;ai_mask(Public Preview) redacts entities in free text. - Write-time de-identification creates a safer copy; read-time column masks or ABAC policies decide per reader, with one tiered UDF.
- Data Classification scans tables, streaming tables and materialized views incrementally; with auto-tagging it applies
class.*tags that ABAC policies can match.
Try a question
Catalog prod has Data Classification with automatic tagging enabled and a catalog-level mask policy on class.email_address. A new pipeline will publish prod.support.tickets_silver, which has a customer_email column, and compliance forbids any period in which analysts can read raw emails in the new table. What should the engineer do?
- ANothing; Data Classification tags new columns within minutes of the first pipeline update
- BPseudonymise or redact
customer_emailin the pipeline query so the table never stores raw emails - CAdd the pipeline's run-as service principal to the policy's
EXCEPTlist before the first update - DGenerate AI comments for the new table and accept them, so that the email column is classified at once
Show the answer
B. Data Classification typically scans new tables and columns within 24 hours, and automatic tags (and so the mask policy) apply only after that scan. To leave no unprotected window, de-identify the known PII at write time in the pipeline. Classification and the policy remain a safety net for sensitive columns nobody anticipated.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Anonymisation, PII Pipelines and GDPR Erasure teaches this objective (about 60 minutes), and 16 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Apply least-privilege access control lists (ACLs) to secure Unity Catalog securable objects and workspace resources.
- Apply attribute-based access control (ABAC) policies with governed tags to enforce row filters and column masks at scale.
- Apply anonymization and pseudonymization methods — such as hashing, tokenization, suppression, and generalization — to confidential data (e.g., using column masks and related Unity Catalog features).
- Implement a data purging strategy that satisfies data retention and deletion policies (e.g., GDPR right-to-erasure, GDPR right-to-be-forgotten deletion) using Delta Lake and Unity Catalog features.