
Explanation:
The permission error occurs because the service account lacks necessary roles. To execute a query (job) in BigQuery, the service account needs the BigQuery Job User role to submit jobs and the BigQuery Data Viewer role to read data from the dataset. Option A correctly addresses both requirements. Options B, C, and D either omit essential roles (Job User) or suggest indirect solutions that don't resolve the core permission issue.
Ultimate access to all questions.
No comments yet.
When executing batch SQL queries against a BigQuery dataset by passing a SQL file to the BigQuery CLI and redirecting the output, you encounter a permission error. How should you resolve this issue?
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.