Google Professional Data Engineer Question 201
Single answerGoogle Cloud PlatformYour organization wants to share sensitive sales data stored in BigQuery with an external partner. The partner should only have access to a subset of the data based on their region. You need to define access rules that ensure the partner only sees data pertaining to their region, without granting them access to the entire dataset or modifying the original table. What is the best way to achieve this?
- A
Create a separate BigQuery dataset for each partner and copy only their relevant data into it.
- B
Use BigQuery's column-level security to restrict access to specific columns within the table.
- C
Create a BigQuery view that filters the data by region and share the view with the partner.
- D
Export the data to a CSV file filtered by region and share the file with the partner.
Show answer and explanation
Correct answer: C
Explanation
The best way to share a subset of data in BigQuery is to create a view that filters the data based on specific criteria (e.g., region) and grant the partner access to the view. This approach ensures that the original table remains unchanged, is cost-effective, and provides real-time data access while maintaining security and compliance requirements.
- A. Incorrect.
Creating a separate dataset for each partner is not efficient or scalable, especially if there are multiple partners or if the data updates frequently. This approach increases storage costs and operational overhead.
- B. Incorrect.
Column-level security restricts access to specific columns, not rows, which does not address the requirement to filter data by region.
- C. Correct.
Creating a BigQuery view allows you to define a query that filters data based on the region and share only the view with the partner. This ensures the partner sees only the relevant data without modifying the original table.
- D. Incorrect.
Exporting data to a CSV file is not secure or efficient for ongoing access. It also requires additional steps to manage and distribute the file, and there’s no guarantee of real-time data updates.