PROFESSIONAL-DATA-ENGINEER practice question 9 of 10

An organization maintains a Google BigQuery dataset that contains tables with user-level data. They want to expose aggregates of this data to other Google Cloud projects, while still controlling access to the user-level data. Additionally, they need to minimize their overall storage cost and ensure the analysis cost for other projects is assigned to those projects. What should they do?

Full set: 401 questions
Answer options
A:

A. Create and share an authorized view that provides the aggregate results.

Correct answer
B:

B. Create and share a new dataset and view that provides the aggregate results.

C:

C. Create and share a new dataset and table that contains the aggregate results.

D:

D. Create dataViewer Identity and Access Management (IAM) roles on the dataset to enable sharing.

Correct Answer:
A. A. Create and share an authorized view that provides the aggregate results.
Explanation

An authorized view is the ideal solution for this scenario. It is a virtual table defined by a SQL query that can perform aggregations on the source data. By sharing only the view, you grant access to the aggregated results without exposing the underlying user-level data. Since a view is a logical construct and does not store data, it incurs no additional storage costs, satisfying the cost-minimization requirement. When users from other projects query the authorized view, the processing costs are billed to their respective projects, fulfilling the final requirement.

Why Incorrect

B: Creating a new dataset for the view is an unnecessary step. The core mechanism that provides secure, cost-effective access is the authorized view itself, not the dataset it resides in. C: Creating a new table with aggregate results (a materialized view) would incur additional storage costs, which violates the requirement to minimize storage costs. D: Granting the dataViewer IAM role on the dataset would provide read access to all tables within it, directly exposing the sensitive user-level data and failing the primary security requirement.

References

1. Google Cloud Documentation - Introduction to views: "A view is a virtual table defined by a SQL query. ... You are charged for the storage of the data in the tables referenced by the view, but you are not charged for the storage of the view." This confirms the storage cost minimization aspect.

Source: Google Cloud BigQuery Documentation, "Introduction to views", Section: "View limitations".

2. Google Cloud Documentation - Create authorized views: "An authorized view allows you to share query results with particular users and groups without giving them access to the underlying tables. You can also use the view's SQL query to restrict the columns and rows that the users can see." This directly supports the access control requirement.

Source: Google Cloud BigQuery Documentation, "Create authorized views".

3. Google Cloud Documentation - BigQuery pricing: "When a user runs a query, including a query against a view... the user is billed for the query based on the pricing model of the project that the user is using." This confirms that analysis costs are assigned to the querying project.

Source: Google Cloud BigQuery Documentation, "Understand BigQuery pricing", Section: "Query pricing models".

Scroll to Top