diff --git a/sdks/python/apache_beam/yaml/yaml_combine.py b/sdks/python/apache_beam/yaml/yaml_combine.py index 4d2193c822491..a28bef52ea315 100644 --- a/sdks/python/apache_beam/yaml/yaml_combine.py +++ b/sdks/python/apache_beam/yaml/yaml_combine.py @@ -70,7 +70,7 @@ def normalize_combine(spec): def normalize_agg(dest, agg): if isinstance(agg, str): agg = {'fn': agg} - if 'value' not in agg and spec.get('language') != 'sql': + if 'value' not in agg and config.get('language') != 'sql': agg['value'] = dest if isinstance(agg['fn'], str): agg['fn'] = {'type': agg['fn']} diff --git a/website/www/site/content/en/documentation/sdks/yaml-combine.md b/website/www/site/content/en/documentation/sdks/yaml-combine.md index b49d9b079f77a..dadeee8879a77 100644 --- a/website/www/site/content/en/documentation/sdks/yaml-combine.md +++ b/website/www/site/content/en/documentation/sdks/yaml-combine.md @@ -63,7 +63,7 @@ field name col2: sum ``` -One can aggregate over may fields at once +One can aggregate over many fields at once ``` - type: Combine @@ -103,7 +103,7 @@ As with all transforms, `Combine` can take a windowing parameter - type: Combine windowing: type: fixed - size: 60 + size: 60s config: group_by: col1 combine: @@ -118,7 +118,7 @@ parameters from upstream, e.g. - type: WindowInto windowing: type: fixed - size: 60 + size: 60s - type: Combine config: group_by: col1 diff --git a/website/www/site/content/en/documentation/sdks/yaml-inline-python.md b/website/www/site/content/en/documentation/sdks/yaml-inline-python.md index fff43cf547886..e951711022f78 100644 --- a/website/www/site/content/en/documentation/sdks/yaml-inline-python.md +++ b/website/www/site/content/en/documentation/sdks/yaml-inline-python.md @@ -103,8 +103,6 @@ is interpreted as the Python code. For example constructor: __constructor__ kwargs: source: | - import apache_beam as beam - def create_my_transform(inc): return beam.Map(lambda x: beam.Row(a=x.col2 + inc)) diff --git a/website/www/site/content/en/documentation/sdks/yaml.md b/website/www/site/content/en/documentation/sdks/yaml.md index f52e07fd71849..d4829c1635227 100644 --- a/website/www/site/content/en/documentation/sdks/yaml.md +++ b/website/www/site/content/en/documentation/sdks/yaml.md @@ -118,7 +118,7 @@ from the YAML file, use the command: ``` -gcloud beta dataflow yaml run $JOB_NAME \ +gcloud dataflow yaml run $JOB_NAME \ --yaml-pipeline-file=pipeline.yaml \ --region=$REGION ```