CertSafari
    Databricks Certified Generative AI Engineer Associate· Lessons

    Domain 5 · Lesson 43/56

    Where table masks stop: vector indexes, exempt pipelines and LLM requests

    Use masking techniques as guard rails to meet a performance objective

    9 min read
    2% of exam
    5 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Identify the paths where source-table masks no longer protect data
    • Choose between redacting and blocking sensitive data in model requests
    • Arrange PII guardrails so they add as little latency as possible

    1.Masks protect queries, not copies

    A column mask only works when a query reads the protected table. Once data moves into another store, the mask doesn't go with it. A GenAI pipeline creates such copies all the time. Assume a column mask protects the PII in a source table. This page covers the places that mask no longer reaches.

    The vector index is the first gap. It syncs every row from the source table, ignoring both filters and masks. The fix happens at build time: leave the masked columns out of the index with the columns-to-sync setting, so the sensitive values never reach it. Index setup itself belongs to creating a Vector Search index.

    Exempt principals are the second gap. An identity listed in a policy's EXCEPT clause sees unfiltered, unmasked data, and ETL service principals are usually the ones exempted. Anything such a principal writes out, such as a cloned table, a chunked copy for RAG or a feature table, holds raw values with no policy attached. Exempt only trusted pipeline identities, and treat their outputs as sensitive data that needs its own controls. Cloning is a concrete case. Deep and shallow clones of ABAC-protected tables only work for a principal that is exempt from every policy on the table.

    An ABAC mask on SSN-tagged columns that exempts the ETL service principal, whose outputs are therefore unmaskedsql
    CREATE POLICY mask_pii
    ON CATALOG prod
    COLUMN MASK prod.governance.mask_value
    TO `account users`
    EXCEPT `etl_service_principal`
    FOR TABLES
    MATCH COLUMNS
      has_tag_value('pii', 'ssn') AS ssn
    ON COLUMN ssn;

    LLM requests are the third gap, and the widest. Users type contact details straight into a chat, and those never touch a governed table. Here the mask has to run in the gateway, on the request and response themselves.

    Checkpoint 1 of 6· Fill the gap

    This policy has to mask SSN-tagged columns for analysts while letting the ETL service principal clone the table. Which keyword completes it?

    CREATE POLICY mask_pii
    ON CATALOG prod
    COLUMN MASK prod.governance.mask_value
    TO `account users`
     ?  `etl_service_principal`
    FOR TABLES
    MATCH COLUMNS
      has_tag_value('pii', 'ssn') AS ssn
    ON COLUMN ssn;

    Checkpoint 2 of 6· Check yourself

    A RAG retriever will query a Vector Search index built from a table whose email column has an ABAC column mask. How do you keep emails out of the retriever's results?

    Sources1

    2.Sanitizing versus blocking PII in model traffic

    AI Gateway PII guardrails offer two actions, and the choice decides whether the request goes through. The legacy endpoint setting is literally "Block or Mask". Newer Unity Catalog service policies call the masking action redact, and exam questions call it a sanitizing guardrail.

    What each PII action does to a model request
    ActionWhat happens on a matchUse when
    Redact (sanitize / mask)Each matched value is replaced with a placeholder such as [US_SSN]; the model gets the redacted request and the caller gets the redacted responseThe request is legitimate and should still be answered, just without the sensitive value
    BlockThe interaction is denied; on a model service the caller gets an HTTP 200 whose assistant turn names the blocking policy, plus a databricks_service_policy object with the reasonAny appearance of the data means the request must not be served

    Take a support chatbot where a customer writes "call me back on my mobile, the order never arrived". Blocking would refuse a valid ticket. Redacting sends the model "call me back on [PHONE_NUMBER]…" and the conversation carries on. Two lookalike options don't meet the goal. A hallucination check runs on the response, so it never stops the user's number from reaching the model. A prompt telling the model not to repeat contact details still hands it those details. Prompt injection and jailbreak defences are separate guardrails, covered in guarding against malicious inputs.

    The two actions are tuned in opposite directions. Redaction is optimized for recall, because a missed value is worse than an over-redaction. Blocking is optimized for precision, so for bare digit runs such as SSNs it requires a checksum or a nearby context word before it fires.

    Checkpoint 3 of 6· Check yourself

    Your model serving endpoint has a PII guardrail set to Block. A user sends: "My SSN is 123-45-6789, why was my claim denied?" What happens to this request?

    Checkpoint 4 of 6· Exam question

    A customer-support chatbot serving latency-sensitive users occasionally receives inputs containing phone numbers or email addresses that must never reach the underlying LLM. The team also does not want legitimate support requests to fail outright just because they mention contact details. Which AI Gateway guardrail configuration meets this objective?

    Sources234

    3.Keeping PII guardrails off the latency budget

    Guardrails come in two kinds with very different costs. Built-in sensitive data detection is deterministic: it uses regex, checksums and context keywords, with no evaluator model, and adds well under 50 ms even on a 100-turn conversation. Unsafe-content, jailbreak, hallucination and custom LLM-judge checks are model-backed and slow. Databricks runs those model-backed blocking checks in parallel, so stacking several doesn't multiply their latency.

    Pattern detection can't recognize names, locations or organizations. Those need a model. The usual pattern layers the two kinds: run deterministic detection at a lower rank to redact structured identifiers cheaply, then run an LLM judge at a higher rank on the already-redacted content, telling it to ignore placeholders such as [US_SSN]. Rank sets the order. The lowest rank runs first on the request and last on the response.

    Checkpoint 5 of 6· Check yourself

    For a support assistant, the gateway has to catch SSNs, phone numbers and customers' first names in requests while adding as little latency as possible. Which guardrail setup fits?

    Checkpoint 6 of 6· Exam question

    An engineering team notices that adding several custom guardrails to a single execution phase of their AI Gateway route adds significant latency to every request. Which combination of changes would reduce that latency while keeping the necessary guardrails in place?

    Sources345

    Sources

    (5)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “ABAC policies on a source table don't apply to AI Search indexes created from that table.”
      ↩︎ Masks protect queries, not copies
      “Exempted principals see unfiltered, unmasked data.”
      ↩︎ Masks protect queries, not copies
      “Only exempt trusted identities such as service principals used for ETL or pipeline workloads.”
      ↩︎ Masks protect queries, not copies
      “For tables with column masks, you can exclude masked columns from the index using the columns to sync setting.”
      ↩︎ Exam trap 1
      “For tables with column masks, you can exclude masked columns from the index using the columns to sync setting.”
      ↩︎ Checkpoint
    2. 2.
      “Select to Block or Mask PII data such as names, addresses, credit card numbers”
      ↩︎ Sanitizing versus blocking PII in model traffic
    3. 3.
      “the model receives the redacted request and the caller receives the redacted response.”
      ↩︎ Sanitizing versus blocking PII in model traffic
      “instead of an error the caller receives a successful (HTTP 200) response whose assistant turn names the service policy that blocked”
      ↩︎ Sanitizing versus blocking PII in model traffic
      “since a missed value is worse than an over-redaction, so it is optimized for recall.”
      ↩︎ Sanitizing versus blocking PII in model traffic
      “It adds well under 50 ms to a request, even on a large (100-turn) conversation.”
      ↩︎ Keeping PII guardrails off the latency budget
      “Free-text entities such as names, locations, or organizations are not supported.”
      ↩︎ Keeping PII guardrails off the latency budget
      “Add the LLM judge at a higher rank so it evaluates the already-redacted content.”
      ↩︎ Keeping PII guardrails off the latency budget
      “Databricks replaces each matched value with a placeholder token, such as [US_SSN], and forwards the rewritten content.”
      ↩︎ Exam trap 2
      “Block (all services): Databricks denies the interaction. On a model or model provider service, instead of an error the caller receives a successful (HTTP 200)”
      ↩︎ Checkpoint
      “Keep Sensitive Data Detection at a lower rank to redact structured data.”
      ↩︎ Checkpoint
    4. 4.
      “system.ai.block_hallucination: denies responses that contain hallucinated content.”
      ↩︎ Sanitizing versus blocking PII in model traffic
      “Because Databricks parallelizes the slow model-backed checks, stacking several blocking guardrails on a service doesn't multiply their latency.”
      ↩︎ Keeping PII guardrails off the latency budget
      “Unlike the others, it's deterministic (pattern-based, no evaluator model) and can redact rather than only block.”
      ↩︎ Keeping PII guardrails off the latency budget

    Spotted a mistake, or was something unclear? Tell us.