{"record":{"id":"2ee123b651ab49f6","repo":"pentaho/pentaho-kettle","slug":"field-0-could-not-be-found-in-the-input-rows","errorCode":null,"errorMessage":"Field {0} could not be found in the input rows.","messagePattern":"Field (.+?) could not be found in the input rows\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutput.java","lineNumber":133,"sourceCode":"    boolean result = true;\n\n    // For every row we read, we execute a report\n    //\n    Object[] r = getRow();\n\n    // All done, signal this to the next steps...\n    //\n    if ( r == null ) {\n      setOutputDone();\n      return false;\n    }\n    if ( first ) {\n      first = false;\n\n      if ( meta.getUseValuesFromFields() ) {\n        data.inputFieldIndex = getInputRowMeta().indexOfValue( meta.getInputFileField() );\n        if ( data.inputFieldIndex < 0 ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"PentahoReportingOutput.Exception.CanNotFindField\", meta.getInputFileField() ) );\n        }\n        data.outputFieldIndex = getInputRowMeta().indexOfValue( meta.getOutputFileField() );\n        if ( data.inputFieldIndex < 0 ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"PentahoReportingOutput.Exception.CanNotFindField\", meta.getOutputFileField() ) );\n        }\n      }\n\n    }\n    performPentahoReportingBoot( log, getClass() );\n\n    String sourceFilename = meta.getUseValuesFromFields()\n      ? getInputRowMeta().getString( r, data.inputFieldIndex ) : meta.getInputFile();\n    String targetFilename =  meta.getUseValuesFromFields()\n      ? getInputRowMeta().getString( r, data.outputFieldIndex ) : meta.getOutputFile();\n    processReport( r, sourceFilename, targetFilename, meta.getOutputProcessorType(), meta.getCreateParentfolder() );\n","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pentaho-reporting/impl/src/main/java/org/pentaho/di/trans/steps/pentahoreporting/PentahoReportingOutput.java#L115-L151","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"// before\nmeta.setInputFileField(\"report_file\"); // stream has \"filename\"\n// after\nmeta.setInputFileField(\"filename\"); // matches upstream column","handlingStrategy":"validation","validationCode":"// before executing the transform, in code that builds the meta:\nString inputField = meta.getInputFileField();\nif (inputRowMeta.indexOfValue(inputField) < 0) {\n  throw new IllegalStateException(\"input file field missing from stream: \" + inputField);\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.processRow();\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"could not be found in the input rows\")) {\n    // fix the field mapping in the step dialog and re-run\n  } else { throw e; }\n}","preventionTips":["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."],"tags":["kettle","reporting","field-mapping","transform","processrow"],"backgroundTag":"record-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"}