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=

What it means

DataGridMeta.saveRep persists the step's fields and data lines as repository step attributes. Any repository write exception is wrapped in this KettleException including the id_step, so the transformation cannot be saved.

Solutions

  1. Check the chained cause for the underlying repository/database error (connectivity, permissions, disk).
  2. Retry the save after confirming repository database availability; restart Spoon to refresh the DB connection if the session is stale.
  3. Verify the repository user has INSERT/UPDATE rights on r_step_attribute and related tables.
  4. If a specific attribute fails, re-create the Data Grid step to regenerate its data before saving.

Example fix

// no code change; ensure repository is writable before save
// e.g. reconnect: Repository -> Reconnect, then File -> Save
Defensive patterns

Strategy: retry

Validate before calling

if (!rep.isConnected()) throw new IllegalStateException("Repository not connected");
// also verify write access on r_step_attribute before bulk saves

Type guard

boolean canSave(Repository rep){ return rep != null && rep.isConnected() && rep.hasPermission("write"); }

Try / catch

try { meta.saveRep(rep, metaStore, idTransformation, idStep); }
catch (KettleException e) {
  logError("Repository save failed: " + e.getCause(), e);
  // reconnect and retry once
  rep.disconnect(); rep.connect(username, password);
  meta.saveRep(rep, metaStore, idTransformation, idStep);
}

Prevention

When it happens

Trigger: saveRep is called when saving a transformation to a repository and rep.saveStepAttribute / insertStepDatabase fails — e.g. lost DB connection, transaction rollback, constraint violation, or read-only repository.

Common situations: Repository database outage or timeout during save; repository disk full or read-only; version mismatch causing unknown attributes to be rejected; stale DB session after long edit.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/datagrid/DataGridMeta.java:505

          rep.saveStepAttribute( idTransformation, idStep, i, "field_length", fieldLength[i] );
          rep.saveStepAttribute( idTransformation, idStep, i, "field_precision", fieldPrecision[i] );
          rep.saveStepAttribute( idTransformation, idStep, i, "set_empty_string", setEmptyString[i] );
          rep.saveStepAttribute( idTransformation, idStep, i, FIELD_NULL_IF, fieldNullIf[i] );
        }
      }

      rep.saveStepAttribute( idTransformation, idStep, "nr_lines", dataLines.size() );

      for ( int i = 0; i < dataLines.size(); i++ ) {
        List<String> line = dataLines.get( i );
        for ( int f = 0; f < line.size(); f++ ) {
          String item = line.get( f );
          rep.saveStepAttribute( idTransformation, idStep, i, "item_" + f, item );
        }
      }

    } catch ( Exception e ) {
      throw new KettleException( "Unable to save step information to the repository for id_step=" + idStep, e );
    }
  }

  @Override
  public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans trans ) {
    return new DataGrid( stepMeta, stepDataInterface, cnr, transMeta, trans );
  }

  @Override
  public StepDataInterface getStepData() {
    return new DataGridData();
  }

  @Override
  public StepMetaInjectionInterface getStepMetaInjectionInterface() {
    return new DataGridMetaInjection( this );
  }

View on GitHub (pinned to f3058517a1)