tvalentyn commented on a change in pull request #14738:
URL: https://github.com/apache/beam/pull/14738#discussion_r626951960



##########
File path: sdks/python/apache_beam/examples/snippets/snippets.py
##########
@@ -282,38 +273,48 @@ def _add_argparse_args(cls, parser):
   # [END pipeline_options_define_custom_with_help_and_default]
 
   # [START pipeline_options_local]
-  # Create and set your Pipeline Options.
-  options = PipelineOptions(flags=argv)
-  my_options = options.view_as(MyOptions)
+  import sys
 
-  with Pipeline(options=options) as pipeline:
-    pass  # build your pipeline here.
-    # [END pipeline_options_local]
+  import apache_beam as beam
+  from apache_beam.options.pipeline_options import PipelineOptions
 
-    with TestPipeline() as p:  # Use TestPipeline for testing.
-      lines = p | beam.io.ReadFromText(my_options.input)
-      lines | beam.io.WriteToText(my_options.output)
+  # Create and set your Pipeline Options.
+  beam_options = PipelineOptions(sys.argv)

Review comment:
       same here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to