{"record":{"id":"149fa5c2dd0e54a2","repo":"apache/beam","slug":"invalid-value-type-for-type-an-invalid-input-input-was","errorCode":null,"errorMessage":"Invalid value \"{type}\" for \"type\". An invalid input \"{input}\" was specified.","messagePattern":"Invalid value \"(.+?)\" for \"type\"\\. An invalid input \"(.+?)\" was specified\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_join.py","lineNumber":54,"sourceCode":"def _validate_type(type, pcolls):\n  error_prefix = f'Invalid value \"{type}\" for \"type\".'\n  if not isinstance(type, dict) and not isinstance(type, str):\n    raise ValueError(f'{error_prefix} It must be a dict or a str.')\n  if isinstance(type, dict):\n    error = ValueError(\n        f'{error_prefix} When specifying a dict for type, '\n        f'it must follow this format: '\n        f'{{\"outer\": [list of inputs to outer join]}}. '\n        f'Example: {{\"outer\": [\"input1\", \"input2\"]}}')\n    if (len(type) != 1 or next(iter(type)) != 'outer' or\n        not isinstance(type['outer'], list)):\n      raise error\n    for input in type['outer']:\n      if input not in list(pcolls.keys()):\n        raise ValueError(\n            f'{error_prefix} An invalid input \"{input}\" was specified.')\n  if isinstance(type, str) and type not in ('inner', 'outer', 'left', 'right'):\n    raise ValueError(\n        f'{error_prefix} When specifying the value for type as a str, '\n        f'it must be one of the following: \"inner\", \"outer\", \"left\", \"right\"')\n\n\ndef _validate_equalities(equalities, pcolls):\n  error_prefix = f'Invalid value \"{equalities}\" for \"equalities\".'\n\n  valid_cols = {\n      name: set(\n          dict(fields).keys() if fields and all(\n              isinstance(field, tuple) for field in fields) else fields)\n      for (name, pcoll) in pcolls.items()\n      for fields in [getattr(pcoll.element_type, '_fields', [])]\n  }\n\n  if isinstance(equalities, str):\n    for cols in valid_cols.values():\n      if equalities not in cols:","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_join.py#L36-L72","documentation":"Thrown by _validate_type when the dict-form 'type' {\"outer\": [...]} lists an input tag that does not exist among the join's input PCollections. Every name in the outer list must be a key of the inputs dict.","triggerScenarios":"type: {outer: [input1, input3]} when inputs are only input1/input2; typos or case mismatches in input tag names.","commonSituations":"Renaming inputs elsewhere in the YAML without updating the outer list; copy-pasting join configs between pipelines with different input names.","solutions":["Correct the input name in the 'outer' list to match an actual inputs key.","List the valid keys from the inputs mapping and compare.","Keep input tag names consistent across equalities and type config."],"exampleFix":"// before\ntype: {outer: [input1, input3]}\n// after\ntype: {outer: [input1, input2]}","handlingStrategy":"validation","validationCode":"if isinstance(t, dict) and 'outer' in t:\n    unknown = [i for i in t['outer'] if i not in inputs]\n    if unknown:\n        raise ValueError(f'unknown inputs in outer list: {unknown}; valid={list(inputs)}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep input tag names in sync wherever the pipeline references them","Reference list(inputs.keys()) when building the outer list programmatically","Avoid renaming inputs without updating join config"],"tags":["apache-beam","yaml","join","validation"],"backgroundTag":"resource-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"}