QuestionQ110

Designing for security and compliance

A BigQuery project contains several users. For auditing, you need to determine how many queries each user executed during the past month. What should you do?

  • 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.
Explanation

The project-level INFORMATION_SCHEMA.JOBS view contains metadata for all BigQuery jobs in a project, including user_email, creation_time, and job_type. Filtering it to last-month QUERY jobs and grouping by user_email produces the per-user query counts; its job history retention covers the requested period.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!