How can I trigger an email or other notification based on a BigQuery query?

前端 未结 1 879
感情败类
感情败类 2021-01-05 12:10

I would like to receive a notification, ideally via email, when some threshold is met in Google BigQuery. For example, if the query is:

SELECT name, count(id         


        
相关标签:
1条回答
  • 2021-01-05 13:02

    BigQuery does not provide the kinds of services you'd need to build this without involving other technologies. However, you should be able to use something like appengine (which does have a task scheduling mechanism) to periodically issue your monitoring query probe, check the results of the job, and alert if there are nonzero rows in the results. Alternately, you could do this locally using some scripting and leveraging the BQ command line tool.

    You could also refine things by using BQ's table decorators to only scan the data that's arrived since you last ran your monitoring query, if you retain knowledge of the last probe's execution in the calling system.

    In short: Something else needs to issue the queries and react based on the outcome, but BQ can certainly evaluate the data.

    0 讨论(0)
提交回复
热议问题