Cloud Digital Leader Trust and security with Google Cloud Practice Question
An organization uses Google Cloud Identity and Access Management (IAM). A new employee is a data engineer who needs to read BigQuery datasets and run queries but should NOT be able to create new datasets, delete tables, or modify IAM policies. Which IAM role should be assigned?
⚠ Common exam trap
Watch out — candidates often assume the project-level `roles/viewer` (Option C) is sufficient for running queries, but it lacks the `bigquery.jobs.create` permission, causing query execution to fail even though the user can see the data.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
`roles/bigquery.dataViewer` (with `roles/bigquery.jobUser` if needed to run queries)
The `roles/bigquery.dataViewer` role grants read access to BigQuery datasets and their contents, while `roles/bigquery.jobUser` allows the user to run query jobs. Together, they satisfy the requirement to read datasets and run queries without permitting dataset creation, table deletion, or IAM policy modification.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
`roles/bigquery.admin`
Why it's wrong here
The `bigquery.admin` role provides full control over BigQuery, including dataset creation and deletion, table updates, IAM policy management, and execution of all jobs. It encompasses far more power than a data engineer who only needs to read and query specific datasets needs. Granting this role would violate least privilege and create an unnecessary security risk, as the engineer could inadvertently modify or delete data and change access controls.
- ✓
`roles/bigquery.dataViewer` (with `roles/bigquery.jobUser` if needed to run queries)
Why this is correct
The `dataViewer` role grants read-only access to BigQuery datasets and tables, allowing the engineer to inspect schema and data. However, it does not include permission to create query jobs, so to actually run SELECT statements via the console or API, the `jobUser` role is also required. This pairing gives the engineer exactly the read-and-query capability needed, without write, delete, or administrative permissions, adhering to least privilege.
- ✗
`roles/viewer` (project-level Viewer)
Why it's wrong here
Project-level Viewer is a basic role that grants read access to all resources in the project, such as Virtual Machines, Cloud Storage, and Networking, not just BigQuery. This is overly broad for a data engineer whose scope is limited to BigQuery datasets, violating least privilege. It also does not include the `bigquery.jobUser` permission, so even within BigQuery it would not allow running queries.
- ✗
`roles/bigquery.dataEditor`
Why it's wrong here
The `dataEditor` role includes read permissions but also grants write access to table data, such as inserting, updating, and deleting rows. This exceeds the engineer's requirement, which is strictly read-only analysis. Additionally, while dataEditor includes job creation permission, the write capability is the primary concern, as it allows accidental or unauthorized modification of the data.
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
IAM policy
An IAM policy is a set of rules that determines who can access specific cloud resources and what actions they are allowed to perform.
Key term
IAM
Identity and Access Management (IAM) is a framework of policies and technologies that ensures the right individuals have the appropriate access to technology resources.
About these practice questions
This GCDL question is part of Courseiva's 829-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.