{"record":{"id":"9c47da62a9cdaaff","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-the-specified-fieldname","errorCode":null,"errorMessage":"Unable to find the specified fieldname '","messagePattern":"Unable to find the specified fieldname '","errorType":"validation","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java","lineNumber":102,"sourceCode":"      if ( r == null ) { // no more input to be expected...\n\n        setOutputDone();\n        return false;\n      }\n\n      data.fieldIndexes = new int[ meta.getValidations().size() ];\n\n      // Calculate the indexes of the values and arguments in the target data or temporary data\n      // We do this in advance to save time later on.\n      //\n      for ( int i = 0; i < meta.getValidations().size(); i++ ) {\n        Validation field = meta.getValidations().get( i );\n\n        if ( !Utils.isEmpty( field.getFieldName() ) ) {\n          data.fieldIndexes[ i ] = getInputRowMeta().indexOfValue( field.getFieldName() );\n          if ( data.fieldIndexes[ i ] < 0 ) {\n            // Nope: throw an exception\n            throw new KettleStepException( \"Unable to find the specified fieldname '\"\n              + field.getFieldName() + \"' for validation#\" + ( i + 1 ) );\n          }\n        } else {\n          throw new KettleStepException( \"There is no name specified for validator field #\" + ( i + 1 ) );\n        }\n      }\n    } else {\n      // Read the row AFTER the info rows\n      // That way the info-rowsets are out of the way\n      //\n      r = getRow(); // get row, set busy!\n      if ( r == null ) { // no more input to be expected...\n\n        setOutputDone();\n        return false;\n      }\n    }\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java#L84-L120","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Open the Validator step settings and verify the field name matches the upstream field exactly (case-sensitive).","Inspect the input row layout upstream (right-click > Show input fields) and update the validation entry.","Re-add the missing field upstream (e.g. Select Values / Add constants) if it must exist.","Enable 'Validate all fields' mode or use a wildcard validator if you want to validate regardless of specific fields.","Re-verify after any upstream change — validator settings do not auto-track renames."],"exampleFix":"// before (validation config references missing field)\nfield.setFieldName(\"custName\");\n// after: guard in a modified step or ensure upstream produces it\nfield.setFieldName(\"customer_name\"); // matches actual upstream field","handlingStrategy":"validation","validationCode":"// Before execution, verify configured fields exist upstream\nfor (Validation v : meta.getValidations()) {\n  RowMetaInterface in = upstreamStepMeta.getStepMetaInterface().getFields(...);\n  if (v.getFieldName() != null && in.indexOfValue(v.getFieldName()) < 0)\n    throw new IllegalStateException(\"Validator field missing upstream: \" + v.getFieldName());\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.startThreads();\n} catch (KettleStepException e) {\n  if (e.getMessage().startsWith(\"Unable to find the specified fieldname\")) {\n    String field = e.getMessage().replaceAll(\".*fieldname '([^\"]+)'.*\", \"$1\");\n    logError(\"Fix validator config for field: \" + field);\n  }\n}","preventionTips":["Right-click upstream step > Show input fields before configuring validations","Use consistent, case-exact field naming across the transformation","Re-check validator settings after any upstream field rename","Prefer wildcard/'all fields' validation for volatile schemas"],"tags":["kettle","validator","row-metadata","config"],"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"}