目前使用 Dataflow 從 BigQuery 讀取表數(shù)據(jù),并使用一定數(shù)量的分片寫入 Cloud Storage。//Read Main InputPCollection<TableRow> input = pipeline.apply("ReadTableInput", BigQueryIO.readTableRows().from("dataset.table"));// process and write filesinput.apply("ProcessRows", ParDo.of(new Process()) .apply("WriteToFile", TextIO.write() .to(outputFile) .withHeader(HEADER) .withSuffix(".csv") .withNumShards(numShards));為了管理文件大小,我們估計了將文件保持在一定大小所需的分片總數(shù)。有沒有辦法代替設置分片數(shù)量,設置文件大小并讓分片動態(tài)?
在 Dataflow 中從 BigQuery 寫入 Cloud Storage 時如何設置文件大小而
函數(shù)式編程
2023-08-09 15:31:28