jonathansudhakar1 commented on issue #19552:
URL: https://github.com/apache/beam/issues/19552#issuecomment-6583340890

   @tvalentyn, since you reported the original Jira: half of this is fixed, and 
I would like to check the plan for the other half before sending a PR.
   
   1. **Fixed:** the closing sentence of [2.1.2 Creating custom 
options](https://beam.apache.org/documentation/programming-guide/#creating-custom-options)
 is no longer Java-specific. It now reads "Now your pipeline can accept 
`--input=value` and `--output=value` as command-line arguments."
   2. **Still open:** the section shows how to define custom options in each 
SDK but never how to read the values back. `view_as` does not appear anywhere 
under `website/www/site/content/en/documentation/`, and the Java tab stops at 
`.as(MyOptions.class)`.
   
   Proposed change, docs only:
   - After that sentence, add a short paragraph, "Accessing custom option 
values", with a tab for each SDK:
     - Python: a new tagged snippet in 
`sdks/python/apache_beam/examples/snippets/snippets.py` that builds 
`PipelineOptions` from a list of args, calls `beam_options.view_as(MyOptions)`, 
reads `.input` and `.output`, and has a test in `snippets_test.py`.
     - Java: an inline example, `options.getInput()`, matching the inline Java 
examples already in that section.
     - Go: a snippet in `sdks/go/examples/snippets/01_03intro.go` showing that 
the values are read by dereferencing the flag variables (`*input`) after 
`beam.Init()`/`flag.Parse()`.
   - No change to TypeScript or YAML.
   
   Does that scope and placement work for you, or would you prefer something 
smaller, such as a one-line pointer to the WordCount walkthrough? I will hold 
off on a PR until I hear back.
   
   .take-issue


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to