You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to write some events to PubSub using Beam YAML, and I encountered the following issue:
2024-02-28 10:20:48.089 CET
File "/usr/local/lib/python3.11/site-packages/apache_beam/yaml/yaml_transform.py", line 96, in wrapper
2024-02-28 10:20:48.089 CET
self._cache[key] = func(self, *args)
2024-02-28 10:20:48.089 CET
^^^^^^^^^^^^^^^^^
2024-02-28 10:20:48.089 CET
File "/usr/local/lib/python3.11/site-packages/apache_beam/yaml/yaml_transform.py", line 283, in compute_outputs
2024-02-28 10:20:48.089 CET
return expand_transform(self._transforms_by_uuid[transform_id], self)
2024-02-28 10:20:48.089 CET
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 10:20:48.089 CET
File "/usr/local/lib/python3.11/site-packages/apache_beam/yaml/yaml_transform.py", line 457, in expand_transform
2024-02-28 10:20:48.090 CET
return expand_leaf_transform(spec, scope)
2024-02-28 10:20:48.090 CET
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-02-28 10:20:48.090 CET
File "/usr/local/lib/python3.11/site-packages/apache_beam/yaml/yaml_transform.py", line 497, in expand_leaf_transform
2024-02-28 10:20:48.090 CET
raise ValueError(
2024-02-28 10:20:48.090 CET
ValueError: Transform "WriteToPubSub" at line 9 returned an unexpected type <class 'apache_beam.pvalue.PDone'>
I utilized the latest Flex template from Google templates (Dataflow runner). To simplify the setup and isolate any potential external factors affecting the overall behavior, I modified my YAML file to its simplest form. Below is the YAML configuration I ultimately used to reproduce the error:
My assumption is that WriteToPubSub returns a PDone and it should be returning a PTransform. I managed to workaround the situation adding this to the YAML config:
What happened?
I attempted to write some events to PubSub using Beam YAML, and I encountered the following issue:
I utilized the latest Flex template from Google templates (Dataflow runner). To simplify the setup and isolate any potential external factors affecting the overall behavior, I modified my YAML file to its simplest form. Below is the YAML configuration I ultimately used to reproduce the error:
My assumption is that WriteToPubSub returns a PDone and it should be returning a PTransform. I managed to workaround the situation adding this to the YAML config:
However, I think it's still necessary to fix this issue since error_handling is optional.
Issue Priority
Priority: 3 (minor)
Issue Components
The text was updated successfully, but these errors were encountered: