pentaho/pentaho-kettle · error · KettleException

GetSubFolders.Log.NoField

Error message

GetSubFolders.Log.NoField

What it means

GetSubFolders.processRow logs and throws KettleException 'GetSubFolders.Log.NoField' when the step is configured without a dynamic folder-name field. The step reads folder paths from an incoming field, so an empty dynamicFoldernameField makes execution impossible. It fails fast before processing any rows.

Solutions

  1. Open the Get SubFolders step dialog and set 'Get foldername field' to an existing input field.
  2. Ensure the upstream step actually outputs that field name.
  3. Re-save the transformation after fixing the field setting.
  4. Run the step's Validate/check to catch the missing field before execution.

Example fix

// before
stepMeta.setDynamicFoldernameField( "" );
// after
stepMeta.setDynamicFoldernameField( "folder_path" ); // existing input field
Defensive patterns

Strategy: validation

Validate before calling

// Validate the step config before execution
GetSubFoldersMeta m = (GetSubFoldersMeta) stepMeta.getStepMetaInterface();
if ( m.getDynamicFoldernameField() == null || m.getDynamicFoldernameField().trim().isEmpty() )
  throw new IllegalStateException( "Get SubFolders: dynamic foldername field is not set" );

Try / catch

try {
  trans.execute( null );
} catch ( KettleException e ) {
  if ( e.getMessage() != null && e.getMessage().contains( "NoField" ) ) {
    // abort and prompt user to configure the folder field
  } else throw e;
}

Prevention

When it happens

Trigger: processRow runs with meta.getDynamicFoldernameField() empty/null, i.e. 'Get foldername field' was left blank in the step dialog.

Common situations: Step added to transformation but not configured; field setting lost after editing/exporting the transformation; copy of a template step whose field no longer matches the upstream stream.

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/0e2c4f7ac8b6de30. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/getsubfolders/GetSubFolders.java:91

      data.readrow = getRow();
    }

    if ( first ) {
      first = false;

      if ( meta.isFoldernameDynamic() ) {
        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.getDynamicFoldernameField() ) ) {
          logError( BaseMessages.getString( PKG, "GetSubFolders.Log.NoField" ) );
          throw new KettleException( BaseMessages.getString( PKG, "GetSubFolders.Log.NoField" ) );
        }

        // cache the position of the field
        if ( data.indexOfFoldernameField < 0 ) {
          String realDynamicFoldername = environmentSubstitute( meta.getDynamicFoldernameField() );
          data.indexOfFoldernameField = data.inputRowMeta.indexOfValue( realDynamicFoldername );
          if ( data.indexOfFoldernameField < 0 ) {
            // The field is unreachable !
            logError( BaseMessages.getString( PKG, "GetSubFolders.Log.ErrorFindingField" )
              + "[" + realDynamicFoldername + "]" );
            throw new KettleException( BaseMessages.getString(
              PKG, "GetSubFolders.Exception.CouldnotFindField", realDynamicFoldername ) );
          }
        }
      } else {
        // Create the output row meta-data
        data.outputRowMeta = new RowMeta();
        meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,

View on GitHub (pinned to f3058517a1)