QuestionQ102

Ensuring solution and operations excellence

Your company has a Google Cloud project that uses BigQuery for data warehousing with pay-per-use pricing. You need to monitor queries in real time to identify the most expensive queries and the users who spend the most. What should you do?

  • A
    1. In the BigQuery dataset that contains all the tables to be queried, add a label for each user that can launch a query. 2. Open the Billing page of the project. 3. Select Reports. 4. Select BigQuery as the product and filter by the user you want to check.
  • B
    1. Create a Cloud Logging sink to export BigQuery data access logs to BigQuery. 2. Perform a BigQuery query on the generated table to extract the information you need.
  • C
    1. Create a Cloud Logging sink to export BigQuery data access logs to Cloud Storage. 2. Develop a Dataflow pipeline to compute the cost of queries split by users.
  • D
    1. Activate billing export into BigQuery. 2. Perform a BigQuery query on the billing table to extract the information you need.
Explanation

BigQuery audit logs record user activity, including jobs and queries. Exporting the relevant BigQuery Data Access logs to a BigQuery dataset through a Cloud Logging sink makes the log data available for SQL analysis by submitting user and billed query volume. Cloud Billing exports are intended for billing analysis and have variable reporting and export latency, so they do not provide the required real-time, per-user query monitoring.

Learn more

Community Discussion

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