我正在使用数据流中的流式数据从pub-sub中收听数据。然后,我需要上传到存储,处理数据并上传到bigquery。apply(BigQueryIO.Write.to(MY_BQ_TABLE).withSchema(tableSchema) pipeline.run();}Write can only be applied to a Bounded PColl
在下面的代码中,我将读取csv文件并定义其模式,然后将其转换为BeamRecords。然后应用BeamSql实现PTransforms。BeamRecord> out = apps.apply(BeamSql.query("select Outlet from PCOLLECTION"));
out.apply("WriteMyFile", TextIO.write().to("gs://gcpbucket/output/