我有一个 BigQuery 查询,它将两个表联合起来(每日 Google Analytics 导出)。我想要的是将查询保存为视图或表,但随着新的 Google Analytics 数据加载到 BigQuery 中,最终视图/表每天会自动更新。
感谢您的帮助
更新
安排重复查询 https://cloud.google.com/bigquery/docs/scheduling-queries自 2018 年 9 月起现已在 BigQuery 中提供
BigQuery 本身不提供任何调度机制。
您可以使用第 3 方解决方案或使用您选择的客户端开发自己的解决方案
https://cloud.google.com/bigquery/docs/reference/libraries https://cloud.google.com/bigquery/docs/reference/libraries
例如,
您可以使用 App Engine Cron 服务自动执行 BigQuery 查询https://cloud.google.com/appengine/docs/java/config/cron https://cloud.google.com/appengine/docs/java/config/cron
https://cloud.google.com/appengine/features/#cron https://cloud.google.com/appengine/features/#cron
https://cloud.google.com/bigquery/bigquery-api-quickstart https://cloud.google.com/bigquery/bigquery-api-quickstart
或者,您可以使用 Google Apps 脚本编写 BigQuery 查询脚本,并使用基于时间的触发器来执行该脚本
https://developers.google.com/apps-script/advanced/bigquery https://developers.google.com/apps-script/advanced/bigquery
https://developers.google.com/apps-script/guides/triggers/installable#time-driven_triggers https://developers.google.com/apps-script/guides/triggers/installable#time-driven_triggers
另外,请检查最近推出的 Google Cloud Functions(测试版)
https://cloud.google.com/functions/docs/ https://cloud.google.com/functions/docs/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)