pentaho/pentaho-kettle · error · KettleStepException

MappingMeta.Exception.UnableToFindMetadataInfo

MappingMeta.Exception.UnableToFindMetadataInfo

Error message

Unable to find step '{0}' to determine the row metadata for the mapping input.

What it means

Thrown in MappingMeta.getFields when the mapping definition's inputStepname is not present in the step's configured info steps (getInfoSteps), so the row metadata for the mapping input cannot be located. The named step must be registered as an info step for metadata lookup.

Solutions

  1. Reconnect the source step via an Info hop so it appears in the step's info steps
  2. Update the mapping definition's input step name to one of the current info steps
  3. Check getInfoSteps() configuration in the Mapping step dialog (Input Source tab)

Example fix

// before
mappingDefinition.setInputStepname("Detached Step"); // not in info steps
// after
mappingDefinition.setInputStepname("Mapping Input"); // present in getInfoSteps()
Defensive patterns

Strategy: validation

Validate before calling

// before getFields
String[] infoSteps = meta.getInfoSteps();
if (Const.indexOfString(definition.getInputStepname(), infoSteps) < 0) {
  logError("Input step '" + definition.getInputStepname() + "' is not an info step");
}

Type guard

boolean isRegisteredInfoStep(MappingMeta meta, String stepName) { return Const.indexOfString(stepName, meta.getInfoSteps()) >= 0; }

Try / catch

try {
  meta.getFields(...);
} catch (KettleStepException e) {
  logError("Mapping input step not among info steps: " + e.getMessage());
  // reconnect the hop / fix the Input Source tab
}

Prevention

When it happens

Trigger: getFields -> Const.indexOfString(definition.getInputStepname(), getInfoSteps()) returns -1, i.e. the input step name in the mapping definition is not among the info-step names passed to the step.

Common situations: The step feeding the mapping was removed from the Info hop; the mapping definition references a step that is not wired as an info stream; step renamed after the definition was saved.

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 pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/0e7efb0c463d6606. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mapping/MappingMeta.java:472

          for ( MappingValueRename valueRename : definition.getValueRenames() ) {
            ValueMetaInterface valueMeta = inputRowMeta.searchValueMeta( valueRename.getSourceValueName() );
            if ( valueMeta == null ) {
              throw new KettleStepException( BaseMessages.getString(
                PKG, "MappingMeta.Exception.UnableToFindField", valueRename.getSourceValueName() ) );
            }
            valueMeta.setName( valueRename.getTargetValueName() );
          }
        }
      } else {
        // The row metadata that goes to the info mapping input comes from the
        // specified step
        // In fact, it's one of the info steps that is going to contain this
        // information...
        //
        String[] infoSteps = getInfoSteps();
        int infoStepIndex = Const.indexOfString( definition.getInputStepname(), infoSteps );
        if ( infoStepIndex < 0 ) {
          throw new KettleStepException( BaseMessages.getString(
            PKG, "MappingMeta.Exception.UnableToFindMetadataInfo", definition.getInputStepname() ) );
        }
        if ( info[infoStepIndex] != null ) {
          inputRowMeta = info[infoStepIndex].clone();
        } else {
          inputRowMeta = null;
        }
      }

      // What is this mapping input step?
      //
      StepMeta mappingInputStep = mappingTransMeta.findMappingInputStep( definition.getOutputStepname() );

      // We're certain it's a MappingInput step...
      //
      MappingInputMeta mappingInputMeta = (MappingInputMeta) mappingInputStep.getStepMetaInterface();

      // Inform the mapping input step about what it's going to receive...

View on GitHub (pinned to f3058517a1)