Google Cloud Professional Cloud Architect — Question 79
Your BigQuery project has several users. For audit purposes, you need to see how many queries each user ran in the last month. What should you do?
Answer options
- A. Connect Google Data Studio to BigQuery. Create a dimension for the users and a metric for the amount of queries per user.
- B. In the BigQuery interface, execute a query on the JOBS table to get the required information.
- C. Use 'bq show' to list all jobs. Per job, use 'bq ls' to list job information and get the required information.
- D. Use Cloud Audit Logging to view Cloud Audit Logs, and create a filter on the query operation to get the required information.
Correct answer: B
Explanation
The correct answer is B because querying the JOBS table directly in BigQuery provides precise information about user activity, including the number of queries run. While option A may help visualize data, it does not directly provide the required information. Option C is inefficient since it requires checking each job individually, and option D focuses on audit logs which may not give the exact query count per user as efficiently as querying the JOBS table.