{"record":{"id":"f0ad9ffb3b4dd5d6","repo":"apache/beam","slug":"an-invalid-input-input-was-specified-in-fields","errorCode":null,"errorMessage":"An invalid input \"{input}\" was specified in \"fields\".","messagePattern":"An invalid input \"(.+?)\" was specified in \"fields\"\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_join.py","lineNumber":118,"sourceCode":"    input_edge_list.append(tuple(equality.keys()))\n\n  if not _is_connected(input_edge_list, len(pcolls)):\n    raise ValueError(\n        f'{error_prefix} '\n        f'The provided equalities do not connect all of {list(pcolls.keys())}.')\n\n  return equalities\n\n\ndef _parse_fields(tables, fields):\n  error_prefix = f'Invalid value \"{fields}\" for \"fields\".'\n  if not isinstance(fields, dict):\n    raise ValueError(f'{error_prefix} Fields must be a dict.')\n  output_fields = []\n  named_columns = set()\n  for input, cols in fields.items():\n    if input not in tables:\n      raise ValueError(f'An invalid input \"{input}\" was specified in \"fields\".')\n    if isinstance(cols, list):\n      for col in cols:\n        if not isinstance(col, str):\n          raise ValueError(\n              f'Invalid column \"{col}\" in \"fields\". Column name must be a str.')\n        if col in named_columns:\n          raise ValueError(\n              f'The field name \"{col}\" was specified more than once.')\n        output_fields.append(f'{input}.{col} AS {col}')\n        named_columns.add(col)\n    elif isinstance(cols, dict):\n      for k, v in cols.items():\n        if k in named_columns:\n          raise ValueError(\n              f'The field name \"{k}\" was specified more than once.')\n        if not isinstance(v, str):\n          raise ValueError(\n              f'Invalid column \"{v}\" in \"fields\". Column name must be a str.')","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_join.py#L100-L136","documentation":"While parsing the 'fields' section of a YAML Join spec, _parse_fields encountered a key naming an input that is not among the transform's actual input tables; the named input is a typo or leftover from a renamed input.","triggerScenarios":"A fields key like extra: [...] where 'extra' is not one of the declared input aliases; renaming an input alias without updating fields; a typo in the alias inside fields.","commonSituations":"Hand-edited YAML with inconsistent alias names; copying the fields block from a different join config with different input names.","solutions":["Use only input aliases declared in the transform's 'input' mapping as fields keys.","Fix or remove the invalid key from fields.","Keep input aliases and fields keys in sync when renaming."],"exampleFix":"// before\ninput: {left: read_a, right: read_b}\nfields:\n  lft: [id]\n// after\ninput: {left: read_a, right: read_b}\nfields:\n  left: [id]","handlingStrategy":"validation","validationCode":"def check_fields_keys(fields, input_aliases):\n    bad = set(fields) - set(input_aliases)\n    if bad:\n        raise ValueError(f'fields keys not in inputs: {bad}')","typeGuard":null,"tryCatchPattern":"try:\n    result = SqlJoinTransform(config)\nexcept ValueError as e:\n    if 'was specified in \"fields\"' in str(e):\n        raise ConfigError('fields keys must match declared input aliases') from e\n    raise","preventionTips":["Keep fields keys and input aliases in one source of truth","Search the spec for each fields key to verify it is declared in input","Validate the spec against the input aliases before submitting the job"],"tags":["apache-beam","yaml","validation","fields"],"backgroundTag":"entity-not-found","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"}