{"record":{"id":"7a9a7466e5102a36","repo":"pentaho/pentaho-kettle","slug":"jsoninput-log-nofield","errorCode":"JsonInput.Log.NoField","errorMessage":"JsonInput.Log.NoField","messagePattern":"JsonInput\\.Log\\.NoField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/JsonInput.java","lineNumber":167,"sourceCode":"      if ( !meta.isDoNotFailIfNoFile() && data.files.nrOfFiles() == 0 ) {\n        String errMsg = BaseMessages.getString( PKG, \"JsonInput.Log.NoFiles\" );\n        logError( errMsg );\n        inputError( errMsg );\n      }\n    } else {\n      data.readrow = getRow();\n      data.inputRowMeta = getInputRowMeta();\n      if ( data.inputRowMeta == null ) {\n        data.hasFirstRow = false;\n        return;\n      }\n      data.hasFirstRow = true;\n      data.outputRowMeta = data.inputRowMeta.clone();\n\n      // Check if source field is provided\n      if ( Utils.isEmpty( meta.getFieldValue() ) ) {\n        logError( BaseMessages.getString( PKG, \"JsonInput.Log.NoField\" ) );\n        throw new KettleException( BaseMessages.getString( PKG, \"JsonInput.Log.NoField\" ) );\n      }\n\n      // cache the position of the field\n      if ( data.indexSourceField < 0 ) {\n        data.indexSourceField = getInputRowMeta().indexOfValue( meta.getFieldValue() );\n        if ( data.indexSourceField < 0 ) {\n          logError( BaseMessages.getString( PKG, \"JsonInput.Log.ErrorFindingField\", meta.getFieldValue() ) );\n          throw new KettleException( BaseMessages.getString( PKG, \"JsonInput.Exception.CouldnotFindField\",\n            meta.getFieldValue() ) );\n        }\n      }\n\n      // if RemoveSourceField option is set, we remove the source field from the output meta\n      if ( meta.isRemoveSourceField() ) {\n        data.outputRowMeta.removeValueMeta( data.indexSourceField );\n        // Get total previous fields minus one since we remove source field\n        data.totalpreviousfields = data.inputRowMeta.size() - 1;\n      } else {","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/JsonInput.java#L149-L185","documentation":"JsonInput's prepareToRowProcessing throws KettleException with key JsonInput.Log.NoField when the 'Field value' (the JSON source field to parse) is empty. The step logs the same message and aborts before processing rows.","triggerScenarios":"processRow -> prepareToRowProcessing finds Utils.isEmpty(meta.getFieldValue()), i.e. no source field was selected in the step settings.","commonSituations":"Freshly added step where 'Field value' was never filled; transformation migrated from another environment losing settings; user cleared the field while editing.","solutions":["Open the JSON Input step and set the 'Field value' to the incoming field that contains the JSON text.","Run 'Get Fields' on the step to pick a valid source field from the previous step.","If settings were lost during migration, re-enter the step configuration and re-save the transformation."],"exampleFix":"// before: no source field configured\nmeta.setFieldValue( null );\n// after: point at the field holding the JSON payload\nmeta.setFieldValue( \"json_payload\" );","handlingStrategy":"validation","validationCode":"if (meta.getFieldValue() == null || meta.getFieldValue().trim().isEmpty()) {\n  throw new IllegalArgumentException(\"JSON Input requires a source 'Field value' pointing at the field containing the JSON text\");\n}","typeGuard":null,"tryCatchPattern":"try { trans.execute(...); } catch (KettleException e) { if (e.getMessage().contains(\"NoField\")) { /* open step and set the Field value */ } }","preventionTips":["Always fill the 'Field value' setting when creating the step.","Use 'Get Fields' to select an existing upstream field.","Re-verify step settings after environment migrations."],"tags":["json","configuration","kettle"],"backgroundTag":"missing-required-argument","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"}