pentaho/pentaho-kettle · error · KettleException

Unable to save step information to the repository for…

Error message

Unable to save step information to the repository for id_step=" + id_step

What it means

Thrown by SortedMergeMeta.saveRep when persisting this step's repository attributes (per-row field_name and field_ascending) fails. Kettle wraps any exception from Repository.saveStepAttribute into a KettleException carrying the step id, so transformation saves abort with a single root-caused message. It indicates a repository connectivity, schema, or data problem rather than a step-configuration problem.

Solutions

  1. Check the wrapped cause 'e' in the KettleException stack trace for the repository database error
  2. Verify the repository database connection is alive (test in the repository connection dialog / ping the DB)
  3. Repair or upgrade the repository schema (repository upgrade / SQL scripts for your PDI version)
  4. Shorten field names or fix array data that violates DB column constraints
  5. Retry the save after network issues are resolved

Example fix

// before
transMeta.saveRep(rep, metaStore, id_transformation);
// throws KettleException 'Unable to save step information...'
// after
try {
  transMeta.saveRep(rep, metaStore, id_transformation);
} catch (KettleException e) {
  logError("Repository save failed: " + e.getCause());
  // reconnect repository, then retry
  if (!rep.connect()) { rep.connect(); }
  transMeta.saveRep(rep, metaStore, id_transformation);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// before saving
if (rep == null || !rep.isConnected()) throw new IllegalStateException("Repository not connected");
for (String f : meta.getFieldName()) {
  if (f == null || f.isEmpty()) throw new IllegalStateException("Empty field name in SortedMerge step");
}

Try / catch

try { transMeta.saveRep(rep, metaStore, id_transformation); } catch (KettleException e) { Throwable cause = e.getCause(); logError("Repository save failed: " + (cause != null ? cause.getMessage() : e.getMessage())); /* reconnect + retry */ }

Prevention

When it happens

Trigger: Calling TransMeta/StepMeta saveRep against a repository where the underlying database insert into Kettle's attribute tables fails — e.g. repository DB connection dropped mid-save, R_ATTRIBUTE table missing/locked, or fieldName/ascending arrays containing values that violate DB constraints (NULL in a NOT NULL column, string too long).

Common situations: Saving a transformation over a flaky VPN connection to the repository database; repository schema out of date after a Pentaho upgrade; Oracle 'value too large for column' on long field names; concurrent edits locking repository rows.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/sortedmerge/SortedMergeMeta.java:155

      allocate( nrfields );

      for ( int i = 0; i < nrfields; i++ ) {
        fieldName[i] = rep.getStepAttributeString( id_step, i, "field_name" );
        ascending[i] = rep.getStepAttributeBoolean( id_step, i, "field_ascending" );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unexpected error reading step information from the repository", e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {
      for ( int i = 0; i < fieldName.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "field_name", fieldName[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "field_ascending", ascending[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( "Unable to save step information to the repository for id_step=" + id_step, e );
    }
  }

  @Override
  public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
    // Set the sorted properties: ascending/descending
    for ( int i = 0; i < fieldName.length; i++ ) {
      int idx = inputRowMeta.indexOfValue( fieldName[i] );
      if ( idx >= 0 ) {
        ValueMetaInterface valueMeta = inputRowMeta.getValueMeta( idx );
        valueMeta.setSortedDescending( !ascending[i] );

        // TODO: add case insensivity
      }
    }

  }

View on GitHub (pinned to f3058517a1)