Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
Google Cloud Certified Professional Cloud Developer · Google Cloud
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
While Data Viewer role only allows read-only access to BigQuery data. It doesn't grant the necessary permissions to execute queries. So, need to give it Data Editor role. Hence, B is the correct answer here.
The correct answer is A. Grant the service account BigQuery Data Viewer and BigQuery Job User roles. Here's why: BigQuery Data Viewer: This role allows the service account to read data from BigQuery tables. This is necessary for the BigQuery CLI to execute the SQL queries. BigQuery Job User: This role allows the service account to run queries and jobs in BigQuery. This is essential for the BigQuery CLI to execute the SQL queries and return results.
Let's break down why the other options are less suitable: B. Grant the service account BigQuery Data Editor and BigQuery Data Viewer roles: While BigQuery Data Editor allows for data modification, it's not strictly necessary for executing queries. Granting BigQuery Data Viewer and BigQuery Job User roles is sufficient. C. Create a view in BigQuery from the SQL query and SELECT from the view in the CLI: * Creating a view can simplify queries, but it doesn't address the underlying permission issue. The service account still needs the necessary permissions to access the view and execute queries. D. Create a new dataset in BigQuery and copy the source table to the new dataset Query the new dataset and table from the CLI: This approach adds unnecessary complexity and data movement. It doesn't solve the permission issue.