
Protecting personally identifiable information (PII) and protected health information (PHI) in cloud pipelines requires balancing privacy with what downstream systems still need from the data. On Google Cloud, Sensitive Data Protection (formerly Cloud Data Loss Prevention) automates discovering, classifying, redacting, and de-identifying sensitive values as well as performing risk analysis across a wide range of sources. That automation helps prevent accidental exposure or misuse while supporting regulatory compliance requirements such as GDPR and HIPAA. On the Professional Machine Learning Engineer exam, scenarios involving sensitive datasets usually come down to knowing where the service can scan data and choosing the de-identification technique that preserves the property downstream workflows still require.
Sensitive Data Protection is designed to work both through native integrations with Google Cloud services and as a standalone API. One operational detail worth remembering is that although the product name changed, the underlying API was never renamed. When you enable the service in a project or call it from code, it still appears under its former DLP API name.
To tell Sensitive Data Protection what to look for, you configure information types, commonly called infoTypes. Each infoType acts as a detector for a single category of sensitive data, such as a person's name, an email address, or an identification number, and you select the detectors that apply to a given scan. Those scans can inspect and redact data across Cloud Storage, BigQuery, Dataflow, and Pub/Sub. That coverage lets teams protect data sitting in buckets and tables as well as data moving through pipelines.
Masking replaces part of a sensitive field with asterisks or other characters while leaving selected portions visible. We would lean toward masking when a pipeline needs to protect sensitive information while still keeping enough of the original value readable for analytics, verification, or troubleshooting.
When downstream workflows do not need human readability for troubleshooting or analytics, but still require the data to keep its original structure, format-preserving encryption (FPE) is the stronger choice. FPE replaces the real value with an encrypted value that matches the shape of the input, and unlike hashing, it preserves a path back to the original value.
Applying FPE to the same four fields illustrates how the structure survives even though the details change:
The practical advantage of FPE is that downstream systems do not need to change. A validation check that expects 16 digits, a database column with a fixed length, or a form that expects an email pattern all continue working on the encrypted value. Teams gain data protection without rewriting processes that depend on a specific format.
Cryptographic hashing goes further than FPE by giving up the original format entirely. It passes the input through a one-way function with a secret key to produce a fixed-length string. Because the function is one-way, hashing is irreversible, and there is no path back to the original value.
The same input always produces the same hash, which makes hashing useful for joining records rather than for readable analytics. If a customer's email address is hashed in the same way across two different tables, downstream queries can join those tables on the hashed value without either system storing the real email. Whether the input is a short name like John Doe, a longer email address like johndoe@example.com, a credit card number, or a Social Security number, every output has the exact same fixed length. The resulting hash reveals nothing about the content, size, or shape of what went in.
For the Professional Machine Learning Engineer exam, selecting between these three de-identification methods comes down to identifying what the downstream workload still needs to keep:
Our Professional Machine Learning Engineer course covers Sensitive Data Protection alongside BigQuery and Dataflow data pipelines, with practice questions that drill these distinctions.