apache/beam · error · ValueError
'No output transforms detected.'
Error message
'No output transforms detected.'
What it means
Raised by create_test when generating an expected-inputs skeleton: it scans the pipeline's transforms for anything that consumes output (LogForTesting transforms, transforms with explicit outputs, or sinks whose type starts with 'Write') and found none. Without at least one output-consuming transform there is nothing to attach assertions to, so test generation fails.
Solutions
- Add a sink (e.g. a Write* transform) or a LogForTesting transform to the pipeline so output is consumed
- Add explicit 'output' to a transform so it is treated as an output transform
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sdks/python/apache_beam/yaml/yaml_testing.py:454 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/49611162ccffd75b.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/python/apache_beam/yaml/yaml_testing.py:454
_try_row_as_dict(row)
for row in _first_n(t, options, max_num_inputs, providers)
],
} for t in input_transforms]
output_transforms = [
t for t in transform_spec['transforms'] if t['type'] == 'LogForTesting' or
yaml_transform.empty_if_explicitly_empty(t.get('output', [])) or
t['type'].startswith('Write')
]
expected_inputs = [{
'name': get_name(t),
'elements': [],
} for t in output_transforms]
if not expected_inputs:
# TODO: Optionally take this as a parameter.
raise ValueError('No output transforms detected.')
num_inputs = min_num_outputs
while True:
test_spec = {
'mock_outputs': [{
'name': t['name'],
'elements': random.sample(
t['elements'], min(len(t['elements']), num_inputs)),
} for t in mock_outputs],
'expected_inputs': expected_inputs,
}
fixes = run_test(pipeline_spec, test_spec, options, fix_failures=True)
if len(fixes) < len(output_transforms):
actual_output_size = 0
else:
actual_output_size = min(len(e) for e in fixes.values())
if actual_output_size >= min_num_outputs:
breakView on GitHub (pinned to 12126d8942)