pentaho/pentaho-kettle · error · KettleException

InsertUpdateMeta.Exception.UnableToSaveStepInfoToRepository

Error message

InsertUpdateMeta.Exception.UnableToSaveStepInfoToRepository

What it means

saveRep failed while persisting the step's configuration to the repository; any exception (e.g., from insertStepDatabase or attribute writes) is wrapped in a KettleException with the step id appended. The transformation metadata was not saved for this step.

Solutions

  1. Test repository connection and confirm the user has INSERT/UPDATE privileges on repository tables.
  2. Check the wrapped cause (e) for the underlying SQL error.
  3. Retry the save after resolving DB availability (locks, disk space, downtime).
  4. Export the transformation to a .ktr file as a workaround until repository access is restored.

Example fix

// workaround until DB is fixed
transMeta.exportToFile("backup.ktr"); // preserve metadata
// fix repo grants then save normally
Defensive patterns

Strategy: try-catch

Validate before calling

if (!rep.isConnected()) throw new IllegalStateException("Repository not connected");
// ensure DB user has INSERT/UPDATE on repository tables (verify grants with DBA)

Type guard

null

Try / catch

try { transMeta.saveRep(rep, metaStore, transObjectId); }
catch (KettleException e) {
  logError("Repository save failed; root cause:", e.getCause());
  transMeta.exportToFile("fallback.ktr"); // preserve work
  throw e;
}

Prevention

When it happens

Trigger: Repository DB write failure: connection lost mid-save, insufficient INSERT/UPDATE privileges, constraint violation, read-only repository, or exception while inserting the step-database relationship.

Common situations: DB user lacks write grants on repository tables; repository database disk full or offline; concurrent saves causing lock contention; transaction rolled back.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/insertupdate/InsertUpdateMeta.java:423

        rep.saveStepAttribute( id_transformation, id_step, i, "key_name", keyFields[ i ].getKeyStream() );
        rep.saveStepAttribute( id_transformation, id_step, i, "key_field", keyFields[ i ].keyLookup );
        rep.saveStepAttribute( id_transformation, id_step, i, "key_condition", keyFields[ i ].getKeyCondition() );
        rep.saveStepAttribute( id_transformation, id_step, i, "key_name2", keyFields[ i ].getKeyStream2() );
      }

      for ( int i = 0; i < updateFields.length; i++ ) {
        rep.saveStepAttribute( id_transformation, id_step, i, "value_name", updateFields[ i ].getUpdateLookup() );
        rep.saveStepAttribute( id_transformation, id_step, i, "value_rename", updateFields[ i ].getUpdateStream() );
        rep.saveStepAttribute( id_transformation, id_step, i, "value_update",
          updateFields[ i ].getUpdate().booleanValue() );
      }

      // Also, save the step-database relationship!
      if ( databaseMeta != null ) {
        rep.insertStepDatabase( id_transformation, id_step, databaseMeta.getObjectId() );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "InsertUpdateMeta.Exception.UnableToSaveStepInfoToRepository" )
        + id_step, e );
    }
  }

  @Override
  public StepHelperInterface getStepHelperInterface() {
    return new InsertUpdateHelper();
  }
  @Override
  public void getFields( Bowl bowl, RowMetaInterface rowMeta, String origin, RowMetaInterface[] info, StepMeta nextStep,
                         VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
    // Default: nothing changes to rowMeta
  }

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

View on GitHub (pinned to f3058517a1)