{"record":{"id":"f6608822333b3aab","repo":"pentaho/pentaho-kettle","slug":"there-is-no-valid-source-field-specified-for-the-allowed","errorCode":null,"errorMessage":"There is no valid source field specified for the allowed values of validation [","messagePattern":"There is no valid source field specified for the allowed values of validation \\[","errorType":"validation","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java","lineNumber":193,"sourceCode":"    return true;\n  }\n\n  void readSourceValuesFromInfoSteps() throws KettleStepException {\n    Map<String, Integer> inputStepWasProcessed = new HashMap<>();\n    for ( int i = 0; i < meta.getValidations().size(); i++ ) {\n      Validation field = meta.getValidations().get( i );\n      List<StreamInterface> streams = meta.getStepIOMeta().getInfoStreams();\n\n      // If we need to source the allowed values data from a different step, we do this here as well\n      //\n      if ( field.isSourcingValues() ) {\n        if ( streams.get( i ).getStepMeta() == null ) {\n          throw new KettleStepException(\n            \"There is no valid source step specified for the allowed values of validation [\"\n              + field.getName() + \"]\" );\n        }\n        if ( Utils.isEmpty( field.getSourcingField() ) ) {\n          throw new KettleStepException(\n            \"There is no valid source field specified for the allowed values of validation [\"\n              + field.getName() + \"]\" );\n        }\n\n        // Still here : OK, read the data from the specified step...\n        // The data is stored in data.listValues[i] and data.constantsMeta\n        //\n        String stepName = streams.get( i ).getStepname();\n        if ( inputStepWasProcessed.containsKey( stepName ) ) {\n          // step was processed for other StreamInterface\n          data.listValues[ i ] = data.listValues[ inputStepWasProcessed.get( stepName ) ];\n          data.constantsMeta[ i ] = data.constantsMeta[ inputStepWasProcessed.get( stepName ) ];\n          continue;\n        }\n        RowSet allowedRowSet = findInputRowSet( stepName );\n        int fieldIndex = -1;\n        List<Object> allowedValues = new ArrayList<Object>();\n        Object[] allowedRowData = getRowFrom( allowedRowSet );","sourceCodeStart":175,"sourceCodeEnd":211,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/validator/Validator.java#L175-L211","documentation":"Thrown from Validator.readSourceValuesFromInfoSteps when a validation sources allowed values from another step and a source step is set, but the sourcing field name is empty. The step needs the column in the source step's rows that contains the allowed values.","triggerScenarios":"readSourceValuesFromInfoSteps: streams.get(i).getStepMeta() != null but Utils.isEmpty(field.getSourcingField()) — 'Field containing allowed values' left blank in the validation settings.","commonSituations":"Picking a source step in the dialog but not the field; copying a validation entry and clearing the field; upstream step changed so the previously chosen field no longer applies.","solutions":["Open the Validator dialog and set the sourcing field for that validation.","Verify the source step actually outputs the named field (check its input/output fields).","If allowed values are static, switch to a constants list instead of step sourcing.","Programmatically, ensure setSourcingField() is called whenever setSourcingValues(true) is used."],"exampleFix":"// before\nfield.setSourcingValues(true);\nfield.setSourcingField(\"\");\n// after\nfield.setSourcingValues(true);\nfield.setSourcingField(\"allowed_status\");\nif (Utils.isEmpty(field.getSourcingField())) throw new IllegalArgumentException(\"sourcingField required\");","handlingStrategy":"validation","validationCode":"// Before execution: sourcing validations need a non-empty sourcing field\nint i = 0;\nfor (Validation f : meta.getValidations()) {\n  if (f.isSourcingValues() && Utils.isEmpty(f.getSourcingField()))\n    throw new IllegalStateException(\"Validation [\" + f.getName() + \"] missing sourcing field\");\n  i++;\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.startThreads();\n} catch (KettleStepException e) {\n  if (e.getMessage().contains(\"no valid source field specified\")) {\n    // open validator dialog and set the sourcing field\n  }\n}","preventionTips":["Always set both source step AND sourcing field together","Copy validation entries carefully — copied rows may lose the field setting","Verify source step output columns when reconfiguring"],"tags":["kettle","validator","missing-field-name","config"],"backgroundTag":"empty-required-field","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"}