Professional Data EngineerManaging and securing dataMedium

A global e-commerce company uses BigQuery for its analytics platform. They have several datasets containing sensitive customer information (e.g., email addresses, phone numbers) that must be protected. Data analysts need to perform queries on these datasets for marketing campaigns, but they should only see masked versions of the sensitive data while still being able to join tables and perform aggregate analysis. Which BigQuery feature should be used to achieve this without creating separate copies of the data?

  1. ABigQuery row-level security
  2. BBigQuery data masking
  3. CBigQuery authorized views with column exclusion
  4. DBigQuery data encryption at rest
Show answer & explanation

Correct answer: B. BigQuery data masking

BigQuery data masking allows you to obscure sensitive data in specific columns, presenting masked values to unauthorized users while still enabling queries and joins. This meets the requirement of showing masked data for analysis without creating data copies.

Why the other options are wrong

  • A. Row-level security restricts access to entire rows, not specific columns with masked values.
  • C. While authorized views can restrict columns, data masking specifically provides masked *values* within the columns, which is the core requirement.
  • D. Data encryption at rest protects data from unauthorized physical access but doesn't control how data is presented to authorized users during queries.

BigQuery Data Masking

BigQuery data masking allows you to obscure sensitive data in a column, presenting masked or tokenized values to users based on their roles and permissions, while allowing data to be used for analytical purposes.

  • Uses policy tags for classification.
  • Supports various masking routines (e.g., default, nullify, hash).
  • Applied at query time, no data duplication.

Memory trick: Masked Data Makes Queries Safe.

More Managing and securing data questions