{"record":{"id":"82f661c3b6bd9a38","repo":"pentaho/pentaho-kettle","slug":"mappingdialog-exception-specifiedstepwasnotfound","errorCode":"MappingDialog.Exception.SpecifiedStepWasNotFound","errorMessage":"The Mapping source step name, '{0}', could not be found. Please specify a different name and try again.","messagePattern":"The Mapping source step name, '(.+?)', could not be found\\. Please specify a different name and try again\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/mapping/MappingHelper.java","lineNumber":218,"sourceCode":"  }\n\n  public RowMetaInterface getFieldsFromStep( TransMeta transMeta, TransMeta mappingTransMeta, String stepName,\n                                             String inputStepName, boolean getTransformationStep,\n                                             boolean mappingInput ) throws KettleException {\n    if ( mappingInput == getTransformationStep ) {\n      return getFieldsFromParentTrans( inputStepName, transMeta, stepName );\n    } else {\n      return getFieldsFromMappingTrans( inputStepName, mappingTransMeta, mappingInput );\n    }\n  }\n\n  private RowMetaInterface getFieldsFromParentTrans( String inputStepName, TransMeta transMeta, String stepName ) throws KettleException {\n    if ( Utils.isEmpty( inputStepName ) ) {\n      return transMeta.getPrevStepFields( stepName );\n    } else {\n      StepMeta stepMeta = transMeta.findStep( inputStepName );\n      if ( stepMeta == null ) {\n        throw new KettleException( BaseMessages.getString(\n            PKG, \"MappingDialog.Exception.SpecifiedStepWasNotFound\", inputStepName ) );\n      }\n      return transMeta.getStepFields( stepMeta );\n    }\n  }\n\n  private RowMetaInterface getFieldsFromMappingTrans( String inputStepName, TransMeta mappingTransMeta, boolean mappingInput ) throws KettleException {\n    if ( mappingTransMeta == null ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"MappingDialog.Exception.NoMappingSpecified\" ) );\n    }\n\n    if ( Utils.isEmpty( inputStepName ) ) {\n      String[] stepNames = MappingHelper.getMappingSteps( mappingTransMeta, mappingInput );\n      if ( stepNames.length > 1 ) {\n        throw new KettleException( BaseMessages.getString(\n            PKG, \"MappingDialog.Exception.OnlyOneMappingInputStepAllowed\", \"\" + stepNames.length ) );\n      }\n      if ( stepNames.length == 0 ) {","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/mapping/MappingHelper.java#L200-L236","documentation":"Thrown by MappingHelper.getFieldsFromParentTrans when the input-step name configured on the Mapping (sub-transformation) step cannot be resolved via TransMeta.findStep() in the parent transformation. The library uses this lookup to determine which parent-transformation step supplies the field metadata; a null result means the configured name points to nothing.","triggerScenarios":"getFieldsFromStep -> getFieldsFromParentTrans with a non-empty inputStepName that findStep() fails to match, i.e. the step name stored in the Mapping step's input/output mapping definition no longer exists in the parent transformation.","commonSituations":"The referenced step was renamed or deleted after configuring the Mapping step; the mapping definition was copied between transformations; metadata imported from another repository where the step name differs.","solutions":["Open the Mapping step dialog and re-select a valid source step from the parent transformation","Check for typos or trailing whitespace in the configured input step name","Recreate the mapping definition after any step rename so the stored name updates","Diff the transformation XML (entry <input_step> or equivalent) against the actual step names"],"exampleFix":"// before (stale name in mapping definition)\nString inputStepName = \"Old Step Name\"; // step was renamed\n// after\nString inputStepName = \"Renamed Step Name\"; // re-picked in Mapping dialog so it matches findStep()","handlingStrategy":"validation","validationCode":"// before using the Mapping step\nif (transMeta.findStep(inputStepName) == null) {\n  throw new IllegalArgumentException(\"Step '\" + inputStepName + \"' not found in parent transformation\");\n}","typeGuard":"boolean stepExists(TransMeta tm, String name) { return name != null && tm.findStep(name) != null; }","tryCatchPattern":"try {\n  RowMetaInterface fields = helper.getFieldsFromStep(...);\n} catch (KettleException e) {\n  logError(\"Mapping source step not found: \" + e.getMessage());\n  // surface a dialog/message telling the user to re-pick the step\n}","preventionTips":["Re-open and re-save the Mapping step dialog after renaming any step","Avoid hand-editing step names in the transformation XML","Keep sub-transformation and parent steps in sync when refactoring"],"tags":["kettle","mapping","step-not-found","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}