pentaho/pentaho-kettle · error · KettleException
Unable to find field '
Error message
Unable to find field '
What it means
Thrown in SapInput.processRow() while pre-computing parameter indexes: a SapParameter references a fieldName that does not exist in the incoming row stream (indexOfValue returned -1). The transformation aborts because the SAP call cannot map its inputs.
Solutions
- Open the SAP Input step and re-select the parameter fields from the current input row structure.
- Fix the upstream step so it emits the field name the SAP step expects.
- Verify exact spelling/case/trim of field names between the producer step and the SAP parameter list.
- Run 'Get Fields' in the SAP Input dialog after changing upstream metadata.
- Add a Select Values step to rename/reorder fields before the SAP Input step if needed.
Example fix
// before
int index = getInputRowMeta().indexOfValue( parameter.getFieldName() );
if ( index < 0 ) { throw new KettleException(...); }
// after — trim/case-insensitive lookup
int index = getInputRowMeta().indexOfValue( parameter.getFieldName().trim() );
if ( index < 0 ) {
for ( int i = 0; i < getInputRowMeta().size(); i++ ) {
if ( getInputRowMeta().getValueMeta(i).getName().equalsIgnoreCase(parameter.getFieldName()) ) { index = i; break; }
}
} Defensive patterns
Strategy: validation
Validate before calling
// before the SAP Input step, verify all parameter fields exist in the input row
RowMetaInterface in = transMeta.getPrevStepFields(stepMeta);
for ( SapParameter p : meta.getParameters() ) {
if ( in.indexOfValue(p.getFieldName()) < 0 ) {
throw new KettleException("Configured SAP parameter field '" + p.getFieldName() + "' missing from input stream");
}
} Type guard
boolean fieldExists(RowMetaInterface row, String name) {
return name != null && row != null && row.indexOfValue(name.trim()) >= 0;
} Prevention
- After changing upstream steps, always re-run 'Get Fields' in the SAP Input dialog.
- Avoid manual renaming of fields feeding the SAP step; use Select Values explicitly.
- Trim configured field names to prevent whitespace mismatches.
- Include the SAP step in metadata-check jobs to catch missing fields early.
When it happens
Trigger: getInputRowMeta().indexOfValue(parameter.getFieldName()) returns -1, i.e. a field configured as a SAP parameter was renamed upstream, removed, or the field name in the SAP step config has wrong case/whitespace.
Common situations: Upstream step (e.g. Text File Input, Table Input) changed column names; transformation edited after the SAP parameter list was configured; trailing spaces in the configured field name.
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
- GetTableNames.Exception.CouldnotFindField
- AccessInput.Exception.CouldnotFindField
- AccessInput.Log.NoField
- AddSequence.Exception.NoSpecifiedMethod
- AnalyticQueryMeta.Exception.SubjectFieldNotFound
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b2d35186cde4bc43.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/sap/core/src/main/java/org/pentaho/di/trans/steps/sapinput/SapInput.java:77
return false;
}
if ( first ) {
first = false;
// Determine the output row metadata of this step
//
data.outputRowMeta = new RowMeta();
meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
metaStore );
// Pre-calculate the indexes of the parameters for performance reasons...
//
data.parameterIndexes = new ArrayList<Integer>();
for ( SapParameter parameter : meta.getParameters() ) {
int index = getInputRowMeta().indexOfValue( parameter.getFieldName() );
if ( index < 0 ) {
throw new KettleException( "Unable to find field '" + parameter.getFieldName() + "'" );
}
data.parameterIndexes.add( index );
}
// Pre-calculate the output fields
//
data.output = new ArrayList<SAPField>();
for ( SapOutputField outputField : meta.getOutputFields() ) {
SAPField field =
new SAPField( outputField.getSapFieldName(), outputField.getTableName(), "output_"
+ outputField.getSapType().getDescription() );
data.output.add( field );
}
}
// Assemble the list of input fields for the SAP function execution...
//
ArrayList<SAPField> input = new ArrayList<SAPField>();View on GitHub (pinned to f3058517a1)