How to retrieve street addresses from BigQuery using Cloud DLP?

PDE By islever Editorial Last updated

Short answer

B Create a deep inspection job on each table in your dataset with Cloud Data Loss Prevention and create an inspection template that includes the STREET_ADDRESS infoType.

Question

You have one BigQuery dataset which includes customers’ street addresses. You want to retrieve all occurrences of street addresses from the dataset. What should you do?
  1. Write a SQL query in BigQuery by using REGEXP_CONTAINS on all tables in your dataset to find rows where the word “street” appears.
  2. Create a deep inspection job on each table in your dataset with Cloud Data Loss Prevention and create an inspection template that includes the STREET_ADDRESS infoType. Correct Answer
  3. Create a discovery scan configuration on your organization with Cloud Data Loss Prevention and create an inspection template that includes the STREET_ADDRESS infoType.
  4. Create a de-identification job in Cloud Data Loss Prevention and use the masking transformation.

Key Takeaways

This question tests the selection of Cloud DLP inspection methods for sensitive data discovery, with the common trap being choosing a brittle SQL regex pattern over DLP's built-in machine learning detectors.

To accurately identify and retrieve street addresses within a BigQuery dataset, Cloud Data Loss Prevention (DLP) deep inspection jobs with the STREET_ADDRESS infoType are the standard solution. The community consensus confirms this approach is superior to SQL regex for finding sensitive data patterns.

Common mistake: Choosing Option A is a common mistake because searching for the specific word 'street' fails to capture address variations like 'St', 'Avenue', or international formats.

Expert Analysis

Why the Answer Is Correct

Cloud Data Loss Prevention (Cloud DLP) is designed specifically to inspect, classify, and redact sensitive data. The STREET_ADDRESS infoType utilizes machine learning models to recognize address patterns rather than just specific keywords, ensuring high accuracy. By creating a deep inspection job on the specific tables, you ensure a thorough scan to retrieve all occurrences of the data.

Why the Other Options Are Wrong

Option A is incorrect because a SQL query using REGEXP_CONTAINS for the word 'street' is too rigid and will miss valid addresses that use abbreviations (e.g., 'St') or different street types (e.g., 'Road', 'Ave'). Option C refers to a discovery scan on the organization, which is typically used for broader risk assessment and metadata scanning rather than retrieving data from a specific dataset. Option D involves de-identification (masking), which is the opposite of retrieving the data.

Community Comment Notes

Community comments strongly support Option B, highlighting that Cloud DLP provides 'powerful inspection capabilities' and 'predefined detectors' necessary for the task. Users emphasized that the requirement to retrieve 'ALL occurrences' necessitates the robust pattern matching of DLP. One comment clarified why Option C is incorrect by distinguishing discovery scans from deep inspection jobs.

Official Reference

https://cloud.google.com/sensitive-data-protection/docs/learn-about-your-data#inspection

This link opens the official vendor documentation in a new tab.

Exam Strategy

When questions ask to identify or retrieve sensitive data patterns like PII, immediately look for Cloud DLP options involving inspection jobs and infoTypes. Avoid SQL-based solutions for pattern matching unless the scenario explicitly restricts you to SQL or the pattern is trivial.

Community Votes

B
100%

100% of anonymous learners picked answer B. 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

  1. raaad 👍 6 Answered B
    - Cloud Data Loss Prevention (Cloud DLP) provides powerful inspection capabilities for sensitive data, including predefined detectors for infoTypes such as STREET_ADDRESS. - By creating a deep inspection job for each table with the STREET_ADDRESS infoType, you can accurately identify and retrieve rows that contain street addresses.
  2. Matt_108 👍 3 Answered B
    Option B - you want to retrieve ALL occurrences within the dataset
  3. scaenruy 👍 2 Answered B
    B. Create a deep inspection job on each table in your dataset with Cloud Data Loss Prevention and create an inspection template that includes the STREET_ADDRESS infoType.
  4. josech 👍 2 Answered B
    https://cloud.google.com/sensitive-data-protection/docs/learn-about-your-data#inspection
  5. AllenChen123 👍 1
    Why not C? Discovery scan configuration can also help to identify risk/sensitivity fields.
Show 1 more comment
  1. JyoGCP 👍 1 Answered B
    Option B

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

← Back to PDE Study Guide