pentaho/pentaho-kettle · error · KettleStepException

Source field [

Error message

Source field [

What it means

Thrown while the Validator reads allowed values from the source info step's rows: the configured sourcing field is not present in the actual row metadata coming from that step (indexOfValue returns -1). The message names the missing source field and says it was not found in the source row data.

Solutions

  1. Check the source step's output fields and correct the sourcing field name (case-sensitive).
  2. Preview the source step (right-click > Preview) to confirm the column exists.
  3. Re-select the correct source step if the hop points to the wrong step.
  4. Add the needed column upstream (e.g. via Select Values) if the source legitimately lacks it.

Example fix

// before
field.setSourcingField("Status_Codes");
// after (match actual output of source step)
field.setSourcingField("status_code");
Defensive patterns

Strategy: validation

Validate before calling

// Before execution: verify sourcing field exists in source step output
RowMetaInterface srcFields = sourceStepMeta.getStepMetaInterface().getFields(...);
if (srcFields.indexOfValue(field.getSourcingField()) < 0)
  throw new IllegalStateException("Sourcing field not in source output: " + field.getSourcingField());

Try / catch

try {
  trans.startThreads();
} catch (KettleStepException e) {
  if (e.getMessage().startsWith("Source field [")) {
    String f = e.getMessage().replaceAll("Source field \\[(.+?)\\].*", "$1");
    logError("Sourcing field not found: " + f);
  }
}

Prevention

When it happens

Trigger: readSourceValuesFromInfoSteps reading rows via getRowFrom(allowedRowSet); fieldIndex stays < 0 and allowedRowMeta.indexOfValue(field.getSourcingField()) returns -1 — source step's row layout doesn't contain the expected column.

Common situations: Source step renamed/removed the field; case mismatch between configured and actual field; source step outputs different layout than when configured; wrong source step selected.

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/cc5e6754bc077e6e. Report an issue: GitHub.

Appendix: source

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

        // The data is stored in data.listValues[i] and data.constantsMeta
        //
        String stepName = streams.get( i ).getStepname();
        if ( inputStepWasProcessed.containsKey( stepName ) ) {
          // step was processed for other StreamInterface
          data.listValues[ i ] = data.listValues[ inputStepWasProcessed.get( stepName ) ];
          data.constantsMeta[ i ] = data.constantsMeta[ inputStepWasProcessed.get( stepName ) ];
          continue;
        }
        RowSet allowedRowSet = findInputRowSet( stepName );
        int fieldIndex = -1;
        List<Object> allowedValues = new ArrayList<Object>();
        Object[] allowedRowData = getRowFrom( allowedRowSet );
        while ( allowedRowData != null ) {
          RowMetaInterface allowedRowMeta = allowedRowSet.getRowMeta();
          if ( fieldIndex < 0 ) {
            fieldIndex = allowedRowMeta.indexOfValue( field.getSourcingField() );
            if ( fieldIndex < 0 ) {
              throw new KettleStepException( "Source field ["
                + field.getSourcingField() + "] is not found in the source row data" );
            }
            data.constantsMeta[ i ] = allowedRowMeta.getValueMeta( fieldIndex );
          }
          Object allowedValue = allowedRowData[ fieldIndex ];
          if ( allowedValue != null ) {
            allowedValues.add( allowedValue );
          }

          // Grab another row too...
          //
          allowedRowData = getRowFrom( allowedRowSet );
        }
        // Set the list values in the data block...
        //
        data.listValues[ i ] = allowedValues.toArray( new Object[ allowedValues.size() ] );
        inputStepWasProcessed.put( stepName, i );
      }

View on GitHub (pinned to f3058517a1)