{"record":{"id":"23d540b21a2d996c","repo":"pentaho/pentaho-kettle","slug":"mappinginput-exception-unabletofindmappedvalue-unable-to","errorCode":"MappingInput.Exception.UnableToFindMappedValue","errorMessage":"Unable to connect find mapped value with name '{0}'.","messagePattern":"Unable to connect find mapped value with name '(.+?)'\\.","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInputMeta.java","lineNumber":250,"sourceCode":"    // That is because there is no previous step to this mapping input step from the viewpoint of this single\n    // sub-transformation.\n    // From the viewpoint of the transformation that executes the mapping, it's important to know what comes out at the\n    // exit points.\n    // For that reason we need to re-order etc, based on the input specification...\n    //\n    if ( inputRowMeta != null && !inputRowMeta.isEmpty() ) {\n      // this gets set only in the parent transformation...\n      // It includes all the renames that needed to be done\n      //\n      // First rename any fields...\n      if ( valueRenames != null ) {\n        for ( MappingValueRename valueRename : valueRenames ) {\n          ValueMetaInterface valueMeta = inputRowMeta.searchValueMeta( valueRename.getSourceValueName() );\n          if ( valueMeta == null ) {\n            // ok, let's search once again, now using target name\n            valueMeta = inputRowMeta.searchValueMeta( valueRename.getTargetValueName() );\n            if ( valueMeta == null ) {\n              throw new KettleStepException( BaseMessages.getString(\n                PKG, \"MappingInput.Exception.UnableToFindMappedValue\", valueRename.getSourceValueName() ) );\n            }\n          } else {\n            valueMeta.setName( valueRename.getTargetValueName() );\n          }\n        }\n      }\n\n      if ( selectingAndSortingUnspecifiedFields ) {\n        // Select the specified fields from the input, re-order everything and put the other fields at the back,\n        // sorted...\n        //\n        RowMetaInterface newRow = new RowMeta();\n\n        for ( int i = 0; i < fieldName.length; i++ ) {\n          int index = inputRowMeta.indexOfValue( fieldName[ i ] );\n          if ( index < 0 ) {\n            throw new KettleStepException( BaseMessages.getString(","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInputMeta.java#L232-L268","documentation":"During metadata propagation, MappingInputMeta.getFields() applies each MappingValueRename to the input row metadata. If neither the source nor the target field name exists in the input row metadata, it throws this KettleStepException. It means the mapping's rename spec references a field the incoming rows (or the designer's resolved metadata) simply do not contain.","triggerScenarios":"getFields(): inputRowMeta.searchValueMeta(sourceValueName) is null and the retry with targetValueName is also null while iterating valueRenames.","commonSituations":"Field renamed/deleted upstream after the mapping was saved; wrong sub-transformation selected; missing hop metadata at design time; renamed database columns changing field names before the Mapping Input step.","solutions":["Update the Mapping step's field mappings so sourceValueName matches a real incoming field.","Preview the upstream step output in the parent transformation to confirm the field name.","Re-select/regenerate the mapping fields in the Mapping Input step dialog.","Check for case sensitivity or whitespace differences in field names."],"exampleFix":"// before: rename spec for a field that no longer exists\nnew MappingValueRename(\"cust_id_old\", \"customer_id\");\n// after\nnew MappingValueRename(\"cust_id\", \"customer_id\");","handlingStrategy":"validation","validationCode":"for (MappingValueRename r : valueRenames) {\n  boolean src = inputRowMeta.searchValueMeta(r.getSourceValueName()) != null;\n  boolean tgt = inputRowMeta.searchValueMeta(r.getTargetValueName()) != null;\n  if (!src && !tgt) {\n    throw new IllegalStateException(\"Mapping references unknown field: \" + r.getSourceValueName());\n  }\n}","typeGuard":"boolean mappableField(RowMetaInterface meta, MappingValueRename r) {\n  return meta.searchValueMeta(r.getSourceValueName()) != null || meta.searchValueMeta(r.getTargetValueName()) != null;\n}","tryCatchPattern":"try {\n  trans.waitUntilFinished();\n} catch (KettleStepException e) {\n  if (e.getMessage().contains(\"Unable to connect find mapped value\")) {\n    // re-sync Mapping step field mappings with upstream fields\n  }\n  throw e;\n}","preventionTips":["Validate mapping renames against upstream field metadata before execution.","Re-open and re-save the Mapping step after upstream schema changes.","Use 'Get Fields' in the Mapping dialogs rather than manual entry.","Check both source and target names — the library retries with the target name."],"tags":["kettle","pdi","field-mapping","row-metadata","rename"],"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"}