pentaho/pentaho-kettle · error · KettleException

SETVARIABLE0006

SETVARIABLE0006

Error message

Unable to save step information to the repository for id_step={0}

What it means

SetVariableMeta.saveRep persists per-field attributes (variable_name, variable_type, default_value) and use_formatting to the repository. Any exception during rep.saveStepAttribute is wrapped in a KettleException with SETVARIABLE0006, including the id_step in the message, meaning the step metadata could not be saved.

Solutions

  1. Check repository database availability, permissions and disk space, then re-save
  2. Save the transformation as a local .ktr file as a workaround
  3. Check the wrapped cause exception for the specific JDBC/repository error
  4. Re-login to the repository with a user that has write rights
Defensive patterns

Strategy: try-catch

Validate before calling

// check write access before saving
if (!rep.getSecurityProvider().isReadOnly() == false) { /* deny early */ }

Try / catch

try { saveRep(rep, metaStore, id_trans, id_step); } catch (KettleException e) { if (e.getMessage().contains("SETVARIABLE0006")) { log("Save to repository failed: ", e.getCause()); /* fall back to saving .ktr locally */ } else throw e; }

Prevention

When it happens

Trigger: saveRep is invoked when saving a transformation to a repository and a saveStepAttribute call fails (repository down, transaction rollback, constraint violation, insufficient rights).

Common situations: Repository database read-only or out of space; lost DB connection while saving; permission-denied on the repository user; very long values exceeding column sizes.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/setvariable/SetVariableMeta.java:291

      throw new KettleException( BaseMessages.getString(
        PKG, "SetVariableMeta.RuntimeError.UnableToReadRepository.SETVARIABLE0005" ), 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", Utils.isEmpty( fieldName[i] )
          ? "" : fieldName[i] );
        rep.saveStepAttribute( id_transformation, id_step, i, "variable_name", variableName[i] );
        rep.saveStepAttribute(
          id_transformation, id_step, i, "variable_type", getVariableTypeCode( variableType[i] ) );
        rep.saveStepAttribute( id_transformation, id_step, i, "default_value", defaultValue[i] );
      }

      rep.saveStepAttribute( id_transformation, id_step, 0, "use_formatting", usingFormatting );
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString(
        PKG, "SetVariableMeta.RuntimeError.UnableToSaveRepository.SETVARIABLE0006", "" + 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 ( prev == null || prev.size() == 0 ) {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_WARNING, BaseMessages.getString(
          PKG, "SetVariableMeta.CheckResult.NotReceivingFieldsFromPreviousSteps" ), stepMeta );
      remarks.add( cr );
    } else {
      cr =
        new CheckResult( CheckResultInterface.TYPE_RESULT_OK, BaseMessages.getString(
          PKG, "SetVariableMeta.CheckResult.ReceivingFieldsFromPreviousSteps", "" + prev.size() ), stepMeta );

View on GitHub (pinned to f3058517a1)