You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "twang126 (via GitHub)" <gi...@apache.org> on 2023/03/22 17:22:51 UTC
[GitHub] [beam] twang126 commented on a diff in pull request #25935: Add a source and sink option to yaml pipelines.
twang126 commented on code in PR #25935:
URL: https://github.com/apache/beam/pull/25935#discussion_r1145174968
##########
sdks/python/apache_beam/yaml/yaml_transform_test.py:
##########
@@ -68,6 +68,25 @@ def test_chain_with_input(self):
''')
assert_that(result, equal_to([41, 43, 47, 53, 61, 71, 83, 97, 113, 131]))
+ def test_chain_with_source_sink(self):
+ with beam.Pipeline(options=beam.options.pipeline_options.PipelineOptions(
+ pickle_library='cloudpickle')) as p:
+ elements = p | beam.Create(range(10))
+ result = elements | YamlTransform(
+ '''
+ type: chain
+ source:
+ type: Create
+ elements: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Review Comment:
In this test, we seed `elements` with `beam.Create(range(10))` and then also add a source to the chain with what seems to be the same operation. Sorry if I am misunderstanding, but are both required? I would have guessed that the source transform in the YAML could replace having to do the manual `p | beam.Create(range(10))`.
--
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org