pentaho/pentaho-kettle · error · KettleException

AnalyticQueryMeta.Exception.UnableToSaveStepInfoToRepository

Error message

AnalyticQueryMeta.Exception.UnableToSaveStepInfoToRepository

What it means

KettleException thrown by AnalyticQueryMeta.saveRep() when persisting the step's aggregate attributes to the repository fails. The message concatenates the step's id_step so you can locate the exact row; the root cause is the wrapped exception. Note the message is the raw key + id_step (no i18n interpolation), which is a known quirk of this call site.

Solutions

  1. Read the wrapped cause to see the repository-side failure and check database logs for the failing insert on id_step
  2. Verify the repository connection is writable and the user has INSERT/UPDATE rights on step attribute tables
  3. Reconnect and retry the save (transient connection drops resolve after reconnect)
  4. Commit or abort stale transactions/locks on the repository tables, then re-save

Example fix

// after catching it, inspect the cause
try { meta.saveRep(rep, metaStore, transId, stepId); }
catch (KettleException e) { throw new KettleException("save failed for step " + e.getMessage(), e.getCause()); }
Defensive patterns

Strategy: retry

Validate before calling

// Verify repository is writable before saving
if (!rep.isConnected()) throw new IllegalStateException("Repository not connected");
// Confirm write privileges early with a cheap write/read round-trip or permission check

Try / catch

try {
  meta.saveRep(rep, metaStore, idTransformation, idStep);
} catch (KettleException e) {
  if (isTransient(e.getCause())) { retrySaveWithBackoff(); }
  else { log.error("Repository save failed for id_step=" + idStep, e.getCause()); throw e; }
}

Prevention

When it happens

Trigger: saveRep() -> rep.saveStepAttribute(...) throws for any aggregate loop iteration: repository write failure, connection loss, constraint violations, or read-only repository while saving a transformation.

Common situations: Repository database read-only or out of space; broken connection during a long save; insufficient permissions to write KETTLE_STEP_ATTRIBUTE rows; transaction lock/timeout from a concurrent save of the same transformation.

Related errors


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

Appendix: source

Thrown at plugins/core/impl/src/main/java/org/pentaho/di/trans/steps/analyticquery/AnalyticQueryMeta.java:362

        PKG, "AnalyticQueryMeta.Exception.UnexpectedErrorInReadingStepInfoFromRepository" ), e );
    }
  }

  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
    try {

      for ( int i = 0; i < groupField.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "group_name", groupField[i] );
      }

      for ( int i = 0; i < subjectField.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_name", aggregateField[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_subject", subjectField[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_type", getTypeDesc( aggregateType[i] ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "aggregate_value_field", valueField[i] );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "AnalyticQueryMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );
    }
  }

  public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,
    RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space,
    Repository repository, IMetaStore metaStore ) {
    CheckResult cr;

    if ( input.length > 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "AnalyticQueryMeta.CheckResult.ReceivingInfoOK" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_ERROR, BaseMessages.getString(

View on GitHub (pinned to f3058517a1)