Repository: beam-site Updated Branches: refs/heads/asf-site f4d8614c0 -> 7ae78e1d0
Update quickstart to have runner specific examples Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/e7721f12 Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/e7721f12 Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/e7721f12 Branch: refs/heads/asf-site Commit: e7721f12258b1524a75c22ed7587e5fde05883a0 Parents: f4d8614 Author: Ahmet Altay <al...@google.com> Authored: Fri Feb 24 13:52:42 2017 -0800 Committer: Ahmet Altay <al...@google.com> Committed: Fri Feb 24 13:52:42 2017 -0800 ---------------------------------------------------------------------- src/get-started/quickstart-py.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam-site/blob/e7721f12/src/get-started/quickstart-py.md ---------------------------------------------------------------------- diff --git a/src/get-started/quickstart-py.md b/src/get-started/quickstart-py.md index 48a4d35..31a4676 100644 --- a/src/get-started/quickstart-py.md +++ b/src/get-started/quickstart-py.md @@ -72,7 +72,7 @@ For instructions using other shells, see the [virtualenv documentation](https:// `python setup.py sdist` 4. Install the Apache Beam SDK - `pip install dist/apache-beam-sdk-*.tar.gz .[gcp]` + `pip install dist/apache-beam-*.tar.gz` ## Execute a pipeline locally @@ -80,8 +80,21 @@ The Apache Beam [examples](https://github.com/apache/beam/tree/master/sdks/pytho For example, to run `wordcount.py`, run: +{:.runner-direct} ``` -python -m apache_beam.examples.wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt --output output.txt +python -m apache_beam.examples.wordcount --input README.md --output counts +``` + +{:.runner-dataflow} +``` +# As part of the initial setup, install gcp specific extra components. +pip install dist/apache-beam-*.tar.gz .[gcp] +python -m apache_beam.examples.wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \ + --output gs://<your-gcs-bucket>/counts \ + --runner DataflowRunner \ + --project your-gcp-project \ + --temp_location gs://<your-gcs-bucket>/tmp/ \ + --sdk_location dist/apache-beam-*.tar.gz ``` ## Next Steps