我在创建将发布/订阅源连接到大型查询接收器的dataflowRunner作业时遇到问题,方法是插入以下两个:
apache_beam.io.gcp.pubsub.PubSubSource apache_beam.io.gcp.bigquery.BigQuerySink
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/streaming_wordcount.py )github上的示例。删除第61-70行并指定正确的pub/sub和bigquery参数后,脚本运行时不会出错,不会构建管道。
旁注:脚本提到流媒体管道支持在Python中不可用。然而,beam文档中提到了apache_beam.io.gcp.pubsub。PubSubSource仅可用于流媒体 (在“apache_beam.io.gcp.pubsub模块”标题下的第一句话: https://beam.apache.org/documentation/sdks/pydoc/2.0.0/apache_beam.io.gcp.html#module-apache_beam.io.gcp.pubsub
目前无法在Python数据流上进行流式处理。
(很快!)