pentaho/pentaho-kettle · error · KettleException

YamlInput.Log.NoFiles

Error message

YamlInput.Log.NoFiles

What it means

In processRow, when the step reads from files (not fields), it builds the file list and throws this KettleException if zero files matched and the user has not enabled 'Do not fail if no file'. It distinguishes 'no files matched at all' from the per-file missing/access errors handled in handleMissingFiles.

Solutions

  1. Fix the file/folder/wildcard specification so at least one file matches.
  2. Check the box 'Do not fail if no file' in the step if an empty file list is a valid business case (the step will then just pass zero rows).
  3. Use variables relative to the transformation location so paths resolve correctly on the executing host.
  4. Test the pattern with 'Show filenames' / preview in the step dialog before running.

Example fix

// before
meta.setDoNotFailIfNoFile(false); // pattern "*.yml" matched nothing -> exception
// after: either fix the pattern to "*.yaml" or tolerate empty input
meta.setDoNotFailIfNoFile(true);
Defensive patterns

Strategy: validation

Validate before calling

// check the resolved file list before running
FileInputList files = meta.getFiles(bowl, variableSpace);
if (files.nrOfFiles() == 0 && !meta.isdoNotFailIfNoFile()) {
  throw new IllegalStateException("No files matched the configured pattern");
}

Try / catch

try { trans.execute(...); } catch (KettleException e) {
  if (e.getMessage().contains("NoFiles")) { checkFilePatternsAndPaths(); }
}

Prevention

When it happens

Trigger: First call of processRow: !meta.isInFields(), meta.isdoNotFailIfNoFile() is false, and meta.getFiles(...).nrOfFiles() == 0 — wildcard or directory specification matched nothing.

Common situations: Wildcard patterns (e.g. *.yml vs *.yaml) that don't match any files, wrong directory, files not yet delivered at execution time, running on a different machine where the directory is empty.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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

Appendix: source

Thrown at plugins/yaml-input/impl/src/main/java/org/pentaho/di/trans/steps/yamlinput/YamlInput.java:217

    } catch ( Exception e ) {
      logError( BaseMessages.getString( PKG, "YamlInput.Log.UnableToOpenFile", "" + data.filenr, data.file
        .toString(), e.toString() ) );
      stopAll();
      setErrors( 1 );
      logError( Const.getStackTracker( e ) );
      return false;
    }
    return true;
  }

  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
    if ( first && !meta.isInFields() ) {
      first = false;

      data.files = meta.getFiles( getTransMeta().getBowl(), this );

      if ( !meta.isdoNotFailIfNoFile() && data.files.nrOfFiles() == 0 ) {
        throw new KettleException( BaseMessages.getString( PKG, "YamlInput.Log.NoFiles" ) );
      }

      handleMissingFiles();

      // Create the output row meta-data
      data.outputRowMeta = new RowMeta();
      data.totalPreviousFields = 0;
      data.totalOutFields = data.totalPreviousFields + data.nrInputFields;
      meta.getFields( getTransMeta().getBowl(), data.outputRowMeta, getStepname(), null, null, this, repository,
        metaStore );
      data.totalOutStreamFields = data.outputRowMeta.size();

    }
    // Grab a row
    Object[] r = getOneRow();

    if ( r == null ) {
      setOutputDone(); // signal end to receiver(s)

View on GitHub (pinned to f3058517a1)