{"record":{"id":"49611162ccffd75b","repo":"apache/beam","slug":"no-output-transforms-detected","errorCode":null,"errorMessage":"'No output transforms detected.'","messagePattern":"'No output transforms detected\\.'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_testing.py","lineNumber":454,"sourceCode":"          _try_row_as_dict(row)\n          for row in _first_n(t, options, max_num_inputs, providers)\n      ],\n  } for t in input_transforms]\n\n  output_transforms = [\n      t for t in transform_spec['transforms'] if t['type'] == 'LogForTesting' or\n      yaml_transform.empty_if_explicitly_empty(t.get('output', [])) or\n      t['type'].startswith('Write')\n  ]\n\n  expected_inputs = [{\n      'name': get_name(t),\n      'elements': [],\n  } for t in output_transforms]\n\n  if not expected_inputs:\n    # TODO: Optionally take this as a parameter.\n    raise ValueError('No output transforms detected.')\n\n  num_inputs = min_num_outputs\n  while True:\n    test_spec = {\n        'mock_outputs': [{\n            'name': t['name'],\n            'elements': random.sample(\n                t['elements'], min(len(t['elements']), num_inputs)),\n        } for t in mock_outputs],\n        'expected_inputs': expected_inputs,\n    }\n    fixes = run_test(pipeline_spec, test_spec, options, fix_failures=True)\n    if len(fixes) < len(output_transforms):\n      actual_output_size = 0\n    else:\n      actual_output_size = min(len(e) for e in fixes.values())\n    if actual_output_size >= min_num_outputs:\n      break","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_testing.py#L436-L472","documentation":"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.","triggerScenarios":"Thrown at sdks/python/apache_beam/yaml/yaml_testing.py:454 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}