pentaho/pentaho-kettle · error · KettleException
Field could not be found in the input rows.
Error message
Field {0} could not be found in the input rows. What it means
PentahoReportingOutput.processRow() resolves meta.getInputFileField() in the incoming row's metadata when 'use values from fields' is enabled. If indexOfValue returns < 0 the field is absent from the input rows, so it throws KettleException 'Field {0} could not be found in the input rows.' Note the source also contains an upstream copy-paste bug for the output field (it re-checks inputFieldIndex), so this exact throw fires for the input field.
Solutions
- Open the Pentaho Reporting Output step and correct the 'input file field' to a column that actually exists in the incoming stream.
- Check the preceding step(s) and ensure the filename column is produced with the exact same name and case.
- Use 'Get Fields' on the stream to verify available column names.
- If the field is genuinely missing, add/fix the upstream step that should supply it.
Example fix
// before
meta.setInputFileField("report_file"); // stream has "filename"
// after
meta.setInputFileField("filename"); // matches upstream column Defensive patterns
Strategy: validation
Validate before calling
// before executing the transform, in code that builds the meta:
String inputField = meta.getInputFileField();
if (inputRowMeta.indexOfValue(inputField) < 0) {
throw new IllegalStateException("input file field missing from stream: " + inputField);
} Try / catch
try {
step.processRow();
} catch (KettleException e) {
if (e.getMessage().contains("could not be found in the input rows")) {
// fix the field mapping in the step dialog and re-run
} else { throw e; }
} Prevention
- Always pick fields via 'Get Fields'/dropdown rather than typing names.
- Re-verify step settings after changing any upstream step.
- Keep column names stable across the pipeline.
When it happens
Trigger: Running the transformation with 'Use values from fields' enabled while the 'input file field' setting names a column that the previous step does not emit (renamed, deleted, wrong case, or stream changed upstream).
Common situations: Upstream step edited to drop/rename the filename column; field name typo or case mismatch; connecting the reporting step to a different hop than intended.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- PentahoReportingOutput.Exception.CanNotFindField
- AccessInput.Exception.CouldnotFindField
- AccessInput.Log.NoField
- AutoDoc.Exception.UnableToRenderReport
- Calculator.Error.UnableFindField
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2ee123b651ab49f6.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutput.java:133
boolean result = true;
// For every row we read, we execute a report
//
Object[] r = getRow();
// All done, signal this to the next steps...
//
if ( r == null ) {
setOutputDone();
return false;
}
if ( first ) {
first = false;
if ( meta.getUseValuesFromFields() ) {
data.inputFieldIndex = getInputRowMeta().indexOfValue( meta.getInputFileField() );
if ( data.inputFieldIndex < 0 ) {
throw new KettleException( BaseMessages.getString(
PKG, "PentahoReportingOutput.Exception.CanNotFindField", meta.getInputFileField() ) );
}
data.outputFieldIndex = getInputRowMeta().indexOfValue( meta.getOutputFileField() );
if ( data.inputFieldIndex < 0 ) {
throw new KettleException( BaseMessages.getString(
PKG, "PentahoReportingOutput.Exception.CanNotFindField", meta.getOutputFileField() ) );
}
}
}
performPentahoReportingBoot( log, getClass() );
String sourceFilename = meta.getUseValuesFromFields()
? getInputRowMeta().getString( r, data.inputFieldIndex ) : meta.getInputFile();
String targetFilename = meta.getUseValuesFromFields()
? getInputRowMeta().getString( r, data.outputFieldIndex ) : meta.getOutputFile();
processReport( r, sourceFilename, targetFilename, meta.getOutputProcessorType(), meta.getCreateParentfolder() );
View on GitHub (pinned to f3058517a1)