pentaho/pentaho-kettle · error · KettleException

GetFileNames.Log.NoField

Error message

GetFileNames.Log.NoField

What it means

GetFileNames step throws this when the 'filename field in the input' option is enabled but the name of that dynamic filename field is empty/not set in the step metadata. processRow cannot locate a field that was never configured, so it fails the row and stops the step. It is a step-configuration error, not a data error.

Solutions

  1. Open the Get File Names step dialog and select a field under 'Filename is defined in a field'.
  2. Or uncheck 'Filename is defined in a field' and specify static files/wildcards in the file list instead.
  3. Verify the incoming row stream actually contains the selected field (add a Get Fields/Preview).

Example fix

// before (meta)
meta.setDynamicFilenameField(null); // empty
// after
meta.setDynamicFilenameField("filename");
Defensive patterns

Strategy: validation

Validate before calling

if (meta.isDynamicFilenameField() && (meta.getDynamicFilenameField() == null || meta.getDynamicFilenameField().isEmpty())) {
  throw new IllegalArgumentException("GetFileNames: 'filename field' must be set when reading filenames from a field");
}

Prevention

When it happens

Trigger: meta.getDynamicFilenameField() is empty (Utils.isEmpty) while the step is configured to read filenames from incoming rows.

Common situations: User checked 'Filename is defined in a field' in the Get File Names step dialog but left the field dropdown blank; transformation metadata copied/edited programmatically without setting the filename field.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getfilenames/GetFileNames.java:102

        setOutputDone();
        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.getDynamicFilenameField() ) ) {
          logError( BaseMessages.getString( PKG, "GetFileNames.Log.NoField" ) );
          throw new KettleException( BaseMessages.getString( PKG, "GetFileNames.Log.NoField" ) );
        }

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

        // If wildcard field is specified, Check if field exists
        if ( !Utils.isEmpty( meta.getDynamicWildcardField() ) ) {
          if ( data.indexOfWildcardField < 0 ) {
            data.indexOfWildcardField = data.inputRowMeta.indexOfValue( meta.getDynamicWildcardField() );

View on GitHub (pinned to f3058517a1)