apache/beam · error · ValueError

Invalid value " " for "type". An invalid input " " was…

Error message

Invalid value "{type}" for "type". An invalid input "{input}" was specified.

What it means

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.

Solutions

  1. Correct the input name in the 'outer' list to match an actual inputs key.
  2. List the valid keys from the inputs mapping and compare.
  3. Keep input tag names consistent across equalities and type config.

Example fix

// before
type: {outer: [input1, input3]}
// after
type: {outer: [input1, input2]}
Defensive patterns

Strategy: validation

Validate before calling

if isinstance(t, dict) and 'outer' in t:
    unknown = [i for i in t['outer'] if i not in inputs]
    if unknown:
        raise ValueError(f'unknown inputs in outer list: {unknown}; valid={list(inputs)}')

Prevention

When it happens

Trigger: type: {outer: [input1, input3]} when inputs are only input1/input2; typos or case mismatches in input tag names.

Common situations: Renaming inputs elsewhere in the YAML without updating the outer list; copy-pasting join configs between pipelines with different input names.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/149fa5c2dd0e54a2. Report an issue: GitHub.

Appendix: source

Thrown at sdks/python/apache_beam/yaml/yaml_join.py:54

def _validate_type(type, pcolls):
  error_prefix = f'Invalid value "{type}" for "type".'
  if not isinstance(type, dict) and not isinstance(type, str):
    raise ValueError(f'{error_prefix} It must be a dict or a str.')
  if isinstance(type, dict):
    error = ValueError(
        f'{error_prefix} When specifying a dict for type, '
        f'it must follow this format: '
        f'{{"outer": [list of inputs to outer join]}}. '
        f'Example: {{"outer": ["input1", "input2"]}}')
    if (len(type) != 1 or next(iter(type)) != 'outer' or
        not isinstance(type['outer'], list)):
      raise error
    for input in type['outer']:
      if input not in list(pcolls.keys()):
        raise ValueError(
            f'{error_prefix} An invalid input "{input}" was specified.')
  if isinstance(type, str) and type not in ('inner', 'outer', 'left', 'right'):
    raise ValueError(
        f'{error_prefix} When specifying the value for type as a str, '
        f'it must be one of the following: "inner", "outer", "left", "right"')


def _validate_equalities(equalities, pcolls):
  error_prefix = f'Invalid value "{equalities}" for "equalities".'

  valid_cols = {
      name: set(
          dict(fields).keys() if fields and all(
              isinstance(field, tuple) for field in fields) else fields)
      for (name, pcoll) in pcolls.items()
      for fields in [getattr(pcoll.element_type, '_fields', [])]
  }

  if isinstance(equalities, str):
    for cols in valid_cols.values():
      if equalities not in cols:

View on GitHub (pinned to 12126d8942)