Dear Community members, I need your help!
I am trying to automate the notification of BigQuery snapshots failed, but having a problem with identifying which snapshots failed. Question regarding the recognition of snapshots failures - is there any specific table with snapshot loggings? I looked up the 'loggings' of GCP but it includes all the loggings of GCP.
Thank you so much for your help!
Yes, you can effectively identify failed BigQuery snapshots and automate notifications. Here's an updated breakdown of the methods and implementation details:
1. Using Cloud Audit Logs
resource.type="bigquery_resource"
logName="projects/YOUR_PROJECT_ID/logs/bigquery.googleapis.com"
severity="ERROR"
(protoPayload.methodName="google.cloud.bigquery.v2.TableService.InsertTable"
OR protoPayload.methodName="google.cloud.bigquery.v2.TableService.DeleteTable")
protoPayload.status.message
to diagnose failure reasons.2. Monitoring with Cloud Monitoring
3. Querying INFORMATION_SCHEMA Views
SELECT job_id, job_type, state, start_time, end_time, error_result
FROM `project.dataset.INFORMATION_SCHEMA.JOBS_BY_PROJECT`
WHERE state = 'FAILURE'
AND (operation_type = 'TABLE_EXPORT'
OR operation_type = 'TABLE_IMPORT')
Automation and Notification
Important Notes
error_result
field in INFORMATION_SCHEMA for initial failure insights.Enhancements
Dear Staff,
thank you so much for your response! I appreciate it, will try to implement the suggested steps!