Skip to content Skip to sidebar Skip to footer

How To Create Google Cloud Dataflow Wordcount Custom Template In Python?

I can't create a custom Google Cloud Dataflow template using the wordcount example following the instructions here: https://cloud.google.com/dataflow/docs/guides/templates/creating

Solution 1:

I successfully generated the pipeline after I modified run(argv) to pick up the args from commandline:

parser = argparse.ArgumentParser()
known_args, pipeline_args = parser.parse_known_args(argv)                                                                                                                                                                                                                                                                 
pipeline_options = PipelineOptions(pipeline_args)

So I think the problem is that argv is not passed to your program correctly.

Also I think if you'd like to make output a template arg, please do not mark it as required.

Post a Comment for "How To Create Google Cloud Dataflow Wordcount Custom Template In Python?"