pentaho/pentaho-kettle · error · KettleException
Unable to find field
Error message
Unable to find field [{}] in the input fields. What it means
Thrown during the first row processed by the HL7Input step when the configured message field (meta.getMessageField()) cannot be found in the incoming row's field list (indexOfValue returns -1). The step needs to know which input column holds the raw HL7 message text it will parse.
Solutions
- Open the HL7Input step dialog and re-select the message field from the actual incoming field list
- Verify the upstream step actually outputs the configured field (use a 'Get fields' preview)
- Fix field name case/spelling to match the incoming row exactly
- Reconnect the correct previous hop if the step was wired to the wrong source
Example fix
// before (step XML/config) <message_field>mesage</message_field> // after <message_field>message</message_field>
Defensive patterns
Strategy: validation
Validate before calling
int idx = inputRowMeta.indexOfValue(meta.getMessageField());
if (idx < 0) { throw new KettleException("Field [" + meta.getMessageField() + "] missing from input rows"); } Try / catch
try { step.processRow(); } catch (KettleException e) { if (e.getMessage().contains("Unable to find field")) { /* reconfigure step field mapping */ } } Prevention
- Re-select fields in step dialogs after changing upstream steps
- Use field-name-agnostic references cautiously; prefer explicit mapping refresh
- Preview upstream rows before running the transformation
- Keep field names stable across transformations
When it happens
Trigger: processRow() with first==true calls getInputRowMeta().indexOfValue(meta.getMessageField()) and it returns -1: the field name configured in the step dialog does not match any incoming field.
Common situations: Upstream step was renamed or removed so the source field no longer exists; field name typo or case mismatch; connecting the HL7Input step to a different hop after editing the transformation; upstream step emits fields generated at runtime that differ from design time.
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
- Error parsing message
- MultiMergeJoin.Exception.UnableToFindFieldInReferenceStream
- A deadlock was detected between steps
- AggregateRowsMeta.Exception.UnableToLoadStepInfo
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/a2035751fe3c6cea.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/hl7/core/src/main/java/org/pentaho/di/trans/steps/hl7input/HL7Input.java:63
public HL7Input( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta, Trans trans ) {
super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
}
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
meta = (HL7InputMeta) smi;
data = (HL7InputData) sdi;
Object[] r = getRow(); // get row, set busy!
if ( r == null ) { // no more input to be expected...
setOutputDone();
return false;
}
if ( first ) {
data.messageFieldIndex = getInputRowMeta().indexOfValue( meta.getMessageField() );
if ( data.messageFieldIndex < 0 ) {
throw new KettleException( "Unable to find field [" + meta.getMessageField() + "] in the input fields." );
}
data.outputRowMeta = getInputRowMeta().clone();
meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
metaStore );
data.parser = new GenericParser();
data.parser.setValidationContext( new NoValidation() );
}
String messageString = getInputRowMeta().getString( r, data.messageFieldIndex );
try {
Message message = data.parser.parse( messageString );
List<HL7Value> values = HL7KettleParser.extractValues( message );
for ( HL7Value value : values ) {
Object[] output = RowDataUtil.createResizedCopy( r, data.outputRowMeta.size() );View on GitHub (pinned to f3058517a1)