pentaho/pentaho-kettle · error · KettleException

YamlInput.Log.RequiredFilesMissing

Error message

YamlInput.Log.RequiredFilesMissing

What it means

YamlInput throws this KettleException during handleMissingFiles when one or more files configured for the YAML Input step do not exist on disk. The step resolves its file list via FileInputList and refuses to run with missing required files, because silent skipping could produce empty or misleading transformation output.

Solutions

  1. Verify each configured file exists at the path the executing runtime sees (ls/check the path).
  2. Correct the filename/directory in the YAML Input step's File tab, or fix wildcard patterns to match existing files.
  3. Use absolute paths or ${Internal.Transformation.Filename.Directory} variables so paths resolve relative to the transformation location.
  4. If missing files are acceptable, ensure 'Do not fail if no file' semantics apply and change file 'Required' flag to No for optional files.

Example fix

// before: transformation references /data/input.yaml that was moved
// after: use a variable anchored to the transformation directory
fileName = "${Internal.Transformation.Filename.Directory}/input.yaml";
Defensive patterns

Strategy: validation

Validate before calling

// before running the transformation
for (String f : fileNames) {
  File file = new File(resolveVariables(f));
  if (!file.exists()) throw new IllegalStateException("Required file missing: " + file);
}

Try / catch

// catch KettleException and surface the missing-file list from the log message
try { trans.execute(...); } catch (KettleException e) {
  if (e.getMessage().contains("RequiredFilesMissing")) { alertOps(e.getMessage()); }
  throw e;
}

Prevention

When it happens

Trigger: processRow -> handleMissingFiles is called at step initialization; data.files.getNonExistantFiles() returns a non-empty list, meaning at least one configured filename/glob resolved to a non-existent FileObject, and the file was marked required.

Common situations: Typo in the filename or directory path, file deleted or renamed between transformation design and execution, relative paths that resolve differently on the runtime agent, or wildcard patterns matching nothing.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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

Appendix: source

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

  private static Class<?> PKG = YamlInputMeta.class; // for i18n purposes, needed by Translator2!!

  private YamlInputMeta meta;

  private YamlInputData data;

  public YamlInput( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
    Trans trans ) {
    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
  }

  private void handleMissingFiles() throws KettleException {
    List<FileObject> nonExistantFiles = data.files.getNonExistantFiles();
    if ( nonExistantFiles.size() != 0 ) {
      String message = FileInputList.getRequiredFilesDescription( nonExistantFiles );
      logError( BaseMessages.getString( PKG, "YamlInput.Log.RequiredFilesTitle" ), BaseMessages.getString(
        PKG, "YamlInput.Log.RequiredFiles", message ) );

      throw new KettleException( BaseMessages.getString( PKG, "YamlInput.Log.RequiredFilesMissing", message ) );
    }

    List<FileObject> nonAccessibleFiles = data.files.getNonAccessibleFiles();
    if ( nonAccessibleFiles.size() != 0 ) {
      String message = FileInputList.getRequiredFilesDescription( nonAccessibleFiles );
      logError( BaseMessages.getString( PKG, "YamlInput.Log.RequiredFilesTitle" ), BaseMessages.getString(
        PKG, "YamlInput.Log.RequiredNotAccessibleFiles", message ) );

      throw new KettleException( BaseMessages.getString(
        PKG, "YamlInput.Log.RequiredNotAccessibleFilesMissing", message ) );
    }
  }

  private boolean readNextString() {

    try {
      data.readrow = getRow(); // Grab another row ...

View on GitHub (pinned to f3058517a1)