{"record":{"id":"04dea3f12d26e3e7","repo":"pentaho/pentaho-kettle","slug":"stepsmetrics-error-notsteps","errorCode":null,"errorMessage":"StepsMetrics.Error.NotSteps","messagePattern":"StepsMetrics\\.Error\\.NotSteps","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/stepsmetrics/StepsMetrics.java","lineNumber":70,"sourceCode":"  public StepsMetrics( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,\n    Trans trans ) {\n    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );\n  }\n\n  public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {\n    meta = (StepsMetricsMeta) smi;\n    data = (StepsMetricsData) sdi;\n\n    if ( first ) {\n      first = false;\n      String[] stepnames = null;\n      int stepnrs = 0;\n      if ( meta.getStepName() != null && meta.getStepName().length > 0 ) {\n        stepnames = meta.getStepName();\n        stepnrs = stepnames.length;\n      } else {\n        // error\n        throw new KettleException( BaseMessages.getString( PKG, \"StepsMetrics.Error.NotSteps\" ) );\n      }\n      // check for output fields\n      data.realstepnamefield = environmentSubstitute( meta.getStepNameFieldName() );\n      data.realstepidfield = environmentSubstitute( meta.getStepIdFieldName() );\n      data.realsteplinesinputfield = environmentSubstitute( meta.getStepLinesInputFieldName() );\n      data.realsteplinesoutputfield = environmentSubstitute( meta.getStepLinesOutputFieldName() );\n      data.realsteplinesreadfield = environmentSubstitute( meta.getStepLinesReadFieldName() );\n      data.realsteplineswrittentfield = environmentSubstitute( meta.getStepLinesWrittenFieldName() );\n      data.realsteplinesupdatedfield = environmentSubstitute( meta.getStepLinesUpdatedFieldName() );\n      data.realsteplineserrorsfield = environmentSubstitute( meta.getStepLinesErrorsFieldName() );\n      data.realstepsecondsfield = environmentSubstitute( meta.getStepSecondsFieldName() );\n\n      // Get target stepnames\n      String[] targetSteps = getTransMeta().getNextStepNames( getStepMeta() );\n\n      data.stepInterfaces = new ConcurrentHashMap<Integer, StepInterface>();\n      for ( int i = 0; i < stepnrs; i++ ) {\n        // We can not get metrics from current step","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/stepsmetrics/StepsMetrics.java#L52-L88","documentation":"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.","triggerScenarios":"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.","commonSituations":"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().","solutions":["Open the StepsMetrics step dialog and add at least one step name to the monitored-steps grid.","Verify the step name entered actually exists in the current transformation.","If configuring via API, call meta.setStepName(new String[]{...}) with a non-empty array before getStep().","Re-export/re-import the transformation if the grid entries were silently lost in transport."],"exampleFix":"// before: no monitored steps configured\nStepsMetricsMeta meta = new StepsMetricsMeta();\nmeta.setDefault();\n// after: explicitly configure the steps to monitor\nStepsMetricsMeta meta = new StepsMetricsMeta();\nmeta.setStepName(new String[] { \"Sort rows\", \"Filter rows\" });\nmeta.setStepCopyNr(new String[] { \"0\", \"0\" });","handlingStrategy":"validation","validationCode":"if (meta.getStepName() == null || meta.getStepName().length == 0) {\n  throw new IllegalArgumentException(\"StepsMetrics requires at least one monitored step name\");\n}","typeGuard":"boolean hasMonitoredSteps(StepsMetricsMeta m) { return m.getStepName() != null && m.getStepName().length > 0; }","tryCatchPattern":"try {\n  trans.execute(null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"StepsMetrics.Error.NotSteps\")) {\n    throw new IllegalStateException(\"StepsMetrics step has no monitored steps configured\", e);\n  }\n  throw e;\n}","preventionTips":["Always fill the monitored-steps grid in the StepsMetrics dialog before saving.","Validate transformation metadata programmatically (meta.check()) before execution.","After imports/migrations, re-open StepsMetrics dialogs to confirm the grid survived."],"tags":["configuration","steps-metrics","kettle"],"backgroundTag":"empty-required-field","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}