Google Cloud Professional Cloud Developer — Question 55
Your analytics system executes queries against a BigQuery dataset. The SQL query is executed in batch and passes the contents of a SQL file to the BigQuery
CLI. Then it redirects the BigQuery CLI output to another process. However, you are getting a permission error from the BigQuery CLI when the queries are executed.
You want to resolve the issue. What should you do?
Answer options
- A. Grant the service account BigQuery Data Viewer and BigQuery Job User roles.
- B. Grant the service account BigQuery Data Editor and BigQuery Data Viewer roles.
- C. Create a view in BigQuery from the SQL query and SELECT* from the view in the CLI.
- 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.
Correct answer: A
Explanation
The correct answer is A because granting the service account BigQuery Data Viewer and BigQuery Job User roles provides the necessary permissions to execute queries and manage jobs. Option B is incorrect as it does not include the Job User role, which is essential for running jobs. Options C and D are not solutions to the permission error, as they do not address the underlying access rights required for query execution.