pentaho/pentaho-kettle · error · KettleStepException
MappingInput.Exception.UnableToFindMappedValue
MappingInput.Exception.UnableToFindMappedValue
Error message
Unable to connect find mapped value with name '{0}'. What it means
During the first pass of processRow, the Mapping Input step applies the configured field renames (MappingValueRename) to its output row metadata. If a rename spec references a source field name that does not exist in the incoming row metadata, this KettleStepException is thrown. It signals a mismatch between the mapping's field-mapping definition and the fields actually produced by the parent transformation.
Solutions
- Open the Mapping step settings in the parent transformation and correct/remove the field mapping whose source field no longer exists.
- Regenerate the field mappings: re-select the sub-transformation so fields are re-scanned from the actual output.
- Verify the upstream step in the parent transformation still produces the expected field (check its output preview).
- Check field name spelling/case in the MappingValueRename definitions.
Example fix
// before: stale rename in mapping spec
new MappingValueRename("old_amount", "amount");
// after: match the actual upstream field name
new MappingValueRename("amount_in", "amount"); Defensive patterns
Strategy: validation
Validate before calling
RowMetaInterface upstream = parentTrans.getStepFields(mappingSourceStepMeta);
for (MappingValueRename r : valueRenames) {
if (upstream.searchValueMeta(r.getSourceValueName()) == null) {
throw new IllegalStateException("Field not produced upstream: " + r.getSourceValueName());
}
} Type guard
boolean fieldExists(RowMetaInterface rowMeta, String name) { return rowMeta != null && name != null && rowMeta.searchValueMeta(name) != null; } Try / catch
try {
trans.waitUntilFinished();
} catch (KettleStepException e) {
if (e.getMessage().contains("Unable to connect find mapped value")) {
// parse field name from message, fix Mapping step field mappings
}
throw e;
} Prevention
- Re-generate mapping field definitions after any upstream field rename/delete.
- Preview upstream step output before finalizing mapping parameters.
- Keep field names consistent (case, whitespace) between parent and sub-transformation.
- Use the 'Get Fields' button in the Mapping dialogs instead of typing names.
When it happens
Trigger: data.outputRowMeta.searchValueMeta(valueRename.getSourceValueName()) returns null while iterating data.valueRenames — i.e., a MappingValueRename whose sourceValueName is absent from the parent's row layout.
Common situations: Parent transformation's field layout changed (renamed/deleted a field) after the mapping definition was saved; wrong hop wired into the Mapping step; copy-pasted mapping parameters pointing at stale field names; case-sensitive field name mismatches.
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
- MappingInput.Exception.UnableToFindMappedValue
- ScriptMeta.Exception.FieldToReplaceNotFound
- Calculator.Error.UnableFindField
- ColumnExists.Exception.CouldnotFindField
- ConcatFields.Error.RemainingFieldNotFoundInputStream
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/8dd730491213e5e4.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mappinginput/MappingInput.java:115
// The Input RowMetadata is not the same as the output row meta-data.
// The difference is described in the data interface
//
// String[] data.sourceFieldname
// String[] data.targetFieldname
//
// --> getInputRowMeta() is not corresponding to what we're outputting.
// In essence, we need to rename a couple of fields...
//
data.outputRowMeta = getInputRowMeta().clone();
// Now change the field names according to the mapping specification...
// That means that all fields go through unchanged, unless specified.
//
for ( MappingValueRename valueRename : data.valueRenames ) {
ValueMetaInterface valueMeta = data.outputRowMeta.searchValueMeta( valueRename.getSourceValueName() );
if ( valueMeta == null ) {
throw new KettleStepException( BaseMessages.getString( PKG, "MappingInput.Exception.UnableToFindMappedValue",
valueRename.getSourceValueName() ) );
}
valueMeta.setName( valueRename.getTargetValueName() );
valueMeta = getInputRowMeta().searchValueMeta( valueRename.getSourceValueName() );
if ( valueMeta == null ) {
throw new KettleStepException( BaseMessages.getString( PKG, "MappingInput.Exception.UnableToFindMappedValue",
valueRename.getSourceValueName() ) );
}
valueMeta.setName( valueRename.getTargetValueName() );
}
// This is typical side effect of ESR-4178
data.outputRowMeta.setValueMetaList( data.outputRowMeta.getValueMetaList() );
this.getInputRowMeta().setValueMetaList( this.getInputRowMeta().getValueMetaList() );
// The input row meta has been manipulated correctly for the call to meta.getFields(), so create a blank
// outputRowMetaView on GitHub (pinned to f3058517a1)