pentaho/pentaho-kettle · error · RuntimeException
FieldSplitter.Log.CouldNotFindFieldToSplit
Error message
FieldSplitter.Log.CouldNotFindFieldToSplit
What it means
During metadata resolution, FieldSplitterMeta.getFields removes the split field from the outgoing row layout and replaces it with the generated output fields. If the split field is not present in the row metadata, it throws a plain RuntimeException with the CouldNotFindFieldToSplit message.
Solutions
- Re-select the split field in the step dialog from 'Get Fields'
- Wire the step after the one that produces the field
- Run a fields-verification on the transformation to find all broken references
Defensive patterns
Strategy: validation
Validate before calling
// during metadata resolution, verify before transformation init
RowMetaInterface r = transMeta.getPrevStepFields(stepMeta);
if (r.indexOfValue(splitField) < 0) {
throw new IllegalArgumentException("Configured split field not in input: " + splitField);
} Try / catch
try { transMeta.getStepFields(stepMeta); }
catch (RuntimeException e) {
log.error("Field resolution failed: {}", e.getMessage());
} Prevention
- Re-pick the split field via 'Get Fields' after any upstream change
- Wire the split step directly after the producing step
- Run transformation field verification in CI for saved .ktr files
When it happens
Trigger: Transformation initialization/previews where the split field name configured on the step does not exist in the row metadata produced by the preceding step.
Common situations: Same as runtime 1412 but detected earlier: upstream field renamed/deleted, wrong hop wiring, or previewing a step in isolation without the producing step.
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
- FieldSplitter.Log.CouldNotFindFieldToSplit
- Unable to find field [] in the input rows
- AvroInput.Error.NoPathSet
- Calculator.Error.UnableFindField
- ClosureGenerator.Exception.ChildFieldNotFound
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/db13fe853c11fc78.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitterMeta.java:410
public int getFieldsCount() {
int count = Math.min( getFieldName().length, getFieldType().length );
count = Math.min( count, getFieldLength().length );
count = Math.min( count, getFieldPrecision().length );
count = Math.min( count, getFieldFormat().length );
count = Math.min( count, getFieldDecimal().length );
count = Math.min( count, getFieldGroup().length );
count = Math.min( count, getFieldCurrency().length );
count = Math.min( count, getFieldTrimType().length );
return count;
}
@Override
public void getFields( Bowl bowl, RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,
VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
// Remove the field to split
int idx = r.indexOfValue( getSplitField() );
if ( idx < 0 ) { // not found
throw new RuntimeException( BaseMessages.getString(
PKG, "FieldSplitter.Log.CouldNotFindFieldToSplit", getSplitField() ) );
}
// Add the new fields at the place of the index --> replace!
int count = getFieldsCount();
for ( int i = 0; i < count; i++ ) {
try {
final ValueMetaInterface v = ValueMetaFactory.createValueMeta( getFieldName()[i], getFieldType()[i] );
v.setLength( getFieldLength()[i], getFieldPrecision()[i] );
v.setOrigin( name );
v.setConversionMask( getFieldFormat()[i] );
v.setDecimalSymbol( getFieldDecimal()[i] );
v.setGroupingSymbol( getFieldGroup()[i] );
v.setCurrencySymbol( getFieldCurrency()[i] );
v.setTrimType( getFieldTrimType()[i] );
// TODO when implemented in UI
// v.setDateFormatLenient(dateFormatLenient);
// TODO when implemented in UIView on GitHub (pinned to f3058517a1)