{"record":{"id":"79940da30e54ce68","repo":"pentaho/pentaho-kettle","slug":"jobexecutor-exception-groupfieldnotfound","errorCode":"JobExecutor.Exception.GroupFieldNotFound","errorMessage":"JobExecutor.Exception.GroupFieldNotFound","messagePattern":"JobExecutor\\.Exception\\.GroupFieldNotFound","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutor.java","lineNumber":133,"sourceCode":"          meta.getFields( getTransMeta().getBowl(),\n            data.resultRowsOutputRowMeta, getStepname(), null, meta.getResultRowsTargetStepMeta(), this,\n            repository, metaStore );\n          data.resultRowsRowSet = findOutputRowSet( meta.getResultRowsTargetStepMeta().getName() );\n        }\n        if ( meta.getResultFilesTargetStepMeta() != null ) {\n          meta.getFields( getTransMeta().getBowl(),\n            data.resultFilesOutputRowMeta, getStepname(), null, meta.getResultFilesTargetStepMeta(), this,\n            repository, metaStore );\n          data.resultFilesRowSet = findOutputRowSet( meta.getResultFilesTargetStepMeta().getName() );\n        }\n\n        // Remember which column to group on, if any...\n        //\n        data.groupFieldIndex = -1;\n        if ( !Utils.isEmpty( data.groupField ) ) {\n          data.groupFieldIndex = getInputRowMeta().indexOfValue( data.groupField );\n          if ( data.groupFieldIndex < 0 ) {\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"JobExecutor.Exception.GroupFieldNotFound\", data.groupField ) );\n          }\n          data.groupFieldMeta = getInputRowMeta().getValueMeta( data.groupFieldIndex );\n        }\n      }\n\n      // Grouping by field and execution time works ONLY if grouping by size is disabled.\n      if ( data.groupSize < 0 ) {\n        if ( data.groupFieldIndex >= 0 ) { // grouping by field\n          Object groupFieldData = row[data.groupFieldIndex];\n          if ( data.prevGroupFieldData != null ) {\n            if ( data.groupFieldMeta.compare( data.prevGroupFieldData, groupFieldData ) != 0 ) {\n              executeJob();\n            }\n          }\n          data.prevGroupFieldData = groupFieldData;\n        } else if ( data.groupTime > 0 ) { // grouping by execution time\n          long now = System.currentTimeMillis();","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/jobexecutor/JobExecutor.java#L115-L151","documentation":"Thrown by the JobExecutor step's processRow when a 'group field' is configured on the step but the column name does not exist in the incoming row metadata. The step looks up the field index via indexOfValue(); a return of -1 (field absent from the input stream) triggers this KettleException, naming the missing field.","triggerScenarios":"A group field name is entered in the JobExecutor step settings, but the upstream step feeding the transformation was renamed, removed, or never outputs that column, so getInputRowMeta().indexOfValue(data.groupField) returns -1 at runtime.","commonSituations":"Renaming a field in an upstream Select Values / Text File Input step without updating the JobExecutor step; wiring the step to a different input stream; group field spelled with wrong case or trailing whitespace; copy-pasting step metadata between transformations with different layouts.","solutions":["Open the JobExecutor step dialog and correct the group field name to match an actual field in the incoming stream","Preview the input of the step (right-click > Preview) to see the actual field names and fix case/whitespace mismatches","If grouping is not needed, clear the group field setting entirely so the code skips the lookup","Re-add the missing field in the upstream step or insert a 'Select values' step to add/rename the field before JobExecutor"],"exampleFix":"// before (upstream field renamed from 'group_id' to 'groupId')\nGroup field: group_id  -> throws GroupFieldNotFound\n// after\nGroup field: groupId   (or rename the upstream field back to group_id)","handlingStrategy":"validation","validationCode":"// Before running the transformation, verify the group field exists in the input layout\nRowMetaInterface inputRowMeta = trans.getTransMeta().getPrevStepFields(stepName);\nif ( inputRowMeta.indexOfValue( groupFieldName ) < 0 ) {\n  throw new IllegalArgumentException(\n    \"Group field '\" + groupFieldName + \"' not present in input of step \" + stepName );\n}","typeGuard":"boolean hasField(RowMetaInterface rowMeta, String fieldName) {\n  return rowMeta != null && fieldName != null && rowMeta.indexOfValue(fieldName) >= 0;\n}","tryCatchPattern":"try {\n  processRow();\n} catch ( KettleException e ) {\n  if ( e.getMessage().contains(\"GroupFieldNotFound\") ) {\n    logError(\"Configured group field missing from input stream: \" + e.getMessage());\n    // stop with a clear configuration error rather than retrying\n  } else { throw e; }\n}","preventionTips":["After any upstream field rename, re-open downstream JobExecutor steps and re-select fields from the dropdown instead of typing them","Use the field picker in the step dialog rather than free-typing field names","Preview input rows of the step before saving/running the transformation","Avoid trailing spaces and case variations in field names across the transformation"],"tags":["pentaho-kettle","transformation","field-lookup","configuration"],"backgroundTag":"record-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"}