GCP DataFlow vs CloudFunctions的小尺寸和频繁的更新较少

发布于 2025-01-28 03:14:04 字数 94 浏览 4 评论 0原文

如果我有一个CSV,它将在SQL数据库中更新条目。文件大小为最大50 KB,更新频率每周两次。另外,如果我需要进行一些自动理智测试,

我应该使用数据流或云功能。

If I have a csv which is to update entries in SQL database. The file size is max 50 KB and update frequency is twice a week. Also if I have a requirement to do some automated sanity testing

What should I use Dataflow or Cloud Function.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

Spring初心 2025-02-04 03:14:04

对于此用例(每周2个小文件),云功能将是最佳选择。
其他选项是创建数据流批处理管道并通过云功能触发或创建数据流流管线,但是这两个选项都会更昂贵。

这里在这里与云存储中触发云功能有关的一些文档。

见ya。

For this use case (2 little files per week) Cloud Function will be the best option.
Other options would be to create a Dataflow batch pipeline and trigger by cloud function OR create a Dataflow streaming pipeline, but both options will be more expensive.

Here some documentation about how to connect on Cloud SQL from Cloud Function

And here some documentation related to triggering a Cloud Function from Cloud storage.

See ya.

慵挽 2025-02-04 03:14:04

如果没有聚合,并且每个输入“元素”与他人不相互作用,也就是说,管道在1:1中起作用,则可以使用云功能或数据流。

但是,如果您需要进行聚合,过滤,任何涉及多个单个元素的复杂计算,则您将无法使用云功能实现它。在这种情况下,您需要使用数据流。

If there are no aggregations, and each input "element" does not interact with others, that is, the pipeline works in 1:1, then you can use either Cloud Functions or Dataflow.

But if you need to do aggregations, filtering, any complex calculation that involves more than one single element in isolation, you will not be able to implement that with Cloud Functions. You need to use Dataflow in that situation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文