This is an automated email from the ASF dual-hosted git repository.
shunping pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 33d8d702575 [YAML] - update readme to correct pipeline calls (#36076)
33d8d702575 is described below
commit 33d8d702575f39c95c0dd591aeb45664dff68b11
Author: Derrick Williams <[email protected]>
AuthorDate: Wed Sep 10 10:02:23 2025 -0400
[YAML] - update readme to correct pipeline calls (#36076)
---
.../apache_beam/yaml/examples/transforms/jinja/import/README.md | 8 +++++++-
.../apache_beam/yaml/examples/transforms/jinja/include/README.md | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git
a/sdks/python/apache_beam/yaml/examples/transforms/jinja/import/README.md
b/sdks/python/apache_beam/yaml/examples/transforms/jinja/import/README.md
index 14052cd3a6c..d705e90b2db 100644
--- a/sdks/python/apache_beam/yaml/examples/transforms/jinja/import/README.md
+++ b/sdks/python/apache_beam/yaml/examples/transforms/jinja/import/README.md
@@ -28,6 +28,8 @@ General setup:
export
PIPELINE_FILE=apache_beam/yaml/examples/transforms/jinja/import/wordCountImport.yaml
export KINGLEAR="gs://dataflow-samples/shakespeare/kinglear.txt"
export TEMP_LOCATION="gs://MY-BUCKET/wordCounts/"
+export PROJECT="MY-PROJECT"
+export REGION="MY-REGION"
cd <PATH_TO_BEAM_REPO>/beam/sdks/python
```
@@ -35,6 +37,8 @@ cd <PATH_TO_BEAM_REPO>/beam/sdks/python
Multiline Run Example:
```sh
python -m apache_beam.yaml.main \
+ --project=${PROJECT} \
+ --region=${REGION} \
--yaml_pipeline_file="${PIPELINE_FILE}" \
--jinja_variables='{
"readFromTextTransform": {"path": "'"${KINGLEAR}"'"},
@@ -59,5 +63,7 @@ python -m apache_beam.yaml.main \
Single Line Run Example:
```sh
-python -m apache_beam.yaml.main --yaml_pipeline_file="${PIPELINE_FILE}"
--jinja_variables='{"readFromTextTransform": {"path":
"gs://dataflow-samples/shakespeare/kinglear.txt"}, "mapToFieldsSplitConfig":
{"language": "python", "fields":{"value":"1"}},
"explodeTransform":{"fields":"word"}, "combineTransform":{"group_by":"word",
"combine":{"value":"sum"}}, "mapToFieldsCountConfig":{"language": "python",
"fields":{"output":"word + \" - \" + str(value)"}},
"writeToTextTransform":{"path":"${TE [...]
+python -m apache_beam.yaml.main --project=${PROJECT} --region=${REGION} \
+--yaml_pipeline_file="${PIPELINE_FILE}"
--jinja_variables='{"readFromTextTransform":
+{"path": "'"${KINGLEAR}"'"}, "mapToFieldsSplitConfig": {"language": "python",
"fields":{"value":"1"}}, "explodeTransform":{"fields":"word"},
"combineTransform":{"group_by":"word", "combine":{"value":"sum"}},
"mapToFieldsCountConfig":{"language": "python", "fields":{"output":"word + \" -
\" + str(value)"}}, "writeToTextTransform":{"path":"'"${TEMP_LOCATION}"'"}}'
```
diff --git
a/sdks/python/apache_beam/yaml/examples/transforms/jinja/include/README.md
b/sdks/python/apache_beam/yaml/examples/transforms/jinja/include/README.md
index 9b056e9906d..e4e39e7193c 100644
--- a/sdks/python/apache_beam/yaml/examples/transforms/jinja/include/README.md
+++ b/sdks/python/apache_beam/yaml/examples/transforms/jinja/include/README.md
@@ -27,6 +27,8 @@ General setup:
export
PIPELINE_FILE=apache_beam/yaml/examples/transforms/jinja/include/wordCountInclude.yaml
export KINGLEAR="gs://dataflow-samples/shakespeare/kinglear.txt"
export TEMP_LOCATION="gs://MY-BUCKET/wordCounts/"
+export PROJECT="MY-PROJECT"
+export REGION="MY-REGION"
cd <PATH_TO_BEAM_REPO>/beam/sdks/python
```
@@ -34,6 +36,8 @@ cd <PATH_TO_BEAM_REPO>/beam/sdks/python
Multiline Run Example:
```sh
python -m apache_beam.yaml.main \
+ --project=${PROJECT} \
+ --region=${REGION} \
--yaml_pipeline_file="${PIPELINE_FILE}" \
--jinja_variables='{
"readFromTextTransform": {"path": "'"${KINGLEAR}"'"},
@@ -58,6 +62,8 @@ python -m apache_beam.yaml.main \
Single Line Run Example:
```sh
-python -m apache_beam.yaml.main --yaml_pipeline_file="${PIPELINE_FILE}"
--jinja_variables='{"readFromTextTransform": {"path":
"gs://dataflow-samples/shakespeare/kinglear.txt"}, "mapToFieldsSplitConfig":
{"language": "python", "fields":{"value":"1"}},
"explodeTransform":{"fields":"word"}, "combineTransform":{"group_by":"word",
"combine":{"value":"sum"}}, "mapToFieldsCountConfig":{"language": "python",
"fields":{"output":"word + \" - \" + str(value)"}},
"writeToTextTransform":{"path":"${TE [...]
+python -m apache_beam.yaml.main --project=${PROJECT} --region=${REGION} \
+--yaml_pipeline_file="${PIPELINE_FILE}"
--jinja_variables='{"readFromTextTransform":
+{"path": "'"${KINGLEAR}"'"}, "mapToFieldsSplitConfig": {"language": "python",
"fields":{"value":"1"}}, "explodeTransform":{"fields":"word"},
"combineTransform":{"group_by":"word", "combine":{"value":"sum"}},
"mapToFieldsCountConfig":{"language": "python", "fields":{"output":"word + \" -
\" + str(value)"}}, "writeToTextTransform":{"path":"'"${TEMP_LOCATION}"'"}}'
```