pentaho/pentaho-kettle · error · KettleStepException

e

Error message

e

What it means

Thrown by SelectValues.getDeleteFields() when a field listed in the step's Delete (deselect) tab does not exist in the input row metadata. inputRowMeta.removeValueMeta(name) raises KettleValueException, which is re-wrapped as a KettleStepException. This happens during getFields() when the step modifies the output row layout, meaning the configured delete name is absent from the stream.

Solutions

  1. Open the Select Values Delete tab and correct or remove the nonexistent field name
  2. Verify the exact field name/case present in the stream using the 'Preview' of the previous step
  3. Fix or restore the upstream step that previously produced the field
  4. Make the delete list match current stream layout (rename mismatched entries)
  5. Use a Data Grid or dummy run to inspect actual incoming fields before configuring the step

Example fix

// before: delete list references removed field
deleteName = new String[] { "oldField" }; // no longer in stream
// after: keep list in sync with upstream output
deleteName = new String[] { "renamedField" }; // matches current upstream field name
Defensive patterns

Strategy: validation

Validate before calling

// Verify delete names exist in the incoming row meta before getFields()
for ( String name : deleteName ) {
  if ( name != null && !inputRowMeta.searchValueMeta( name ).isPresentOrNullCheck() ) {
    // equivalently: inputRowMeta.indexOfValue(name) < 0
    throw new IllegalStateException( "Delete field not in stream: " + name );
  }
}

Try / catch

try {
  step.getFields( outputRowMeta, "step", null, null, null );
} catch ( KettleStepException e ) {
  if ( e.getCause() instanceof KettleValueException ) {
    logError( "Field listed in Delete tab does not exist in the stream" );
  }
  throw e;
}

Prevention

When it happens

Trigger: deleteName[i] passed to removeValueMeta() is not present in inputRowMeta during getDeleteFields(), invoked from getFields() while the step negotiates output row metadata — typically at transformation initialization.

Common situations: Upstream step was renamed/removed so the deleted field no longer exists, field name case mismatch, transformation edited after the field was renamed upstream, or the field is produced conditionally by a previous step.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/selectvalues/SelectValuesMeta.java:374

        for ( String fieldName : extra ) {
          ValueMetaInterface extraValue = inputRowMeta.searchValueMeta( fieldName );
          row.addValueMeta( extraValue );
        }
      }

      // OK, now remove all from r and re-add row:
      inputRowMeta.clear();
      inputRowMeta.addRowMeta( row );
    }
  }

  public void getDeleteFields( RowMetaInterface inputRowMeta ) throws KettleStepException {
    if ( deleteName != null && deleteName.length > 0 ) { // DESELECT values from the stream...
      for ( int i = 0; i < deleteName.length; i++ ) {
        try {
          inputRowMeta.removeValueMeta( deleteName[i] );
        } catch ( KettleValueException e ) {
          throw new KettleStepException( e );
        }
      }
    }
  }

  // Not called anywhere else in Pentaho. It's important to call the method below passing in the VariableSpace
  @Deprecated
  public void getMetadataFields( RowMetaInterface inputRowMeta, String name ) throws KettlePluginException {
    getMetadataFields( inputRowMeta, name, null );
  }

  public void getMetadataFields( RowMetaInterface inputRowMeta, String name, VariableSpace space ) throws KettlePluginException {
    if ( meta != null && meta.length > 0 ) {
      // METADATA mode: change the meta-data of the values mentioned...

      for ( int i = 0; i < meta.length; i++ ) {
        SelectMetadataChange metaChange = meta[i];

View on GitHub (pinned to f3058517a1)