Skip to content

Commit 82d60ad

Browse files
committed
A bit of cleanup in the example files.
1 parent 0326295 commit 82d60ad

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

sdks/python/apache_beam/yaml/examples/regex_matches.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
# limitations under the License.
1717
#
1818

19-
# pytype: skip-file
20-
2119
# This pipline creates a series of {plant: description} key pairs, matches all
2220
# elements to a valid regex, filters out non-matching entries, then logs the
2321
# output.
@@ -46,14 +44,14 @@ pipeline:
4644
def regex_filter(row):
4745
match = re.match("(?P<icon>[^\s,]+), *(\w+), *(\w+)", row.plant)
4846
return match.group(0) if match else match
49-
47+
5048
# Filters out None values produced by values that don't match regex
5149
- type: Filter
5250
config:
5351
language: python
5452
keep: plant
5553
- type: LogForTesting
56-
54+
5755
# Expected:
5856
# Row(plant='🍓, Strawberry, perennial')
5957
# Row(plant='🥕, Carrot, biennial')

sdks/python/apache_beam/yaml/examples/simple_filter.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#`ReadFromText` to a local file.
2121
#
2222
# To set up Application Default Credentials,
23-
# see https://cloud.google.com/docs/authentication/external/set-up-adc for more
24-
# information
23+
# see https://cloud.google.com/docs/authentication/external/set-up-adc.
2524
#
2625
# The following example reads mock transaction data from resources/products.csv
2726
# then performs a simple filter for "Electronics".

sdks/python/apache_beam/yaml/examples/simple_filter_and_combine.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
#`ReadFromText` to a local file.
2121
#
2222
# To set up Application Default Credentials,
23-
# see https://cloud.google.com/docs/authentication/external/set-up-adc for more
24-
# information
23+
# see https://cloud.google.com/docs/authentication/external/set-up-adc.
2524
#
2625
# The following example reads mock transaction data from resources/products.csv,
2726
# performs a simple filter for "Electronics", then calculates the revenue and

sdks/python/apache_beam/yaml/examples/wordcount_minimal.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
#`ReadFromText` to a local file.
2222
#
2323
# To set up Application Default Credentials,
24-
# see https://cloud.google.com/docs/authentication/external/set-up-adc for more
25-
# information
24+
# see https://cloud.google.com/docs/authentication/external/set-up-adc.
2625
#
27-
# This pipeline reads in a text file, counts distinct words found in the text,
26+
# This pipeline reads in a text file, counts distinct words found in the text,
2827
# then logs a row containing each word and its count.
2928
pipeline:
3029
type: chain
@@ -70,7 +69,7 @@ pipeline:
7069

7170
# Log out results
7271
- type: LogForTesting
73-
72+
7473
# Expected:
7574
# Row(word='king', count=311)
7675
# Row(word='lear', count=253)

0 commit comments

Comments
 (0)