pentaho/pentaho-kettle · error · KettleValueException

FieldSplitter.Log.CouldNotFindFieldToSplit

Error message

FieldSplitter.Log.CouldNotFindFieldToSplit

What it means

FieldSplitter.splitField looks up the configured split field in the incoming row's RowMeta by name. If indexOfValue returns -1 — the field does not exist in the row arriving at this step — it throws this KettleValueException with the field name.

Solutions

  1. Open the FieldSplitter step and re-select the split field from the available fields list
  2. Ensure the upstream step producing the field runs before this step
  3. Run 'Verify connections/fields' on the transformation to detect broken hops
  4. If the field may be absent, use a step that adds a default value before splitting

Example fix

// before
String splitField = "old_name";
// after
String splitField = "renamed_field"; // re-pick in step dialog to match upstream output
Defensive patterns

Strategy: validation

Validate before calling

// before the step runs, check the field exists in the incoming row
RowMetaInterface in = transMeta.getPrevStepFields(stepMeta);
if (in.indexOfValue(splitFieldName) < 0) {
  throw new IllegalArgumentException("Split field missing from input: " + splitFieldName);
}

Try / catch

try {
  Object[] row = splitStep.splitField(inputRow);
} catch (KettleValueException e) {
  // route row to error handling stream / log and continue
}

Prevention

When it happens

Trigger: The step's 'split field' setting names a field that is absent from the input stream at runtime, e.g. after upstream steps were renamed, removed, or made conditional.

Common situations: Renaming or deleting an upstream field without updating the FieldSplitter config; a conditional upstream step no longer produces the field; copying a transformation between environments where the source emits different columns.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitter.java:59

  private FieldSplitterMeta meta;
  private FieldSplitterData data;

  public FieldSplitter( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
                        Trans trans ) {
    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
  }

  private Object[] splitField( Object[] r ) throws KettleException {
    if ( first ) {
      first = false;
      // get the RowMeta
      data.previousMeta = getInputRowMeta().clone();

      // search field
      data.fieldnr = data.previousMeta.indexOfValue( meta.getSplitField() );
      if ( data.fieldnr < 0 ) {
        throw new KettleValueException( BaseMessages.getString(
          PKG, "FieldSplitter.Log.CouldNotFindFieldToSplit", meta.getSplitField() ) );
      }

      // only String type allowed
      if ( !data.previousMeta.getValueMeta( data.fieldnr ).isString() ) {
        throw new KettleValueException( ( BaseMessages.getString(
          PKG, "FieldSplitter.Log.SplitFieldNotValid", meta.getSplitField() ) ) );
      }

      // prepare the outputMeta
      //
      data.outputMeta = getInputRowMeta().clone();
      meta.getFields( getTransMeta().getBowl(), data.outputMeta, getStepname(), null, null, this, repository,
        metaStore );

      // Now create objects to do string to data type conversion...
      //
      data.conversionMeta = data.outputMeta.cloneToType( ValueMetaInterface.TYPE_STRING );

View on GitHub (pinned to f3058517a1)