pentaho/pentaho-kettle · error · KettleException

MergeRowsMeta.Exception.UnexpectedErrorReadingStepInfo

MergeRowsMeta.Exception.UnexpectedErrorReadingStepInfo

Error message

MergeRowsMeta.Exception.UnexpectedErrorReadingStepInfo

What it means

Thrown by MergeRowsMeta.readRep when loading the Merge Rows step from the Kettle repository fails with an unexpected Exception while reading the 'reference' and 'compare' step attributes for id_step. The failure is wrapped in a KettleException with this message.

Solutions

  1. Check KettleException.getCause() for the underlying repository/database error.
  2. Verify repository connectivity and credentials, then retry loading.
  3. Confirm reference/compare attribute rows exist for id_step; re-save the step in Spoon to recreate them.
  4. Repair or upgrade the repository schema if it is inconsistent with your Kettle version.
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify the step record exists in the repository before load
// SELECT COUNT(*) FROM R_STEP WHERE ID_STEP = ?  -- expect 1

Try / catch

try {
  TransMeta tm = new TransMeta(repository, transName, directory);
} catch (KettleException e) {
  log.error("Repository read failed for merge rows step: " + e.getCause(), e);
}

Prevention

When it happens

Trigger: Loading a transformation from a repository when rep.getStepAttributeString for id_step throws — missing attribute rows, repository connection errors, or a corrupted step record in R_STEP_ATTRIBUTE.

Common situations: Repository database unreachable during load; attribute rows deleted or never saved; repository schema mismatch between Kettle versions.

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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/mergerows/MergeRowsMeta.java:233

      allocate( nrKeys, nrValues );

      for ( int i = 0; i < nrKeys; i++ ) {
        keyFields[i] = rep.getStepAttributeString( id_step, i, "key_field" );
      }
      for ( int i = 0; i < nrValues; i++ ) {
        valueFields[i] = rep.getStepAttributeString( id_step, i, "value_field" );
      }

      flagField = rep.getStepAttributeString( id_step, "flag_field" );

      List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
      StreamInterface referenceStream = infoStreams.get( 0 );
      StreamInterface compareStream = infoStreams.get( 1 );

      referenceStream.setSubject( rep.getStepAttributeString( id_step, "reference" ) );
      compareStream.setSubject( rep.getStepAttributeString( id_step, "compare" ) );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "MergeRowsMeta.Exception.UnexpectedErrorReadingStepInfo" ), e );
    }
  }

  @Override
  public void searchInfoAndTargetSteps( List<StepMeta> steps ) {
    List<StreamInterface> infoStreams = getStepIOMeta().getInfoStreams();
    for ( StreamInterface stream : infoStreams ) {
      stream.setStepMeta( StepMeta.findStep( steps, (String) stream.getSubject() ) );
    }
  }

  @Override
  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < keyFields.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "key_field", keyFields[i] );
      }

View on GitHub (pinned to f3058517a1)