pentaho/pentaho-kettle · error · KettleStepException

Unable to find the specified fieldname '

Error message

Unable to find the specified fieldname '

What it means

Thrown by the Validator (Data Validator) step's processRow when a validation rule references a field name that does not exist in the incoming row. indexOfValue returns -1 and the step aborts with the field name and validation index included in the message.

Solutions

  1. Open the Validator step settings and verify the field name matches the upstream field exactly (case-sensitive).
  2. Inspect the input row layout upstream (right-click > Show input fields) and update the validation entry.
  3. Re-add the missing field upstream (e.g. Select Values / Add constants) if it must exist.
  4. Enable 'Validate all fields' mode or use a wildcard validator if you want to validate regardless of specific fields.
  5. Re-verify after any upstream change — validator settings do not auto-track renames.

Example fix

// before (validation config references missing field)
field.setFieldName("custName");
// after: guard in a modified step or ensure upstream produces it
field.setFieldName("customer_name"); // matches actual upstream field
Defensive patterns

Strategy: validation

Validate before calling

// Before execution, verify configured fields exist upstream
for (Validation v : meta.getValidations()) {
  RowMetaInterface in = upstreamStepMeta.getStepMetaInterface().getFields(...);
  if (v.getFieldName() != null && in.indexOfValue(v.getFieldName()) < 0)
    throw new IllegalStateException("Validator field missing upstream: " + v.getFieldName());
}

Try / catch

try {
  trans.startThreads();
} catch (KettleStepException e) {
  if (e.getMessage().startsWith("Unable to find the specified fieldname")) {
    String field = e.getMessage().replaceAll(".*fieldname '([^"]+)'.*", "$1");
    logError("Fix validator config for field: " + field);
  }
}

Prevention

When it happens

Trigger: processRow iterating meta.getValidations(); for validation i with non-empty fieldName, getInputRowMeta().indexOfValue(fieldName) returns < 0 — the configured field is absent from the row reaching the step.

Common situations: Upstream step renamed or removed the field; case mismatch ('Name' vs 'name'); field only exists conditionally in some rows' metadata paths; transformation changed after the validator was configured.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java:102

      if ( r == null ) { // no more input to be expected...

        setOutputDone();
        return false;
      }

      data.fieldIndexes = new int[ meta.getValidations().size() ];

      // Calculate the indexes of the values and arguments in the target data or temporary data
      // We do this in advance to save time later on.
      //
      for ( int i = 0; i < meta.getValidations().size(); i++ ) {
        Validation field = meta.getValidations().get( i );

        if ( !Utils.isEmpty( field.getFieldName() ) ) {
          data.fieldIndexes[ i ] = getInputRowMeta().indexOfValue( field.getFieldName() );
          if ( data.fieldIndexes[ i ] < 0 ) {
            // Nope: throw an exception
            throw new KettleStepException( "Unable to find the specified fieldname '"
              + field.getFieldName() + "' for validation#" + ( i + 1 ) );
          }
        } else {
          throw new KettleStepException( "There is no name specified for validator field #" + ( i + 1 ) );
        }
      }
    } else {
      // Read the row AFTER the info rows
      // That way the info-rowsets are out of the way
      //
      r = getRow(); // get row, set busy!
      if ( r == null ) { // no more input to be expected...

        setOutputDone();
        return false;
      }
    }

View on GitHub (pinned to f3058517a1)