【问题标题】:Read records in batches from Google Cloud Datastore using Apache Beam使用 Apache Beam 从 Google Cloud Datastore 中批量读取记录
【发布时间】:2019-04-11 17:42:10
【问题描述】:

我正在使用 Apache Beam 在 Beam 自己的 io.gcp.datastore.v1.datastoreio Python API 的帮助下从 Google Cloud Datastore 读取数据。

我在 Google Cloud Dataflow 上运行我的管道。

我想确保我的员工不会被数据超载。

如何批量读取数据或使用其他机制确保我的工作人员不会一次性提取大量数据?

【问题讨论】:

    标签: python google-cloud-datastore google-cloud-dataflow apache-beam


    【解决方案1】:

    Dataflow 会自动为您执行此操作。默认情况下,datastoreio 将您的文件分成 64MB 的小块。如果您想将它们分成更小的部分,请使用初始化程序上的num_splits 参数来指定将每个文件分成多少部分。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-06-07
      • 2022-11-02
      • 1970-01-01
      • 2019-05-12
      • 1970-01-01
      • 1970-01-01
      • 2017-09-14
      相关资源
      最近更新 更多