pentaho/pentaho-kettle · error · RuntimeException

BaseStreamStepMeta.CheckResult.ResultStepMissing

Error message

BaseStreamStepMeta.CheckResult.ResultStepMissing

What it means

BaseStreamStepMeta.getFields throws this RuntimeException when the configured result/target sub-step name cannot be found in the transformation metadata, so the fields of the streaming result step cannot be merged into the row metadata. Unlike KettleStepException, it is an unchecked failure that aborts metadata resolution.

Solutions

  1. Open the streaming step's dialog and set the result/target sub-step name to an existing step in the transformation.
  2. Verify any variable in the sub-step name resolves (define it in the transformation or environment properties).
  3. Re-add the deleted/renamed result step, or update the reference after a rename.
  4. If porting steps between transformations, update all cross-step name references.

Example fix

// before: sub-step name points at a missing step
streamStep.setSubStepName("result_${ENV}"); // ENV undefined -> no match
// after: ensure the variable is defined and the step exists
streamStep.setSubStepName("result_step"); // actual step name in the transformation
Defensive patterns

Strategy: validation

Validate before calling

// before running, confirm the configured sub-step exists after variable substitution
String realName = transMeta.environmentSubstitute(streamStep.getSubStepName());
if (transMeta.findStep(realName) == null) {
    throw new IllegalStateException("Result step not found: " + realName);
}

Try / catch

try {
    stepMetaInterface.getFields(/* ... */);
} catch (RuntimeException e) {
    if (e.getMessage().contains("ResultStepMissing")) { /* fix step name config */ }
    throw e;
}

Prevention

When it happens

Trigger: getFields looks up realSubStepName among transMeta's steps; the name (after environment substitution) matches no step, so the else-branch throws 'ResultStepMissing'.

Common situations: Renamed or deleted the target/result step without updating the streaming step's configuration; variable used in the sub-step name doesn't resolve (also relevant to the test 'testGetFieldsDoesEnvSubstitutionForSubStepName'); copy-paste between transformations referencing a step that doesn't exist in the new one.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/streaming/common/BaseStreamStepMeta.java:276

    try {
      TransMeta transMeta = mappingMetaRetriever.get( bowl, this, repository, metaStore, space );
      if ( !StringUtil.isEmpty( getSubStep() ) ) {
        String realSubStepName = space.environmentSubstitute( getSubStep() );
        if ( transMeta.getSteps().stream().anyMatch( stepMeta -> stepMeta.getName().equals( realSubStepName ) ) ) {
          rowMeta.addRowMeta( transMeta.getPrevStepFields( realSubStepName ) );
          transMeta.getSteps().stream().filter( stepMeta -> stepMeta.getName().equals( realSubStepName ) )
            .findFirst()
            .ifPresent( stepMeta ->
            {
              try {
                stepMeta.getStepMetaInterface()
                  .getFields( bowl, rowMeta, origin, info, nextStep, space, repository, metaStore );
              } catch ( KettleStepException e ) {
                throw new RuntimeException( e );
              }
            } );
        } else {
          throw new RuntimeException(
            BaseMessages.getString( PKG, "BaseStreamStepMeta.CheckResult.ResultStepMissing", transMeta.getName(), realSubStepName ) );
        }
      }
    } catch ( KettleException e ) {
      getLog().logDebug( "could not get fields, probable AEL" );
      rowMeta.addRowMeta( getRowMeta( origin, space ) );
    }
  }
}

View on GitHub (pinned to f3058517a1)