[英]How to trigger scala/python code when value in BQ table changes
We wanted to run (poll) scala/python code in GCP VM continuously which will run ETL program only when there is change in value in BQ table.我们想在 GCP VM 中连续运行(轮询)scala/python 代码,只有当 BQ 表中的值发生变化时才会运行 ETL 程序。 ie we'll add which ETL to run in BQ table and based on that ETL program will run via GCP VM.
即我们将添加要在 BQ 表中运行的 ETL,并基于该 ETL 程序将通过 GCP VM 运行。
If there are multiple values in BQ table, it should run multiple ETL program simultaneously.如果 BQ 表中有多个值,则应同时运行多个 ETL 程序。
How we can achieve the same.我们如何才能实现同样的目标。
For running your piece of code whenever BQ gets updated you can use serverless options like cloud run.要在 BQ 更新时运行您的代码,您可以使用无服务器选项,如云运行。 It's a simple process whenever BQ gets updated logs will be generated and we can create cloud run triggers based on the logs generated.
这是一个简单的过程,只要 BQ 获得更新日志就会生成,我们可以根据生成的日志创建云运行触发器。 The entire process of implementation is explained in this documentation please check.
本文档中解释了整个实施过程,请查看。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.