{"record":{"id":"db13fe853c11fc78","repo":"pentaho/pentaho-kettle","slug":"fieldsplitter-log-couldnotfindfieldtosplit-fieldsplittermeta","errorCode":null,"errorMessage":"FieldSplitter.Log.CouldNotFindFieldToSplit","messagePattern":"FieldSplitter\\.Log\\.CouldNotFindFieldToSplit","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitterMeta.java","lineNumber":410,"sourceCode":"  public int getFieldsCount() {\n    int count = Math.min( getFieldName().length, getFieldType().length );\n    count = Math.min( count, getFieldLength().length );\n    count = Math.min( count, getFieldPrecision().length );\n    count = Math.min( count, getFieldFormat().length );\n    count = Math.min( count, getFieldDecimal().length );\n    count = Math.min( count, getFieldGroup().length );\n    count = Math.min( count, getFieldCurrency().length );\n    count = Math.min( count, getFieldTrimType().length );\n    return count;\n  }\n\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,\n    VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n    // Remove the field to split\n    int idx = r.indexOfValue( getSplitField() );\n    if ( idx < 0 ) { // not found\n      throw new RuntimeException( BaseMessages.getString(\n        PKG, \"FieldSplitter.Log.CouldNotFindFieldToSplit\", getSplitField() ) );\n    }\n\n    // Add the new fields at the place of the index --> replace!\n    int count = getFieldsCount();\n    for ( int i = 0; i < count; i++ ) {\n      try {\n        final ValueMetaInterface v = ValueMetaFactory.createValueMeta( getFieldName()[i], getFieldType()[i] );\n        v.setLength( getFieldLength()[i], getFieldPrecision()[i] );\n        v.setOrigin( name );\n        v.setConversionMask( getFieldFormat()[i] );\n        v.setDecimalSymbol( getFieldDecimal()[i] );\n        v.setGroupingSymbol( getFieldGroup()[i] );\n        v.setCurrencySymbol( getFieldCurrency()[i] );\n        v.setTrimType( getFieldTrimType()[i] );\n        // TODO when implemented in UI\n        // v.setDateFormatLenient(dateFormatLenient);\n        // TODO when implemented in UI","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitterMeta.java#L392-L428","documentation":"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.","triggerScenarios":"Transformation initialization/previews where the split field name configured on the step does not exist in the row metadata produced by the preceding step.","commonSituations":"Same as runtime 1412 but detected earlier: upstream field renamed/deleted, wrong hop wiring, or previewing a step in isolation without the producing step.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// during metadata resolution, verify before transformation init\nRowMetaInterface r = transMeta.getPrevStepFields(stepMeta);\nif (r.indexOfValue(splitField) < 0) {\n  throw new IllegalArgumentException(\"Configured split field not in input: \" + splitField);\n}","typeGuard":null,"tryCatchPattern":"try { transMeta.getStepFields(stepMeta); }\ncatch (RuntimeException e) {\n  log.error(\"Field resolution failed: {}\", e.getMessage());\n}","preventionTips":["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"],"tags":["pdi","transformation","field-mapping"],"backgroundTag":"resource-not-found","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"}