pentaho/pentaho-kettle · error · KettleStepException
BaseStep.Exception.TargetStepToWriteToDoesntExist
BaseStep.Exception.TargetStepToWriteToDoesntExist
Error message
BaseStep.Exception.TargetStepToWriteToDoesntExist
What it means
The write-side counterpart of findInputRowSet: findOutputRowSet(String targetStep) resolves the named target step via transMeta.findStep and throws KettleStepException when no step with that name exists in the transformation. The step tried to write rows to a row set for a target that is not part of the transformation.
Solutions
- Correct the target step name in the writing step's configuration to match a step that exists in this transformation.
- Re-open the step dialog and re-select the target step from the dropdown.
- Ensure the target step is actually connected (hop drawn) to the writing step if the plugin relies on direct hops.
- In custom code, validate transMeta.findStep(name) != null before writing, or use parameters for the name.
Example fix
// before
RowSet rs = findOutputRowSet("Outpt"); // typo
// after
RowSet rs = findOutputRowSet("Output"); Defensive patterns
Strategy: validation
Validate before calling
if (transMeta.findStep(targetStepName) == null) throw new IllegalArgumentException("Target step '" + targetStepName + "' not found in transformation"); Try / catch
try { RowSet rs = findOutputRowSet(targetStepName); } catch (KettleStepException e) { if (e.getMessage().contains("exist")) { logError("Target step name invalid: " + targetStepName); } throw e; } Prevention
- Ensure the target hop exists and is spelled exactly as on canvas
- Re-open step dialogs after renames to refresh stored names
- Validate target names at plugin configuration time (dialog check)
- Use variables instead of hard-coded step names in custom code
When it happens
Trigger: Calling BaseStep.findOutputRowSet("SomeStep") (or a plugin configured with a target step name) where the name does not match any step in the current transformation: typo, renamed/deleted step, or target defined in another transformation.
Common situations: Renaming the target step after configuring a plugin that writes into it; mapping/sub-transformations hiding the target; hard-coded target names in custom step code.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- BaseStep.Exception.SourceStepToReadFromDoesntExist
- BaseStep.Exception.SourceStepToReadFromCantRunInMultipleCopies
- BaseStep.Exception.TargetStepToWriteToCantRunInMultipleCopies
- A deadlock was detected between steps
- AddSequence.Exception.NoSpecifiedMethod
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f37617e5860366b5.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java:2482
return null;
}
/**
* Find output row set.
*
* @param targetStep the target step
* @return the row set
* @throws KettleStepException the kettle step exception
*/
public RowSet findOutputRowSet( String targetStep ) throws KettleStepException {
// Check to see that "targetStep" only runs in a single copy
// Otherwise you'll see problems during execution.
//
StepMeta targetStepMeta = transMeta.findStep( targetStep );
if ( targetStepMeta == null ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "BaseStep.Exception.TargetStepToWriteToDoesntExist", targetStep ) );
}
if ( targetStepMeta.getCopies() > 1 ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "BaseStep.Exception.TargetStepToWriteToCantRunInMultipleCopies", targetStep, Integer
.toString( targetStepMeta.getCopies() ) ) );
}
return findOutputRowSet( getStepname(), getCopy(), targetStep, 0 );
}
/**
* Find an output rowset in a running transformation. It will also look at the "to" step to see if this is a mapping.
* If it is, it will find the appropriate rowset in that transformation.
*
* @param from
* @param fromcopyView on GitHub (pinned to f3058517a1)