pentaho/pentaho-kettle · error · KettleException

YamlInputMeta.Exception.ErrorReadingRepository

Error message

YamlInputMeta.Exception.ErrorReadingRepository

What it means

YamlInputMeta.readData (repository variant) wraps loading of the step's attributes from the Kettle repository; any failure is rethrown as a KettleException with this message and the original cause attached. It signals the step settings could not be read from the repository database.

Solutions

  1. Check the attached cause: verify repository database connectivity and credentials.
  2. Confirm the repository schema matches the PDI version (run the repository upgrade scripts after upgrades).
  3. Re-open the transformation in Spoon and, if the step metadata is corrupt, recreate the step and save again.
  4. Restore the affected step row from a repository backup.

Example fix

// before: repository unreachable
KettleException: YamlInputMeta.Exception.ErrorReadingRepository ... caused by SQLException: connection refused
// after: fix connectivity then reload
// verify with spoon: Tools -> Repository -> Connect, then reopen the transformation
Defensive patterns

Strategy: try-catch

Validate before calling

// verify repository connectivity before loading metadata
if (!repository.isConnected()) { repository.connect(user, pass); }
// optionally: repository.verifyConnection();

Try / catch

try { meta.readRep(repository, metaStore, stepId, databases); }
catch (KettleException e) {
  log.error("Failed reading YAML Input step from repository: " + e.getMessage(), e.getCause());
  throw e; // escalate after ensuring cause (DB connectivity/schema) is logged
}

Prevention

When it happens

Trigger: readData from repository (invoked during loadRep of the step metadata): rep.getStepAttributeBoolean/String throws or the surrounding logic fails — typically a repository connectivity/schema problem — inside the try block that ends at this catch.

Common situations: Repository database down or connection dropped mid-load, repository schema version mismatch after a PDI upgrade (missing r_step_attribute rows/columns), corrupted step row in the repository.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


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

Appendix: source

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

        field.setPath( rep.getStepAttributeString( id_step, i, "field_path" ) );
        field.setType( ValueMetaFactory.getIdForValueMeta( rep.getStepAttributeString( id_step, i, "field_type" ) ) );
        field.setFormat( rep.getStepAttributeString( id_step, i, "field_format" ) );
        field.setCurrencySymbol( rep.getStepAttributeString( id_step, i, "field_currency" ) );
        field.setDecimalSymbol( rep.getStepAttributeString( id_step, i, "field_decimal" ) );
        field.setGroupSymbol( rep.getStepAttributeString( id_step, i, "field_group" ) );
        field.setLength( (int) rep.getStepAttributeInteger( id_step, i, "field_length" ) );
        field.setPrecision( (int) rep.getStepAttributeInteger( id_step, i, "field_precision" ) );
        field.setTrimType( YamlInputField.getTrimTypeByCode( rep.getStepAttributeString(
          id_step, i, "field_trim_type" ) ) );

        inputFields[i] = field;
      }
      inFields = rep.getStepAttributeBoolean( id_step, "IsInFields" );
      IsAFile = rep.getStepAttributeBoolean( id_step, "IsAFile" );

      yamlField = rep.getStepAttributeString( id_step, "YamlField" );
    } catch ( Exception e ) {
      throw new KettleException(
        BaseMessages.getString( PKG, "YamlInputMeta.Exception.ErrorReadingRepository" ), e );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      rep.saveStepAttribute( id_transformation, id_step, "include", includeFilename );
      rep.saveStepAttribute( id_transformation, id_step, "include_field", filenameField );
      rep.saveStepAttribute( id_transformation, id_step, "addresultfile", addResultFile );

      rep.saveStepAttribute( id_transformation, id_step, "validating", validating );
      rep.saveStepAttribute( id_transformation, id_step, "IsIgnoreEmptyFile", IsIgnoreEmptyFile );
      rep.saveStepAttribute( id_transformation, id_step, "doNotFailIfNoFile", doNotFailIfNoFile );

      rep.saveStepAttribute( id_transformation, id_step, "rownum", includeRowNumber );
      rep.saveStepAttribute( id_transformation, id_step, "rownum_field", rowNumberField );
      rep.saveStepAttribute( id_transformation, id_step, "limit", rowLimit );

View on GitHub (pinned to f3058517a1)