Courseiva
Data Preparation →mediumMultiple Select

Databricks-GenAI-Assoc Data Preparation Practice Question

A data engineer is preparing a large corpus of support tickets stored in a Unity Catalog volume for fine-tuning a Llama model on Databricks. They must remove personally identifiable information (PII) before the data reaches the training cluster. Which TWO approaches are appropriate for detecting and redacting PII at scale in this pipeline? (Choose two.)

⚠ Common exam trap

It's easy for candidates to confuse access controls like column masks or encryption with actual content redaction, which must alter the text before training.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Apply a Spark NLP or presidio-based pandas UDF that detects entities such as names, emails, and phone numbers and replaces them with placeholders.

PII must be removed from the content itself before training. Distributed detectors such as Presidio or Spark NLP in pandas UDFs, and model-based rewriting with ai_query(), both transform the text at scale inside Databricks. Column masks, encryption, and retention policies govern access or lifecycle but leave the underlying tokens intact, so they do not satisfy the preprocessing requirement.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    Apply a Spark NLP or presidio-based pandas UDF that detects entities such as names, emails, and phone numbers and replaces them with placeholders.

    Why this is correct

    A pandas UDF running a PII detection library like Presidio or Spark NLP processes partitions in parallel and can redact entities before data is written to the training table. This keeps the redaction inside the lakehouse, scales with the cluster, and integrates with Unity Catalog governance. It is a common pattern for pre-training data sanitization.

  • ✓

    Run a Databricks job that uses the ai_query() function with a foundation model endpoint to classify and rewrite each ticket, removing PII.

    Why this is correct

    ai_query() can call a foundation model endpoint to detect and rewrite text, effectively redacting PII as part of a distributed Spark job. This is appropriate when rule-based detectors miss context-dependent PII, and it scales across the cluster. The rewritten text can be written to a new Delta table, keeping the original untouched.

  • ✗

    Set the table's retention policy to 0 days so that raw tickets are deleted immediately after ingestion.

    Why it's wrong here

    A zero-day retention policy deletes historical versions but does not remove PII from the current data. The training job would still consume the live rows containing PII. Retention is about version lifecycle, not content sanitization, so this does not address the requirement to redact PII before training.

  • ✗

    Use Unity Catalog column masks on the raw text column so that anyone querying the table sees redacted values.

    Why it's wrong here

    Column masks redact data at query time for certain users, but the underlying data remains unmasked on storage. If the training job runs with a privileged identity or reads the files directly, the original PII is still accessible. Masks are an access-control feature, not a data-sanitization step for training corpora.

  • ✗

    Enable server-side encryption on the Unity Catalog volume and rely on the storage layer to anonymize the text.

    Why it's wrong here

    Server-side encryption protects data at rest from unauthorized storage access but does not alter the text content. The training job would still read names, emails, and phone numbers. Encryption is a confidentiality control, not a PII removal technique, and does not satisfy the requirement to sanitize the corpus before training.

About these practice questions

This Databricks-GenAI-Assoc question is part of Courseiva's 330-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-GenAI-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-GenAI-Assoc exam.