{"record":{"id":"f9d6db1a3368c01d","repo":"pentaho/pentaho-kettle","slug":"yamlinput-log-nofield","errorCode":null,"errorMessage":"YamlInput.Log.NoField","messagePattern":"YamlInput\\.Log\\.NoField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/yaml-input/impl/src/main/java/org/pentaho/di/trans/steps/yamlinput/YamlInput.java","lineNumber":104,"sourceCode":"          logDetailed( BaseMessages.getString( PKG, \"YamlInput.Log.FinishedProcessing\" ) );\n        }\n        return false;\n      }\n\n      if ( first ) {\n        first = false;\n\n        data.outputRowMeta = getInputRowMeta().clone();\n        // Get total previous fields\n        data.totalPreviousFields = data.outputRowMeta.size();\n        data.totalOutFields = data.totalPreviousFields + data.nrInputFields;\n        meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n          metaStore );\n\n        // Check is Yaml field is provided\n        if ( Utils.isEmpty( meta.getYamlField() ) ) {\n          logError( BaseMessages.getString( PKG, \"YamlInput.Log.NoField\" ) );\n          throw new KettleException( BaseMessages.getString( PKG, \"YamlInput.Log.NoField\" ) );\n        }\n\n        // cache the position of the field\n        data.indexOfYamlField = getInputRowMeta().indexOfValue( meta.getYamlField() );\n        if ( data.indexOfYamlField < 0 ) {\n          // The field is unreachable !\n          logError( BaseMessages.getString( PKG, \"YamlInput.Log.ErrorFindingField\", meta.getYamlField() ) );\n          throw new KettleException( BaseMessages.getString( PKG, \"YamlInput.Exception.CouldnotFindField\", meta\n            .getYamlField() ) );\n        }\n      }\n\n      // get field value\n      String Fieldvalue = getInputRowMeta().getString( data.readrow, data.indexOfYamlField );\n\n      getLinesInput();\n\n      if ( log.isDetailed() ) {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/yaml-input/impl/src/main/java/org/pentaho/di/trans/steps/yamlinput/YamlInput.java#L86-L122","documentation":"readNextString throws this KettleException when the step is configured to read YAML from an incoming field ('Accepting fields' / inFields mode) but the 'Yaml field name' setting is empty. The step cannot know which incoming column contains the YAML content, so it aborts.","triggerScenarios":"readNextString (called from getOneRow) during the first row: meta.isInFields() is true and Utils.isEmpty(meta.getYamlField()) returns true, i.e. the YAML field name was never configured or was lost during serialization.","commonSituations":"Designer forgot to type the field name in the 'Yaml field name' box; metadata copied from another step lost the setting; repository/XML round-trip produced a null value; transformation exported without that attribute.","solutions":["Open the YAML Input step and set 'Yaml field name' to the name of the incoming field containing the YAML text.","Ensure the previous step actually emits a field with exactly that name (check with 'Preview' or a dummy/log step).","Verify the step metadata round-trips correctly (save/reload the transformation)."],"exampleFix":"// before: meta.setYamlField(null); // field name never set\n// after: in the step dialog / programmatically\nmeta.setYamlField(\"yaml_content\"); // must match the upstream row field name","handlingStrategy":"validation","validationCode":"// before executing, validate step metadata\nYamlInputMeta meta = (YamlInputMeta) stepMeta.getStepMetaInterface();\nif (meta.isInFields() && (meta.getYamlField() == null || meta.getYamlField().isEmpty())) {\n  throw new IllegalArgumentException(\"Yaml field name must be set when accepting fields\");\n}","typeGuard":null,"tryCatchPattern":"try { readNextString(); } catch (KettleException e) {\n  if (e.getMessage().contains(\"NoField\")) { openStepDialogToSetYamlField(); }\n}","preventionTips":["Always use the step dialog's field picker rather than typing the name manually.","Include step-metadata validation in your transformation test harness.","Round-trip test (save/reload) transformations before promoting them."],"tags":["missing-field","configuration","kettle"],"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"}