4

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!

Ismail
  • 1,068
  • 1
  • 6
  • 11
user2992225
  • 247
  • 4
  • 14

1 Answers1

5
  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.

Ismail
  • 1,068
  • 1
  • 6
  • 11
  • 1
    Thanks! Hope this gets made a little easier in the future, but thanks for the solution – user2992225 Feb 08 '21 at 17:39
  • 2
    This advanced query worked well for us. `logName="projects/MY_PROJECT_NAME_HERE/logs/bigquerydatatransfer.googleapis.com%2Ftransfer_config" severity=ERROR` – nomadic_squirrel Apr 21 '22 at 16:59