BigQuery - Scheduled Query Update Notification Email

4.3k Views Asked by At

Is there a way to update the scheduled query notification email to something custom?

By default it is the email of the creator, however, this is often a service account with no true email recipient.

e.g with terraform provisioning, we would have a service account. We would want to update the email notification target from the SA to a support email so failures would be routed more correctly?

Ive checked the documentation and I could be missing it, but does not seem an option, unless Ive missed something via the CLI?

Thanks!

1

There are 1 best solutions below

2
On BEST ANSWER
  1. Since scheduled Query IDs always start with "scheduled_query_[runsID]", search for scheduled_query_ using advanced logs queries

  2. Create a logs-based metric based on your BigQuery scheduled update log.

  3. Create an alerting policy using the logs-based metric created in step 1.

  4. While creating the alerting policy in step 3, select email as a notification channel.

  5. In notification channel, add your email address to get all the notifications.