{"record":{"id":"d1653b3da177c06f","repo":"pentaho/pentaho-kettle","slug":"getfilesrowscount-log-nofield","errorCode":null,"errorMessage":"GetFilesRowsCount.Log.NoField","messagePattern":"GetFilesRowsCount\\.Log\\.NoField","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/getfilesrowscount/GetFilesRowsCount.java","lineNumber":224,"sourceCode":"          }\n          return false;\n        }\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          // Get total previous fields\n          data.totalpreviousfields = data.inputRowMeta.size();\n\n          // Check is filename field is provided\n          if ( Utils.isEmpty( meta.setOutputFilenameField() ) ) {\n            logError( BaseMessages.getString( PKG, \"GetFilesRowsCount.Log.NoField\" ) );\n            throw new KettleException( BaseMessages.getString( PKG, \"GetFilesRowsCount.Log.NoField\" ) );\n          }\n\n          // cache the position of the field\n          if ( data.indexOfFilenameField < 0 ) {\n            data.indexOfFilenameField = getInputRowMeta().indexOfValue( meta.setOutputFilenameField() );\n            if ( data.indexOfFilenameField < 0 ) {\n              // The field is unreachable !\n              logError( BaseMessages.getString( PKG, \"GetFilesRowsCount.Log.ErrorFindingField\", meta\n                .setOutputFilenameField() ) );\n              throw new KettleException( BaseMessages.getString(\n                PKG, \"GetFilesRowsCount.Exception.CouldnotFindField\", meta.setOutputFilenameField() ) );\n            }\n          }\n\n        } // End if first\n\n        String filename = getInputRowMeta().getString( data.readrow, data.indexOfFilenameField );\n        if ( log.isDetailed() ) {","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/getfilesrowscount/GetFilesRowsCount.java#L206-L242","documentation":"GetFilesRowsCount.openNextFile() throws this KettleException (message from message bundle key GetFilesRowsCount.Log.NoField) when the 'output filename field' setting on the step is empty. The step requires a filename field name to attach the counted result to, and refuses to proceed without it.","triggerScenarios":"openNextFile (first row, called by getOneRow) executes while meta.setOutputFilenameField() returns null/empty — i.e. the step was configured without the 'filename field name' property.","commonSituations":"Step added programmatically without setting the filename field; transformation XML/repository metadata missing the field attribute; a UI save that dropped the field name.","solutions":["Open the step dialog and set the 'filename field name' (output field holding the file name).","If building metadata in code, call meta.setOutputFilenameField(\"...\", ...) before running.","Fix the transformation's stored XML/repository record to include the field attribute.","Add a pre-run validation that the field name is non-empty."],"exampleFix":"// before\nGetFilesRowsCountMeta meta = new GetFilesRowsCountMeta(); // filename field never set\n// after\nmeta.setOutputFilenameField(\"filename\");","handlingStrategy":"validation","validationCode":"if (meta.setOutputFilenameField() == null || meta.setOutputFilenameField().trim().isEmpty()) { throw new IllegalArgumentException(\"GetFilesRowsCount: output filename field must be set\"); }","typeGuard":null,"tryCatchPattern":"try { transMeta.execute(...); } catch (KettleException e) { if (e.getMessage().contains(\"NoField\")) { /* fix step config: set filename field */ } throw e; }","preventionTips":["Always set the filename field in the step dialog","Validate transformation metadata before scheduling runs","When building metadata in code, call setOutputFilenameField explicitly","Run 'Verify transformations' before execution"],"tags":["kettle","configuration","missing-field","step-config"],"backgroundTag":"missing-required-config-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"}