Dataflow Batch 或 Streaming insert to BigQuery 说明

Dataflow Batch or Streaming insert to BigQuery clarification

考虑到 BigQuery 的流式插入会产生成本,从 BigQuery 的角度来看,使用数据流从有界集合(或批处理模式)读取是否会产生成本?而且我相信只有当从无界集合(在流模式下)读取并写入 BigQuery 时才被认为是对 BigQuery?

的流式插入

你是对的,因为 specified in the sources:

If the input is bounded, then file loads will be used. If the input is unbounded, then streaming inserts will be used.

您可以通过在 BigQueryIO 构建器对象上使用 .setMethod(Write.Method.FILE_LOADS).setMethod(Write.Method.STREAMING_INSERTS) 来覆盖默认行为。