Google Cloud Professional Data Engineer — Question 277
You need to set access to BigQuery for different departments within your company. Your solution should comply with the following requirements:
✑ Each department should have access only to their data.
✑ Each department will have one or more leads who need to be able to create and update tables and provide them to their team.
✑ Each department has data analysts who need to be able to query but not modify data.
How should you set access to the data in BigQuery?
Answer options
- A. Create a dataset for each department. Assign the department leads the role of OWNER, and assign the data analysts the role of WRITER on their dataset.
- B. Create a dataset for each department. Assign the department leads the role of WRITER, and assign the data analysts the role of READER on their dataset.
- C. Create a table for each department. Assign the department leads the role of Owner, and assign the data analysts the role of Editor on the project the table is in.
- D. Create a table for each department. Assign the department leads the role of Editor, and assign the data analysts the role of Viewer on the project the table is in.
Correct answer: B
Explanation
The correct answer is B because it allows department leads to create and update tables with the WRITER role while ensuring data analysts can only query the data with the READER role. Option A incorrectly assigns the WRITER role to data analysts, which would allow them to modify data. Options C and D focus on tables instead of datasets, and the roles assigned do not meet the requirement for data analysts to only query data.