我正在执行数据流字数统计实验,但结束后我想将输出存储到云存储中的谷歌大查询中。 实验——https://cloud.google.com/dataflow/docs/sample-template 我使用以下语法将输出存储到云存储中
python3 -m apache_beam.examples.wordcount --region us-central1 --input gs://example/shak/doc.txt --output gs://example/result/output --runner DataflowRunner --project 项目名称 - -temp_location gs://example/temp
您可以使用 WriteToBigQuery PTransform 作为接收器来写入输出数据。
有关如何执行此操作的简单示例 - https://github.com/apache/beam/blob/2ad459113134dfffd3caeeb15e821bb644e08663/sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py#L98