pentaho/pentaho-kettle · error · KettleException

StepsMetrics.Error.NotSteps

Error message

StepsMetrics.Error.NotSteps

What it means

The StepsMetrics step requires at least one monitoring step name to be configured. In processRow, if meta.getStepName() is null or an empty array, the step has nothing to collect metrics for, so it throws this localized KettleException and aborts. It is a configuration validation error, not a runtime failure.

Solutions

  1. Open the StepsMetrics step dialog and add at least one step name to the monitored-steps grid.
  2. Verify the step name entered actually exists in the current transformation.
  3. If configuring via API, call meta.setStepName(new String[]{...}) with a non-empty array before getStep().
  4. Re-export/re-import the transformation if the grid entries were silently lost in transport.

Example fix

// before: no monitored steps configured
StepsMetricsMeta meta = new StepsMetricsMeta();
meta.setDefault();
// after: explicitly configure the steps to monitor
StepsMetricsMeta meta = new StepsMetricsMeta();
meta.setStepName(new String[] { "Sort rows", "Filter rows" });
meta.setStepCopyNr(new String[] { "0", "0" });
Defensive patterns

Strategy: validation

Validate before calling

if (meta.getStepName() == null || meta.getStepName().length == 0) {
  throw new IllegalArgumentException("StepsMetrics requires at least one monitored step name");
}

Type guard

boolean hasMonitoredSteps(StepsMetricsMeta m) { return m.getStepName() != null && m.getStepName().length > 0; }

Try / catch

try {
  trans.execute(null);
} catch (KettleException e) {
  if (e.getMessage().contains("StepsMetrics.Error.NotSteps")) {
    throw new IllegalStateException("StepsMetrics step has no monitored steps configured", e);
  }
  throw e;
}

Prevention

When it happens

Trigger: Running a transformation where the StepsMetrics step's 'step name' grid is empty — e.g. the step was added but no monitored step was configured, or the configuration field was bound to a variable that resolved to nothing and was dropped.

Common situations: Copy-pasting a StepsMetrics step without filling the grid; importing a transformation where the step name list was lost; building transformations programmatically and forgetting to call setStepName().

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/stepsmetrics/StepsMetrics.java:70

  public StepsMetrics( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
    Trans trans ) {
    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );
  }

  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
    meta = (StepsMetricsMeta) smi;
    data = (StepsMetricsData) sdi;

    if ( first ) {
      first = false;
      String[] stepnames = null;
      int stepnrs = 0;
      if ( meta.getStepName() != null && meta.getStepName().length > 0 ) {
        stepnames = meta.getStepName();
        stepnrs = stepnames.length;
      } else {
        // error
        throw new KettleException( BaseMessages.getString( PKG, "StepsMetrics.Error.NotSteps" ) );
      }
      // check for output fields
      data.realstepnamefield = environmentSubstitute( meta.getStepNameFieldName() );
      data.realstepidfield = environmentSubstitute( meta.getStepIdFieldName() );
      data.realsteplinesinputfield = environmentSubstitute( meta.getStepLinesInputFieldName() );
      data.realsteplinesoutputfield = environmentSubstitute( meta.getStepLinesOutputFieldName() );
      data.realsteplinesreadfield = environmentSubstitute( meta.getStepLinesReadFieldName() );
      data.realsteplineswrittentfield = environmentSubstitute( meta.getStepLinesWrittenFieldName() );
      data.realsteplinesupdatedfield = environmentSubstitute( meta.getStepLinesUpdatedFieldName() );
      data.realsteplineserrorsfield = environmentSubstitute( meta.getStepLinesErrorsFieldName() );
      data.realstepsecondsfield = environmentSubstitute( meta.getStepSecondsFieldName() );

      // Get target stepnames
      String[] targetSteps = getTransMeta().getNextStepNames( getStepMeta() );

      data.stepInterfaces = new ConcurrentHashMap<Integer, StepInterface>();
      for ( int i = 0; i < stepnrs; i++ ) {
        // We can not get metrics from current step

View on GitHub (pinned to f3058517a1)