{"record":{"id":"b1e2e792349fe9d2","repo":"apache/beam","slug":"f-unknown-transform-at-line-safelineloader-get-line","errorCode":null,"errorMessage":"f'Unknown transform at line {SafeLineLoader.get_line(transform_name)}: {transform_name}'","messagePattern":"f'Unknown transform at line (.+?): (.+?)'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_transform.py","lineNumber":164,"sourceCode":"      if 'name' in spec:\n        self._uuid_by_name[spec['name']].add(spec['__uuid__'])\n      if 'type' in spec:\n        self._uuid_by_name[spec['type']].add(spec['__uuid__'])\n\n  def get_transform_id_and_output_name(self, name):\n    if '.' in name:\n      transform_name, output = name.rsplit('.', 1)\n    else:\n      transform_name, output = name, None\n    return self.get_transform_id(transform_name), output\n\n  def get_transform_id(self, transform_name):\n    if transform_name in self._transforms_by_uuid:\n      return transform_name\n    else:\n      candidates = self._uuid_by_name[transform_name]\n      if not candidates:\n        raise ValueError(\n            f'Unknown transform at line '\n            f'{SafeLineLoader.get_line(transform_name)}: {transform_name}')\n      elif len(candidates) > 1:\n        raise ValueError(\n            f'Ambiguous transform at line '\n            f'{SafeLineLoader.get_line(transform_name)}: {transform_name}')\n      else:\n        return only_element(candidates)\n\n  def get_transform_spec(self, transform_name_or_id):\n    return self._transforms_by_uuid[self.get_transform_id(transform_name_or_id)]\n\n\nclass Scope(LightweightScope):\n  \"\"\"To look up PCollections (typically outputs of prior transforms) by name.\"\"\"\n  def __init__(\n      self,\n      root,","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_transform.py#L146-L182","documentation":"Raised by Scope.get_transform_id when resolving a name reference in a YAML pipeline: the name is neither a raw UUID nor present in the name-to-UUID index built from transform specs. Because SafeLineLoader tracks YAML line numbers, the message pinpoints the line of the offending reference. The input at fault is a misspelled or dangling reference to a transform name (or type) in inputs/outputs or another reference field.","triggerScenarios":"Thrown at sdks/python/apache_beam/yaml/yaml_transform.py:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the referenced name to match an existing transform's 'name' or 'type' in the pipeline spec","Define the referenced transform or remove the dangling reference","Check the reported YAML line for typos, quoting, or wrong indentation"],"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"}