pentaho/pentaho-kettle · error · KettleException

JobExecutor.Exception.UnableToFindField

JobExecutor.Exception.UnableToFindField

Error message

JobExecutor.Exception.UnableToFindField

What it means

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.

Solutions

  1. Open the step's Parameters tab and fix the Field name to match an actual input field (check exact case/spelling)
  2. Preview the step's input to list available field names and pick the correct one
  3. If the parameter should be a static value instead, clear the Field column and set a static Value
  4. Add or rename the field in an upstream step so it exists before JobExecutor runs

Example fix

// before
Parameter 'PARAM_CUSTOMER_ID', field: customerid  (input field is 'customer_id')
// after
Parameter 'PARAM_CUSTOMER_ID', field: customer_id
Defensive patterns

Strategy: validation

Validate before calling

// Verify all parameter source fields exist in the input layout before execution
RowMetaInterface input = trans.getTransMeta().getPrevStepFields(stepName);
for ( String field : jobExecutorMeta.getFieldParameters() ) {
  if ( !Const.isEmpty(field) && input.indexOfValue(field) < 0 ) {
    throw new IllegalArgumentException("Parameter source field '" + field + "' missing from input");
  }
}

Type guard

boolean parameterFieldsExist(RowMetaInterface rowMeta, String[] fieldNames) {
  for ( String f : fieldNames ) {
    if ( f != null && !f.trim().isEmpty() && rowMeta.indexOfValue(f) < 0 ) return false;
  }
  return true;
}

Try / catch

try {
  passParametersToJob();
} catch ( KettleException e ) {
  if ( e.getMessage().contains("UnableToFindField") ) {
    logError("Parameter field not found in input: " + e.getMessage());
    // fail fast with a config-level message; do not retry
  } else { throw e; }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/7745ec6f399bdb6f. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutor.java:373

    // TODO: make this optional/user-defined later
    if ( data.executorJob != null ) {
      KettleLogStore.discardLines( data.executorJob.getLogChannelId(), false );
    }
  }

  private void passParametersToJob() throws KettleException {
    // Set parameters, when fields are used take the first row in the set.
    //
    JobExecutorParameters parameters = meta.getParameters();

    String value;

    for ( int i = 0; i < parameters.getVariable().length; i++ ) {
      String fieldName = parameters.getField()[i];
      if ( !Utils.isEmpty( fieldName ) ) {
        int idx = getInputRowMeta().indexOfValue( fieldName );
        if ( idx < 0 ) {
          throw new KettleException( BaseMessages.getString(
            PKG, "JobExecutor.Exception.UnableToFindField", fieldName ) );
        }
        value = data.groupBuffer.get( 0 ).getString( idx, "" );
        this.setVariable( parameters.getVariable()[ i ], value );
      }
    }

    StepWithMappingMeta.activateParams( data.executorJob, data.executorJob, this, data.executorJob.listParameters(),
      parameters.getVariable(), parameters.getInput(), meta.getParameters().isInheritingAllVariables() );
  }

  public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
    meta = (JobExecutorMeta) smi;
    data = (JobExecutorData) sdi;

    if ( super.init( smi, sdi ) ) {
      // First we need to load the mapping (transformation)
      try {

View on GitHub (pinned to f3058517a1)