jk-shah opened a new issue, #40891:
URL: https://github.com/apache/beam/issues/40891

   ### What would you like to happen?
   
   What would you like to happen?
   
   Running a Beam YAML pipeline today means typing python -m 
apache_beam.yaml.main --yaml_pipeline_file=pipeline.yaml, which is long and 
gives little help when something goes wrong:
   
   user mistakes such as a missing file or an unknown transform end in a Python 
traceback;
   the exit code doesn't tell a script whether the pipeline failed or could not 
be built;
   Ctrl-C leaves a traceback and can leave local workers running;
   when the SDK falls back from Prism to another local runner, nothing says 
which runner ran.
   I'd like to add an experimental beam console script to the Python SDK, 
starting with one subcommand:
   
   beam run pipeline.yaml [pipeline options]
   It would build and run the pipeline with apache_beam.yaml.main's own 
functions, so it behaves the same, and pass every other flag through as a 
pipeline option. On top of that it would:
   
   print a short error instead of a traceback for user errors, with --verbose 
to show the traceback;
   use documented exit codes: 0 finished, 1 the pipeline failed, 2 usage error 
or the pipeline could not be built, 4 a required package is missing, 130 
interrupted;
   cancel the pipeline on Ctrl-C;
   end with a line naming the runner that actually ran.
   The code would live in a new apache_beam/cli package, with --help and 
CHANGES.md marking it experimental, so flags can still change.
   
   Later, separate PRs could add more subcommands. The first proposed is beam 
pipe --from SOURCE --to SINK, which builds a two-step YAML pipeline to convert 
files between CSV, JSON, Parquet and Avro, with --dry-run to print the YAML 
instead of running it. Each would be discussed in its own PR.
   
   Design doc: <[Apache Beam CLI Design 
Proposal](https://docs.google.com/document/d/1TKEeGGokrcOZhFIdUD-JKgkRfm9a2EYPBkaZyJlnHy4/edit?usp=sharing),
 comments enabled>
   
   
   ### Issue Priority
   
   Priority: 2 (default / most feature requests should be filed as P2)
   
   ### Issue Components
   
   - [x] Component: Python SDK
   - [ ] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [x] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Prism Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


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