【问题标题】:How to create a Dataflow template pipeline with Beam 2.0?如何使用 Beam 2.0 创建数据流模板管道?
【发布时间】:2017-06-21 16:57:13
【问题描述】:

Dataflow 1.9 曾经有 TemplatingDataflowPipelineRunner,但 Beam 没有。使用 Beam 2.0 Java SDK 创建 Dataflow 模板管道的步骤是什么?

【问题讨论】:

    标签: templates google-cloud-dataflow apache-beam


    【解决方案1】:

    从 Beam 2.0 开始,使用 DataflowRunner 并指定 --templateLocation

    mvn compile exec:java \
     -Dexec.mainClass=com.example.myclass \
     -Dexec.args="--runner=DataflowRunner \
                  --project=[YOUR_PROJECT_ID] \
                  --stagingLocation=gs://[YOUR_BUCKET_NAME]/staging \
                  --output=gs://[YOUR_BUCKET_NAME]/output \
                  --templateLocation=gs://[YOUR_BUCKET_NAME]/templates/MyTemplate"
    

    请注意,--templateLocation 替换了之前的 --dataflowJobFile

    请参阅Creating and staging templates 上的 Dataflow 文档以了解 Java SDK 2.X

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-16
      • 1970-01-01
      • 2019-04-23
      • 2021-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-16
      相关资源
      最近更新 更多