{"record":{"id":"7745ec6f399bdb6f","repo":"pentaho/pentaho-kettle","slug":"jobexecutor-exception-unabletofindfield","errorCode":"JobExecutor.Exception.UnableToFindField","errorMessage":"JobExecutor.Exception.UnableToFindField","messagePattern":"JobExecutor\\.Exception\\.UnableToFindField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutor.java","lineNumber":373,"sourceCode":"    // TODO: make this optional/user-defined later\n    if ( data.executorJob != null ) {\n      KettleLogStore.discardLines( data.executorJob.getLogChannelId(), false );\n    }\n  }\n\n  private void passParametersToJob() throws KettleException {\n    // Set parameters, when fields are used take the first row in the set.\n    //\n    JobExecutorParameters parameters = meta.getParameters();\n\n    String value;\n\n    for ( int i = 0; i < parameters.getVariable().length; i++ ) {\n      String fieldName = parameters.getField()[i];\n      if ( !Utils.isEmpty( fieldName ) ) {\n        int idx = getInputRowMeta().indexOfValue( fieldName );\n        if ( idx < 0 ) {\n          throw new KettleException( BaseMessages.getString(\n            PKG, \"JobExecutor.Exception.UnableToFindField\", fieldName ) );\n        }\n        value = data.groupBuffer.get( 0 ).getString( idx, \"\" );\n        this.setVariable( parameters.getVariable()[ i ], value );\n      }\n    }\n\n    StepWithMappingMeta.activateParams( data.executorJob, data.executorJob, this, data.executorJob.listParameters(),\n      parameters.getVariable(), parameters.getInput(), meta.getParameters().isInheritingAllVariables() );\n  }\n\n  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {\n    meta = (JobExecutorMeta) smi;\n    data = (JobExecutorData) sdi;\n\n    if ( super.init( smi, sdi ) ) {\n      // First we need to load the mapping (transformation)\n      try {","sourceCodeStart":355,"sourceCodeEnd":391,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutor.java#L355-L391","documentation":"Thrown in passParametersToJob when a field name configured as a source for a job parameter does not exist in the input row. The step resolves each parameter's field via getInputRowMeta().indexOfValue(fieldName); a -1 result aborts with this error naming the missing field.","triggerScenarios":"In the JobExecutor step's Parameters tab, a 'Field' column value is set (non-empty) but the incoming stream has no field of that name — typically after an upstream rename/removal or a typo in the field name.","commonSituations":"Renaming a field upstream without updating the Parameters tab; connecting the step to a stream with a different layout; case-sensitive name mismatch (Kettle field lookup is case-sensitive); whitespace in the configured field name.","solutions":["Open the step's Parameters tab and fix the Field name to match an actual input field (check exact case/spelling)","Preview the step's input to list available field names and pick the correct one","If the parameter should be a static value instead, clear the Field column and set a static Value","Add or rename the field in an upstream step so it exists before JobExecutor runs"],"exampleFix":"// before\nParameter 'PARAM_CUSTOMER_ID', field: customerid  (input field is 'customer_id')\n// after\nParameter 'PARAM_CUSTOMER_ID', field: customer_id","handlingStrategy":"validation","validationCode":"// Verify all parameter source fields exist in the input layout before execution\nRowMetaInterface input = trans.getTransMeta().getPrevStepFields(stepName);\nfor ( String field : jobExecutorMeta.getFieldParameters() ) {\n  if ( !Const.isEmpty(field) && input.indexOfValue(field) < 0 ) {\n    throw new IllegalArgumentException(\"Parameter source field '\" + field + \"' missing from input\");\n  }\n}","typeGuard":"boolean parameterFieldsExist(RowMetaInterface rowMeta, String[] fieldNames) {\n  for ( String f : fieldNames ) {\n    if ( f != null && !f.trim().isEmpty() && rowMeta.indexOfValue(f) < 0 ) return false;\n  }\n  return true;\n}","tryCatchPattern":"try {\n  passParametersToJob();\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains(\"UnableToFindField\") ) {\n    logError(\"Parameter field not found in input: \" + e.getMessage());\n    // fail fast with a config-level message; do not retry\n  } else { throw e; }\n}","preventionTips":["Select parameter field names from the step dialog dropdown rather than typing them","Re-verify the Parameters tab after any upstream transformation refactor","Remember field lookups are case-sensitive: match names exactly","Use static Values for parameters that don't need to come from the stream"],"tags":["pentaho-kettle","parameters","field-lookup","configuration"],"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"}