简体   繁体   English

从 Google 存储桶触发 R function?

[英]Trigger an R function from Google storage bucket?

From this link https://code.markedmondson.me/googleCloudRunner/articles/usecase-r-event-driven-pubsub.html , it's possible to trigger an R function from pub/sub.通过此链接https://code.markedmondson.me/googleCloudRunner/articles/usecase-r-event-driven-pubsub.html ,可以从 pub/sub 触发 R function。

But does Google offer possibility to trigger an R function when a new file is uploaded to a bucket?但是,当新文件上传到存储桶时,Google 是否提供触发 R function 的可能性?

Thanks.谢谢。

You should be able to do this using EventArc and Cloud Run, see Create a trigger for Cloud Run .您应该能够使用 EventArc 和 Cloud Run 执行此操作,请参阅为 Cloud Run 创建触发器

NOTE Cloud Run supports any runtime (that you can containerize) and -- although opinionated (constrained set of runtime versions), Cloud Functions next generation ( gen2 ) creates Cloud Run services.注意Cloud Run 支持任何运行时(您可以将其容器化),并且——尽管固执己见(受限的运行时版本集),但下一代 Cloud Functions ( gen2 ) 创建了 Cloud Run 服务。

One other way to do this is less practical: Cloud Storage triggers with Cloud Functions.另一种不太实用的方法是:使用 Cloud Functions触发 Cloud Storage R isn't a supported runtime for Cloud Functions and so, while not impossible, I don't recommend this approach. R 不是 Cloud Functions 支持的运行时,因此虽然并非不可能,但我不推荐这种方法。

There are probably others, GCP's eventing is confusing and my take is that Google's supporting different approaches for customer continuity reasons and doesn't provide clear guidance on the best solutions for "green field" applications.可能还有其他原因,GCP 的事件令人困惑,我的看法是 Google 出于客户连续性的原因支持不同的方法,并且没有为“绿色领域”应用程序的最佳解决方案提供明确的指导。

I think (??) Eventarc is the strategic solution and recommend using that if you can.我认为(??) Eventarc是战略解决方案,如果可以的话,建议使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从谷歌云存储桶中读取文件 - Reading files from google cloud storage bucket Google Cloud Function:访问 Google Storage 存储桶中的文件夹并处理其中的文件 - Google Cloud Function: Access folders in a Google Storage bucket and process files from them 从 Google Cloud Storage Bucket 下载文件夹 - Downloading folders from Google Cloud Storage Bucket 将文件从 Azure blob 存储移动到 Google 云存储桶 - Moving Files from Azure blob storage to Google cloud storage bucket Google Storage // Cloud Function // Python 修改Bucket中的CSV文件 - Google Storage // Cloud Function // Python Modify CSV file in the Bucket 将文件从 /tmp 文件夹移动到 Google Cloud Storage 存储桶 - Move file from /tmp folder to Google Cloud Storage bucket 如何从谷歌云存储桶中获取项目名称/ID? - How to get project name/id from Google Cloud Storage bucket? 从 GOOGLE CLOUD STORAGE BUCKET 下载多个文件 - Download multiple files from GOOGLE CLOUD STORAGE BUCKET 无法在浏览器中从 JS 将文件 PUT 到谷歌云存储桶 - Can not PUT file to google cloud storage bucket from JS in browser 如何在存储桶中的旧文件上运行 CLOUD FUNCTION(触发器:云存储(创建/完成)) - How run CLOUD FUNCTION on old files in the bucket (trigger: cloud storage (create/finalise))
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM