{"record":{"id":"2b044e53ebd1d289","repo":"pentaho/pentaho-kettle","slug":"loadfileinput-log-nofield","errorCode":"LoadFileInput.Log.NoField","errorMessage":"LoadFileInput.Log.NoField","messagePattern":"LoadFileInput\\.Log\\.NoField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInput.java","lineNumber":100,"sourceCode":"        }\n\n        if ( first ) {\n          first = false;\n\n          data.inputRowMeta = getInputRowMeta();\n          data.outputRowMeta = data.inputRowMeta.clone();\n          meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,\n            metaStore );\n\n          // Create convert meta-data objects that will contain Date & Number formatters\n          // All non binary content is handled as a String. It would be converted to the target type after the processing.\n          data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );\n\n          if ( meta.getFileInFields() ) {\n            // Check is filename field is provided\n            if ( Utils.isEmpty( meta.getDynamicFilenameField() ) ) {\n              logError( BaseMessages.getString( PKG, \"LoadFileInput.Log.NoField\" ) );\n              throw new KettleException( BaseMessages.getString( PKG, \"LoadFileInput.Log.NoField\" ) );\n            }\n\n            // cache the position of the field\n            if ( data.indexOfFilenameField < 0 ) {\n              data.indexOfFilenameField = data.inputRowMeta.indexOfValue( meta.getDynamicFilenameField() );\n              if ( data.indexOfFilenameField < 0 ) {\n                // The field is unreachable !\n                logError( BaseMessages.getString( PKG, \"LoadFileInput.Log.ErrorFindingField\" )\n                  + \"[\" + meta.getDynamicFilenameField() + \"]\" );\n                throw new KettleException( BaseMessages.getString(\n                  PKG, \"LoadFileInput.Exception.CouldnotFindField\", meta.getDynamicFilenameField() ) );\n              }\n            }\n            // Get the number of previous fields\n            data.totalpreviousfields = data.inputRowMeta.size();\n\n          }\n        } // end if first","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/loadfileinput/LoadFileInput.java#L82-L118","documentation":"LoadFileInput.openNextFile throws this when the step is set to take filenames from an incoming field ('file content in field' / dynamic filename mode) but the 'filename field' setting is empty. Without a source field the step cannot determine which file to load, so it aborts with Log.NoField.","triggerScenarios":"meta.getFileInFields() is true and the first row triggers openNextFile, but meta.getDynamicFilenameField() is empty/null.","commonSituations":"User enabled 'filename defined in a field' but never selected the field; transformation copied between environments losing the setting; upstream step that previously supplied the field was removed.","solutions":["Open Load File Input settings and choose the actual filename field from the dropdown.","Confirm the upstream step outputs that field (Preview the previous step).","If files are fixed, disable dynamic-filename mode and list files explicitly.","Save and rerun."],"exampleFix":"// before\n// dynamicFilenameField = \"\" with fileInFields=true\n// after\n// dynamicFilenameField = \"filepath\"  (field from previous step)","handlingStrategy":"validation","validationCode":"StepMeta lfStep = transMeta.findStep(\"Load File Input\");\nLoadFileInputMeta meta = (LoadFileInputMeta) lfStep.getStepMetaInterface();\nif (meta.getFileInFields() && (meta.getDynamicFilenameField() == null || meta.getDynamicFilenameField().isEmpty())) {\n  throw new IllegalStateException(\"Load File Input: filename field not configured\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"NoField\")) {\n    log.error(\"Set the filename field in Load File Input settings\");\n  }\n}","preventionTips":["Select the filename field whenever dynamic-filename mode is enabled","Preview upstream output before running","Avoid copying steps between transformations without re-checking settings"],"tags":["kettle","pentaho","configuration","load-file","missing-field"],"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"}