{"record":{"id":"c6540e0c8385dfef","repo":"pentaho/pentaho-kettle","slug":"ldifinput-log-nofield","errorCode":"LDIFInput.Log.NoField","errorMessage":"LDIFInput.Log.NoField","messagePattern":"LDIFInput\\.Log\\.NoField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInput.java","lineNumber":318,"sourceCode":"\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          // Get total previous fields\n          data.totalpreviousfields = data.inputRowMeta.size();\n\n          // Create convert meta-data objects that will contain Date & Number formatters\n          data.convertRowMeta = data.outputRowMeta.cloneToType( ValueMetaInterface.TYPE_STRING );\n\n          // Check is filename field is provided\n          if ( Utils.isEmpty( meta.getDynamicFilenameField() ) ) {\n            logError( BaseMessages.getString( PKG, \"LDIFInput.Log.NoField\" ) );\n            throw new KettleException( BaseMessages.getString( PKG, \"LDIFInput.Log.NoField\" ) );\n          }\n\n          // cache the position of the field\n          if ( data.indexOfFilenameField < 0 ) {\n            data.indexOfFilenameField = getInputRowMeta().indexOfValue( meta.getDynamicFilenameField() );\n            if ( data.indexOfFilenameField < 0 ) {\n              // The field is unreachable !\n              logError( BaseMessages.getString( PKG, \"LDIFInput.Log.ErrorFindingField\" )\n                + \"[\" + meta.getDynamicFilenameField() + \"]\" );\n              throw new KettleException( BaseMessages.getString(\n                PKG, \"LDIFInput.Exception.CouldnotFindField\", meta.getDynamicFilenameField() ) );\n            }\n          }\n\n        } // End if first\n        String filename = environmentSubstitute( getInputRowMeta().getString( data.readrow, data.indexOfFilenameField ) );\n        if ( isDetailed() ) {\n          logDetailed( BaseMessages.getString( PKG, \"LDIFInput.Log.FilenameInStream\", meta","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/ldifinput/LDIFInput.java#L300-L336","documentation":"LDIFInput.openNextFile throws this when the step is configured with 'filename defined in a field' (fileInFields) but the 'filename field' setting is empty. The step needs a previous-row field to supply the LDIF file name; without it there is no way to open a file, so it aborts with 'No field specified'.","triggerScenarios":"In the LDIF Input step dialog, 'Accept filenames from previous step' / dynamic filename mode is enabled but meta.getDynamicFilenameField() returns empty/null when openNextFile runs (first row arrives).","commonSituations":"User enabled 'get filename from field' but left the field dropdown empty; transformation copy/paste lost the field setting; field name refers to a renamed upstream field so config appears set but is stale.","solutions":["Open the LDIF Input step and select the actual filename field in the dynamic-filename dropdown.","Ensure the upstream step actually outputs that field (check 'Preview' of the previous step).","If files should be static instead, disable the 'filename from field' option and list files directly.","Save and re-run the transformation."],"exampleFix":"// before (step XML/meta)\n// dynamicFilenameField = \"\" (empty) with fileInFields=true\n// after\n// dynamicFilenameField = \"filename\"  (a field emitted by the previous step)","handlingStrategy":"validation","validationCode":"// In transformation setup, before run:\nStepMeta ldifStep = transMeta.findStep(\"LDIF Input\");\nLDIFInputMeta meta = (LDIFInputMeta) ldifStep.getStepMetaInterface();\nif (meta.acceptsFilenames() && (meta.getDynamicFilenameField() == null || meta.getDynamicFilenameField().isEmpty())) {\n  throw new IllegalStateException(\"LDIF 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(\"Configure the filename field in the LDIF Input step\");\n  }\n}","preventionTips":["Always pick a filename field when enabling 'filename from previous step'","Preview upstream output to confirm the field exists","Avoid hand-editing .ktr XML for step settings"],"tags":["kettle","pentaho","configuration","ldif","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"}