{"record":{"id":"bac4c80cf0e64b57","repo":"pentaho/pentaho-kettle","slug":"e-selectvaluesmeta","errorCode":null,"errorMessage":"e","messagePattern":"e","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/selectvalues/SelectValuesMeta.java","lineNumber":374,"sourceCode":"        for ( String fieldName : extra ) {\n          ValueMetaInterface extraValue = inputRowMeta.searchValueMeta( fieldName );\n          row.addValueMeta( extraValue );\n        }\n      }\n\n      // OK, now remove all from r and re-add row:\n      inputRowMeta.clear();\n      inputRowMeta.addRowMeta( row );\n    }\n  }\n\n  public void getDeleteFields( RowMetaInterface inputRowMeta ) throws KettleStepException {\n    if ( deleteName != null && deleteName.length > 0 ) { // DESELECT values from the stream...\n      for ( int i = 0; i < deleteName.length; i++ ) {\n        try {\n          inputRowMeta.removeValueMeta( deleteName[i] );\n        } catch ( KettleValueException e ) {\n          throw new KettleStepException( e );\n        }\n      }\n    }\n  }\n\n  // Not called anywhere else in Pentaho. It's important to call the method below passing in the VariableSpace\n  @Deprecated\n  public void getMetadataFields( RowMetaInterface inputRowMeta, String name ) throws KettlePluginException {\n    getMetadataFields( inputRowMeta, name, null );\n  }\n\n  public void getMetadataFields( RowMetaInterface inputRowMeta, String name, VariableSpace space ) throws KettlePluginException {\n    if ( meta != null && meta.length > 0 ) {\n      // METADATA mode: change the meta-data of the values mentioned...\n\n      for ( int i = 0; i < meta.length; i++ ) {\n        SelectMetadataChange metaChange = meta[i];\n","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/selectvalues/SelectValuesMeta.java#L356-L392","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the Select Values Delete tab and correct or remove the nonexistent field name","Verify the exact field name/case present in the stream using the 'Preview' of the previous step","Fix or restore the upstream step that previously produced the field","Make the delete list match current stream layout (rename mismatched entries)","Use a Data Grid or dummy run to inspect actual incoming fields before configuring the step"],"exampleFix":"// before: delete list references removed field\ndeleteName = new String[] { \"oldField\" }; // no longer in stream\n// after: keep list in sync with upstream output\ndeleteName = new String[] { \"renamedField\" }; // matches current upstream field name","handlingStrategy":"validation","validationCode":"// Verify delete names exist in the incoming row meta before getFields()\nfor ( String name : deleteName ) {\n  if ( name != null && !inputRowMeta.searchValueMeta( name ).isPresentOrNullCheck() ) {\n    // equivalently: inputRowMeta.indexOfValue(name) < 0\n    throw new IllegalStateException( \"Delete field not in stream: \" + name );\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  step.getFields( outputRowMeta, \"step\", null, null, null );\n} catch ( KettleStepException e ) {\n  if ( e.getCause() instanceof KettleValueException ) {\n    logError( \"Field listed in Delete tab does not exist in the stream\" );\n  }\n  throw e;\n}","preventionTips":["After renaming/removing upstream fields, update the Select Values Delete tab","Use step Preview to confirm exact field names and casing before configuring deletes","Keep the delete list synchronized with upstream output in version-controlled transformations"],"tags":["row-metadata","field-not-found","select-values","configuration"],"backgroundTag":"resource-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}