Google Cloud Professional Data Engineer — Question 9
You want to use Google Stackdriver Logging to monitor Google BigQuery usage. You need an instant notification to be sent to your monitoring tool when new data is appended to a certain table using an insert job, but you do not want to receive notifications for other tables. What should you do?
Answer options
- A. Make a call to the Stackdriver API to list all logs, and apply an advanced filter.
- B. In the Stackdriver logging admin interface, and enable a log sink export to BigQuery.
- C. In the Stackdriver logging admin interface, enable a log sink export to Google Cloud Pub/Sub, and subscribe to the topic from your monitoring tool.
- D. Using the Stackdriver API, create a project sink with advanced log filter to export to Pub/Sub, and subscribe to the topic from your monitoring tool.
Correct answer: D
Explanation
The correct answer is D because it allows for the creation of a project sink with an advanced log filter specifically tailored to monitor the desired table in BigQuery and send notifications through Pub/Sub. Option A does not provide a direct notification mechanism, while option B exports logs to BigQuery instead of sending notifications. Option C, while it does use Pub/Sub, lacks the specificity of filtering for the desired table.