{"record":{"id":"b9cdd36f5cc91f46","repo":"pentaho/pentaho-kettle","slug":"fieldsplitter-log-couldnotfindfieldtosplit","errorCode":null,"errorMessage":"FieldSplitter.Log.CouldNotFindFieldToSplit","messagePattern":"FieldSplitter\\.Log\\.CouldNotFindFieldToSplit","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitter.java","lineNumber":59,"sourceCode":"\n  private FieldSplitterMeta meta;\n  private FieldSplitterData data;\n\n  public FieldSplitter( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,\n                        Trans trans ) {\n    super( stepMeta, stepDataInterface, copyNr, transMeta, trans );\n  }\n\n  private Object[] splitField( Object[] r ) throws KettleException {\n    if ( first ) {\n      first = false;\n      // get the RowMeta\n      data.previousMeta = getInputRowMeta().clone();\n\n      // search field\n      data.fieldnr = data.previousMeta.indexOfValue( meta.getSplitField() );\n      if ( data.fieldnr < 0 ) {\n        throw new KettleValueException( BaseMessages.getString(\n          PKG, \"FieldSplitter.Log.CouldNotFindFieldToSplit\", meta.getSplitField() ) );\n      }\n\n      // only String type allowed\n      if ( !data.previousMeta.getValueMeta( data.fieldnr ).isString() ) {\n        throw new KettleValueException( ( BaseMessages.getString(\n          PKG, \"FieldSplitter.Log.SplitFieldNotValid\", meta.getSplitField() ) ) );\n      }\n\n      // prepare the outputMeta\n      //\n      data.outputMeta = getInputRowMeta().clone();\n      meta.getFields( getTransMeta().getBowl(), data.outputMeta, getStepname(), null, null, this, repository,\n        metaStore );\n\n      // Now create objects to do string to data type conversion...\n      //\n      data.conversionMeta = data.outputMeta.cloneToType( ValueMetaInterface.TYPE_STRING );","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/fieldsplitter/FieldSplitter.java#L41-L77","documentation":"FieldSplitter.splitField looks up the configured split field in the incoming row's RowMeta by name. If indexOfValue returns -1 — the field does not exist in the row arriving at this step — it throws this KettleValueException with the field name.","triggerScenarios":"The step's 'split field' setting names a field that is absent from the input stream at runtime, e.g. after upstream steps were renamed, removed, or made conditional.","commonSituations":"Renaming or deleting an upstream field without updating the FieldSplitter config; a conditional upstream step no longer produces the field; copying a transformation between environments where the source emits different columns.","solutions":["Open the FieldSplitter step and re-select the split field from the available fields list","Ensure the upstream step producing the field runs before this step","Run 'Verify connections/fields' on the transformation to detect broken hops","If the field may be absent, use a step that adds a default value before splitting"],"exampleFix":"// before\nString splitField = \"old_name\";\n// after\nString splitField = \"renamed_field\"; // re-pick in step dialog to match upstream output","handlingStrategy":"validation","validationCode":"// before the step runs, check the field exists in the incoming row\nRowMetaInterface in = transMeta.getPrevStepFields(stepMeta);\nif (in.indexOfValue(splitFieldName) < 0) {\n  throw new IllegalArgumentException(\"Split field missing from input: \" + splitFieldName);\n}","typeGuard":null,"tryCatchPattern":"try {\n  Object[] row = splitStep.splitField(inputRow);\n} catch (KettleValueException e) {\n  // route row to error handling stream / log and continue\n}","preventionTips":["Use 'Get Fields' in the step dialog instead of typing field names","Re-run field verification after renaming upstream fields","Avoid deleting producing steps without updating dependents"],"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"}