{"record":{"id":"19f0d6cec168c34f","repo":"pentaho/pentaho-kettle","slug":"field-0-couldn-t-be-found-in-the-input-stream-19f0d6","errorCode":null,"errorMessage":"Field [ {0} ] couldn't be found in the input stream!","messagePattern":"Field \\[ (.+?) \\] couldn't be found in the input stream!","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java","lineNumber":94,"sourceCode":"\n      // Check if field list is filled\n      if ( data.nrfields == 0 ) {\n        throw new KettleException( BaseMessages.getString( PKG,\n            \"SalesforceUpdateDialog.FieldsMissing.DialogMessage\" ) );\n      }\n\n      // Create the output row meta-data\n      data.inputRowMeta = getInputRowMeta().clone();\n      data.outputRowMeta = data.inputRowMeta.clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n                      metaStore );\n\n      // Build the mapping of input position to field name\n      data.fieldnrs = new int[meta.getUpdateStream().length];\n      for ( int i = 0; i < meta.getUpdateStream().length; i++ ) {\n        data.fieldnrs[i] = getInputRowMeta().indexOfValue( meta.getUpdateStream()[i] );\n        if ( data.fieldnrs[i] < 0 ) {\n          throw new KettleException( \"Field [\" + meta.getUpdateStream()[i]\n              + \"] couldn't be found in the input stream!\" );\n        }\n      }\n    }\n\n    try {\n      writeToSalesForce( outputRowData );\n\n    } catch ( Exception e ) {\n      throw new KettleStepException( BaseMessages.getString( PKG, \"SalesforceUpdate.log.Exception\" ), e );\n    }\n    return true;\n  }\n\n  @VisibleForTesting\n    void writeToSalesForce( Object[] rowData ) throws KettleException {\n    try {\n","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/salesforce/core/src/main/java/org/pentaho/di/trans/steps/salesforceupdate/SalesforceUpdate.java#L76-L112","documentation":"In SalesforceUpdate.processRow(), for each configured update stream field, the step looks up its index in the incoming row metadata via getInputRowMeta().indexOfValue(). If a configured field name is not present in the incoming stream (index < 0), it throws a KettleException: 'Field [X] couldn't be found in the input stream!'. This is a hard fail-fast check to prevent sending wrong data to Salesforce.","triggerScenarios":"Running the step when a field named in the 'Update stream' (or lookup) column of the mapping grid does not exist in the rows arriving on the input hop — renaming/deleting an upstream field, changing field casing, or a Select Values step dropping the field.","commonSituations":"Upstream step renamed an output field; CSV/text input columns changed; wrong hop connected to the Salesforce Update step; case-sensitive mismatch (Kettle field names are case-sensitive).","solutions":["Open the Salesforce Update step and correct the field name in the 'Update stream' column to match the incoming row field exactly (case included).","Inspect the incoming fields (right-click the hop / View input fields) and align the mapping grid.","Add or fix the upstream step (Text File Input, Select Values, etc.) so the field is actually produced.","Use 'Get Fields' in the step dialog to re-populate from the real input stream."],"exampleFix":"// before: mapping references a removed field\nupdateStream[i] = \"cust_id\";   // upstream renamed it\n// after\nupdateStream[i] = \"customer_id\"; // matches upstream field","handlingStrategy":"validation","validationCode":"// Verify every configured update field exists in the input row metadata before running\nRowMetaInterface input = transMeta.getPrevStepFields(stepMeta);\nSalesforceUpdateMeta meta = (SalesforceUpdateMeta) stepMeta.getStepMetaInterface();\nfor (String field : meta.getUpdateStream()) {\n  if (input.indexOfValue(field) < 0) {\n    throw new IllegalArgumentException(\"Field [\" + field + \"] missing from input stream of \"\n      + stepMeta.getName());\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"couldn't be found in the input stream\")) {\n    log.error(\"Mapping references a non-existent field: {}\", e.getMessage());\n  }\n  throw e;\n}","preventionTips":["Use 'Get Fields' in the step dialog so mapping names come from the actual stream.","Re-check mappings after renaming upstream fields or changing Select Values steps.","Remember Kettle field names are case-sensitive.","Run transMeta.check(remarks, ...) during development to catch field mismatches early."],"tags":["kettle","field-mapping","validation","salesforce"],"backgroundTag":"field-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"}