pentaho/pentaho-kettle · error · KettleException

GetFilesRowsCount.Log.NoField

Error message

GetFilesRowsCount.Log.NoField

What it means

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.

Solutions

  1. Open the step dialog and set the 'filename field name' (output field holding the file name).
  2. If building metadata in code, call meta.setOutputFilenameField("...", ...) before running.
  3. Fix the transformation's stored XML/repository record to include the field attribute.
  4. Add a pre-run validation that the field name is non-empty.

Example fix

// before
GetFilesRowsCountMeta meta = new GetFilesRowsCountMeta(); // filename field never set
// after
meta.setOutputFilenameField("filename");
Defensive patterns

Strategy: validation

Validate before calling

if (meta.setOutputFilenameField() == null || meta.setOutputFilenameField().trim().isEmpty()) { throw new IllegalArgumentException("GetFilesRowsCount: output filename field must be set"); }

Try / catch

try { transMeta.execute(...); } catch (KettleException e) { if (e.getMessage().contains("NoField")) { /* fix step config: set filename field */ } throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: Step added programmatically without setting the filename field; transformation XML/repository metadata missing the field attribute; a UI save that dropped the field name.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/d1653b3da177c06f. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getfilesrowscount/GetFilesRowsCount.java:224

          }
          return false;
        }

        if ( first ) {
          first = false;

          data.inputRowMeta = getInputRowMeta();
          data.outputRowMeta = data.inputRowMeta.clone();
          meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
            metaStore );

          // Get total previous fields
          data.totalpreviousfields = data.inputRowMeta.size();

          // Check is filename field is provided
          if ( Utils.isEmpty( meta.setOutputFilenameField() ) ) {
            logError( BaseMessages.getString( PKG, "GetFilesRowsCount.Log.NoField" ) );
            throw new KettleException( BaseMessages.getString( PKG, "GetFilesRowsCount.Log.NoField" ) );
          }

          // cache the position of the field
          if ( data.indexOfFilenameField < 0 ) {
            data.indexOfFilenameField = getInputRowMeta().indexOfValue( meta.setOutputFilenameField() );
            if ( data.indexOfFilenameField < 0 ) {
              // The field is unreachable !
              logError( BaseMessages.getString( PKG, "GetFilesRowsCount.Log.ErrorFindingField", meta
                .setOutputFilenameField() ) );
              throw new KettleException( BaseMessages.getString(
                PKG, "GetFilesRowsCount.Exception.CouldnotFindField", meta.setOutputFilenameField() ) );
            }
          }

        } // End if first

        String filename = getInputRowMeta().getString( data.readrow, data.indexOfFilenameField );
        if ( log.isDetailed() ) {

View on GitHub (pinned to f3058517a1)