{"record":{"id":"21b1cd1cbbd01203","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-field-in-the-input-rows","errorCode":null,"errorMessage":"Unable to find field [] in the input rows","messagePattern":"Unable to find field \\[\\] in the input rows","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoaderMeta.java","lineNumber":772,"sourceCode":"\n  public SQLStatement getSQLStatements( TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,\n    Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    SQLStatement retval = new SQLStatement( stepMeta.getName(), databaseMeta, null ); // default: nothing to do!\n\n    if ( databaseMeta != null ) {\n      if ( prev != null && prev.size() > 0 ) {\n        // Copy the row\n        RowMetaInterface tableFields = new RowMeta();\n\n        // Now change the field names\n        for ( int i = 0; i < fieldTable.length; i++ ) {\n          ValueMetaInterface v = prev.searchValueMeta( fieldStream[i] );\n          if ( v != null ) {\n            ValueMetaInterface tableField = v.clone();\n            tableField.setName( fieldTable[i] );\n            tableFields.addValueMeta( tableField );\n          } else {\n            throw new KettleStepException( \"Unable to find field [\" + fieldStream[i] + \"] in the input rows\" );\n          }\n        }\n\n        if ( !Utils.isEmpty( tableName ) ) {\n          Database db = new Database( loggingObject, databaseMeta );\n          db.shareVariablesWith( transMeta );\n          try {\n            db.connect();\n\n            String schemaTable =\n              databaseMeta.getQuotedSchemaTableCombination(\n                transMeta.environmentSubstitute( schemaName ), transMeta.environmentSubstitute( tableName ) );\n            String sql = db.getDDL( schemaTable, tableFields, null, false, null, true );\n\n            if ( sql.length() == 0 ) {\n              retval.setSQL( null );\n            } else {\n              retval.setSQL( sql );","sourceCodeStart":754,"sourceCodeEnd":790,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/oracle-bulk-loader/impl/src/main/java/org/pentaho/di/trans/steps/orabulkloader/OraBulkLoaderMeta.java#L754-L790","documentation":"Thrown by OraBulkLoaderMeta.getFields() when building the output row layout for the Oracle bulk load. For each mapped field, the step looks up the incoming stream field name via RowMetaInterface.searchValueMeta; if a configured stream field name does not exist in the previous step's row metadata, the mapping is broken and the step fails fast with this message naming the missing field.","triggerScenarios":"A field listed in fieldStream[] (the 'Field stream' mapping in the OraBulkLoader dialog) is not present in the row metadata coming from the previous transform. Typically the mapping table was built, saved, and the upstream step was later renamed or removed the field.","commonSituations":"Renaming a field in a Select values / Table input step upstream without updating the OraBulkLoader mapping; running a transformation where an earlier conditionally-skipped step no longer emits the column; copying a transformation between environments with different schemas; hand-editing transformation XML/ktr files.","solutions":["Open the OraBulkLoader step dialog and remove or correct the stream field that no longer exists in the input","Check the upstream step's output fields (right-click > Show output fields) and re-map the field with its new name","If upstream columns are dynamic, add a 'Select values' step that guarantees the expected field names before the loader","Re-open and re-save the transformation to rebuild the mapping if it was edited in XML directly"],"exampleFix":"// before (mapping references removed field)\nfieldStream = new String[] { \"cust_id\", \"cust_nmme\" };\n// after (name matches upstream Select values output)\nfieldStream = new String[] { \"cust_id\", \"cust_name\" };","handlingStrategy":"validation","validationCode":"// Before executing the transformation, verify mapped stream fields exist:\nRowMetaInterface prev = transMeta.getPrevStepFields( stepname );\nfor ( String f : meta.getFieldStream() ) {\n  if ( f != null && prev.searchValueMeta( f ) == null ) {\n    throw new IllegalStateException( \"Field not produced upstream: \" + f );\n  }\n}","typeGuard":null,"tryCatchPattern":"try { stepMeta.check( remarks, transMeta, prev, new String[]{stepname}, null, null, null ); } catch ( KettleStepException e ) { log.error( \"Broken field mapping: \" + e.getMessage() ); }","preventionTips":["Re-run 'Get fields' in the loader dialog after changing upstream steps","Avoid renaming upstream fields without updating downstream mappings; use lineage checks","Use the transformation's Check/verify feature before running","Keep schemas consistent across environments"],"tags":["kettle","pdi","transformation","field-mapping","oracle-bulk-loader"],"backgroundTag":"schema-validation-failed","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"}