Secure BigQuery Data Sharing with Authorized Views
Short answer
D Create authorized views for each team in separate datasets and assign data viewer access to those datasets, following the Hub-and-Spoke pattern for secure BigQuery data sharing.
Question
the data. They should only see certain tables based on their team membership. How should you set user permissions?
Key Takeaways
The main trap is placing views in the same dataset as the source data; the correct pattern uses separate 'spoke' datasets for views to ensure strict isolation and simplified permissions.
Learn how to securely share BigQuery data with specific teams using authorized views and separate datasets, implementing the Hub-and-Spoke pattern for optimal access control.
Common mistake: Choosing Option B or C because they seem simpler. However, placing views in the same dataset as source data risks accidental exposure of underlying tables and violates the recommended separation of concerns for multi-tenant access.
Expert Analysis
The correct approach is Option D. The core constraint in this scenario is that users must only see certain tables based on team membership, implying a need for strict data isolation and secure access control without granting direct table permissions.
Why Option D is Correct: Google’s recommended architecture for sharing BigQuery data securely is the Hub-and-Spoke pattern. This involves:
- Source Dataset (Hub): Contains the raw data tables. Access is restricted to specific roles (e.g., Data Engineers).
- Reporting Datasets (Spokes): Separate datasets created for each team or consumer group.
- Authorized Views: Views are created within the Reporting Datasets but are authorized to query the Source Dataset.
- Access Control: Users are granted
BigQuery Data Vieweraccess to the Reporting Dataset (which contains the view), but not to the Source Dataset. Because the view is authorized, it can query the source data transparently. This ensures users only see what the view exposes.
Why Other Options Fail:
- Option A: Assigning table-level permissions directly violates the principle of least privilege if multiple users need access to different subsets of the same dataset. It also becomes unmanageable at scale and doesn't provide row/column level security easily. More importantly, the question implies a structured governance model.
- Option B: Creating views in the same dataset as the source data is problematic. If users have viewer access to the dataset containing the views, they might potentially access other tables in that same dataset unless granular object-level ACLs are perfectly configured, which is complex and error-prone. The official best practice strongly recommends separating views into distinct datasets.
- Option C: Similar to B, keeping authorized views in the same dataset as the source data mixes operational and reporting concerns. While technically possible with strict IAM, it is not the recommended scalable pattern for multi-tenant access control as described in Google Cloud documentation.
Key Insight: The phrase "authorized views" combined with "datasets created for each team" points directly to the Hub-and-Spoke model. The key is that the view resides in the user's dataset, not the source dataset. This isolates the consumer from the source infrastructure.
Official Reference
https://cloud.google.com/bigquery/docs/share-access-views
This link opens the official vendor documentation in a new tab.
Exam Strategy
When asked about sharing data securely in BigQuery, always look for solutions that involve 'authorized views' and 'separate datasets'. Avoid options that place views in the same dataset as the source data unless explicitly stated otherwise. Remember the Hub-and-Spoke pattern: Source Data in one dataset, Views in separate datasets per consumer group.
Frequently Asked Questions
What is the Hub-and-Spoke pattern in BigQuery?
Why can't I just use table-level permissions (Option A)?
Do users need access to the source dataset?
Community Votes
47% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 62 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 30 of 62
-
someshsehgal 👍 41Correct A: A . Now it is feasible to provide table level access to user by allowing user to query single table and no other table will be visible to user in same dataset.
-
madhu1171 👍 27D should be the answer
-
hdmi_switch 👍 14Back then D, now A. Question is, if the exam is already up to date.
-
jits1984 👍 12Should still be D. Question states - "They should only see certain tables based on their team membership" Option A states - Assign the users/groups data viewer access at the table level for each table With A, everyone will see every table. Hence D.
-
rickywck 👍 9Yes, should be D: https://cloud.google.com/bigquery/docs/share-access-views
Show 25 more comments
-
squishy_fishy 👍 8It is possible for about a year now. https://cloud.google.com/bigquery/docs/table-access-controls-intro#example_use_case
-
dambilwa 👍 6Option [D] - has to be the Answer
-
norwayping 👍 6Sorry, it should be D
-
Rajokkiyam 👍 6Answer D
-
MaxNRG 👍 5 Answered Dhttps://cloud.google.com/solutions/migration/dw2bq/dw-bq-data-governance When you create the view, it must be created in a dataset separate from the source data queried by the view. Because you can assign access controls only at the dataset level, if the view is created in the same dataset as the source data, your users would have access to both the view and the data. https://cloud.google.com/bigquery/docs/authorized-views This approach aligns with the Google Cloud best practices for data governance, ensuring that users can only access the data intended for them without having direct access to the source tables. Authorized views serve as a secure interface to the underlying data, and by placing these views in separate datasets per team, you can manage permissions effectively at the dataset level.
-
apnu 👍 5both A and D are correct , now we have option to share the table with user and group. in this case as billiability is not a concern so I would go with A.
-
John_Pongthorn 👍 4 Answered AIt has nothing to do with authorize view because of the following Authorized views make use of query results but this question emphasise on Table level https://cloud.google.com/bigquery/docs/authorized-views An authorized view lets you share query results with particular users and groups without giving them access to the underlying source data.
-
Unmesh93 👍 4A Description Big query now supports access st Table level. https://cloud.google.com/bigquery/docs/table-access-controls-intro
-
clouditis 👍 4D looks correct
-
cetanx 👍 3According to Chat GPT, it is also D. And it explains why it shouldn't be "A" as; Granularity: While you can assign access permissions at the table level, it doesn't allow for fine-grained access control. For example, if you want to restrict access to certain columns or rows within a table based on user or group, table-level permissions would not be sufficient. Scalability: In organizations with many tables and users, managing permissions at the table level can quickly become unwieldy. You would need to individually set permissions for each user for each table, which can be time-consuming and error-prone. Security: Table-level permissions expose the entire table to a user or a group. If the data in the table changes over time, users might get access to data they shouldn't see. With authorized views, you have more control over what data is exposed. Maintenance: If the structure of your data changes (for instance, if tables are added or removed, or if the schema of a table changes), you would need to manually update the permissions for each affected table.
-
kped21 👍 3A - as per latest BigQuery table ACL lets you set table-level permissions on resources like tables and views. Table-level permissions determine the users, groups, and service accounts that can access a table or view. You can give a user access to specific tables or views without giving the user access to the complete dataset. For example, grant the role BigQuery Data Viewer (roles/bigquery.dataViewer) to a user to let that user query just the table or view without full dataset access.
-
Pupina 👍 3Tables are in one dataset but the autorized view can be in a different new dataset. One for each user simplifying the number of binding policies used or all the views in one dataset. Both eschemas has pros and cons. Need to understand whtat this question is wanting us to answer. Cannot be A because it is not a best practice. I prefer D over than C because reduce administration but the on the other hand the views cannot be re-used.
-
federicohi 👍 3THe tables were saved in only 1 dATASET so the answer is C not D because D is for many datasets " You have migrated all of your data into tables in a dataset. " This mains clear that is only one. Answer D but now may be A its possible too because i are able to gice access at table level.
-
kishanu 👍 3I would go with D. Though A seems to be feasible, there could be numerous tables under a dataset, and to provide access to the users could be a cumbersome process. Instead, create datasets for multiple groups(so-called teams), and assign access policies to them.
-
daghayeghi 👍 3D: main point is that you can't give table level access for users and when you give access to a Dataset, user have access to all of data in it. then you should create new Datasets and view for each group and give view access for each of groups.
-
ashuchip 👍 3A . we have now the feasibility to provide table level access to user with acl permission bigquery.dataviewer. it will allow user to query single table and no other table willl be visible to user in same dataset.
-
plum21 👍 3 Answered DThe question was created at the time when it was not possible to share data on table level (dataset was the only option). At that time D was possible only. Right now A is feasible as well.
-
squishy_fishy 👍 3There is only one dataset mentioned in the question here. "You have migrated all of your data into tables in a dataset"
-
medeis_jar 👍 3 Answered AA, since we just deal with permission to data and not give access to a subset of data.
-
vakati 👍 3A. seems relevant now
-
dsyouness 👍 3 Answered DShould be D.
-
mAbreu 👍 2yes, should be D: https://cloud.google.com/bigquery/docs/share-access-views Create a separate dataset to store your view After creating your source dataset you create a new dataset to store the view you will share with your data analysts. This view will have access to the data in the source dataset. Your data analysts will have access to the view, not the source data.
-
postbox4643 👍 2 Answered DWhy Option D is the Best Fit In BigQuery, simply creating a view isn't enough to grant access to the underlying data. If a user has access to a view but not the source table, the query will fail. An Authorized View solves this by allowing the view itself to "authorize" access to the source data, even if the user doesn't have direct access to those tables.
-
John_Pongthorn 👍 2 Answered Ahttps://cloud.google.com/bigquery/docs/table-access-controls-intro Don't think too much ,there is nothing to do with view, the question refer to table obviousely. Assume that User see certain table so he can see everything in such a table
-
spicebits 👍 2A is the best answer for security as stated in the documentation - https://cloud.google.com/bigquery/docs/row-level-security-intro#comparison_of_authorized_views_row-level_security_and_separate_tables
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.