Masking Sensitive Data for Analytics While Retaining Source
Short answer
C Use Dataflow and the Cloud Data Loss Prevention API to mask sensitive data. Write the processed data in BigQuery.
Question
Key Takeaways
The key trap is confusing 'removal' with 'masking'; retention requirements prohibit deleting sensitive fields, making masking the only viable option for preserving data utility in analytics.
Learn how to preprocess customer data by masking sensitive elements using Cloud DLP and Dataflow before loading into BigQuery, ensuring privacy compliance while retaining all original data.
Common mistake: Candidates often choose Option A because they focus solely on removing PII to satisfy privacy rules, ignoring the critical instruction to 'retain all of the data,' which makes removal non-compliant with the business requirement.
Expert Analysis
Retain All Data vs. Removal The question explicitly states the requirement to "retain all of the data for potential future use cases." This constraint immediately eliminates options that involve deleting or permanently removing sensitive fields from the source data. Option A uses the Cloud Data Loss Prevention (DLP) API to "detect and remove sensitive fields," which violates the retention requirement because the original sensitive values are lost.
Masking vs. Encryption in BigQuery For consumer analyses, analysts typically need to work with realistic data distributions without seeing raw Personally Identifiable Information (PII). Masking is the standard technique here. It transforms sensitive values (e.g., replacing a name with a pseudonym or hashing an ID) while preserving the data structure and utility for statistical analysis. Option C correctly employs Dataflow to orchestrate this masking using the DLP API and writes the processed dataset to BigQuery. This allows analysts to query the masked data while keeping the original raw data intact in Cloud Storage for future needs.
Why Encryption is Incorrect for Analysis Options B and D suggest encrypting the data. While encryption protects data at rest, it renders the data unreadable to applications and users who do not possess the decryption keys. If analysts need to run queries on encrypted columns, they must decrypt them first, which defeats the purpose of privacy protection during the analysis phase unless specific cryptographic techniques like homomorphic encryption are used (which are not mentioned). Furthermore, sharing encryption keys via "least privilege" as suggested in B and D is operationally complex and often insecure if many analysts need access. Masking provides a safer, more practical solution for analytics environments.
Operational Consequence Choosing removal (A) breaks compliance with the "retain all" rule. Choosing encryption (B/D) blocks analytical access or requires key management overhead. Masking (C) balances privacy, usability, and retention.
Exam Strategy
When a question mentions both 'privacy/compliance' and 'retention/future use', avoid any option that deletes or removes data. Look for 'masking', 'tokenization', or 'pseudonymization' instead. If the goal is analysis, ensure the method keeps the data readable/usable for queries, ruling out raw encryption options that block access.
Frequently Asked Questions
Can I use encryption for analytics instead of masking?
Does masking change the data distribution?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 6 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 6
-
HectorLeon2099 👍 6 Answered CIt's C. "A" removes data and retaining all is a requirement.
-
EIM_Exam_Topics 👍 1While I agree with C, removing data does not lead to the inability to do consumer analyses. Analyses such as segmentation and clustering don't require PII data.
-
22c1725 👍 1 Answered CRemoving data will lead to unability to do study & consumer analyses. since it's likely all of consumer data is under PII.
-
AwesomeGCP 👍 1 Answered CC. Use Dataflow and the Cloud Data Loss Prevention API to mask sensitive data. Write the processed data in BigQuery.
-
22c1725 👍 1 Answered CNot A since "while also retaining all of the data" is required.
Show 1 more comment
-
Nagamanikanta 👍 1 Answered Coption C we can simply mask the data and process in biguery
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.