{"record":{"id":"889f3df1c0bafdd8","repo":"pentaho/pentaho-kettle","slug":"unable-to-find-partitioning-field-name-fieldname-in-the","errorCode":null,"errorMessage":"Unable to find partitioning field name [${fieldName}] in the output row...${rowMeta}","messagePattern":"Unable to find partitioning field name \\[(.+?)\\] in the output row\\.\\.\\.(.+?)","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/ModPartitioner.java","lineNumber":61,"sourceCode":"\n  public ModPartitioner clone() {\n    ModPartitioner modPartitioner = (ModPartitioner) super.clone();\n    modPartitioner.fieldName = fieldName;\n\n    return modPartitioner;\n  }\n\n  public String getDialogClassName() {\n    return \"org.pentaho.di.ui.trans.dialog.ModPartitionerDialog\";\n  }\n\n  public int getPartition( RowMetaInterface rowMeta, Object[] row ) throws KettleException {\n    init( rowMeta );\n\n    if ( partitionColumnIndex < 0 ) {\n      partitionColumnIndex = rowMeta.indexOfValue( fieldName );\n      if ( partitionColumnIndex < 0 ) {\n        throw new KettleStepException( \"Unable to find partitioning field name [\"\n          + fieldName + \"] in the output row...\" + rowMeta );\n      }\n    }\n\n    long value;\n\n    ValueMetaInterface valueMeta = rowMeta.getValueMeta( partitionColumnIndex );\n    Object valueData = row[partitionColumnIndex];\n\n    switch ( valueMeta.getType() ) {\n      case ValueMetaInterface.TYPE_INTEGER:\n        Long longValue = rowMeta.getInteger( row, partitionColumnIndex );\n        if ( longValue == null ) {\n          value = valueMeta.hashCode( valueData );\n        } else {\n          value = longValue.longValue();\n        }\n        break;","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/ModPartitioner.java#L43-L79","documentation":"ModPartitioner partitions rows across step copies by hashing a chosen field's value. During the first getPartition() call it initializes by looking up the configured field name in the incoming row metadata; if the field does not exist in the row, it throws this KettleStepException. The row metadata is appended to the message to help diagnose which fields are actually available.","triggerScenarios":"The partitioning step is configured with a field name (fieldName) that is not present in the output row metadata at runtime — e.g. the field was renamed, removed by a preceding step, or the partitioner field was set on the wrong step whose output schema differs.","commonSituations":"Renaming a field upstream after configuring the partitioner; using a partition field produced in a later step; case-sensitive field name mismatch; copying transformations between environments where step definitions drifted.","solutions":["Open the partitioning step settings and set the partitioning field to a column that exists in that step's output row","Inspect the row metadata in the error message to see the actual available field names and correct the spelling/case","Re-run a preview of the preceding step to confirm the field is produced before the partitioning step"],"exampleFix":"// before (partitioner config references removed field)\npartitioner.setFieldName(\"oldAmount\");\n// after\npartitioner.setFieldName(\"amount\"); // must match output row field","handlingStrategy":"validation","validationCode":"int idx = rowMeta.indexOfValue(fieldName);\nif (idx < 0) {\n  throw new IllegalArgumentException(\"Field '\" + fieldName + \"' not in row; available: \" + rowMeta.getFieldNames());\n}","typeGuard":"boolean hasField = rowMeta.indexOfValue(fieldName) >= 0;","tryCatchPattern":"try { partitioner.getPartition(rowMeta, row); } catch (KettleStepException e) { log.error(\"Partition field missing: \" + e.getMessage()); }","preventionTips":["Preview upstream steps to confirm the partition field exists in the output row","Re-verify partitioner settings after renaming fields","Use repository search to find steps referencing a renamed field"],"tags":["kettle","partitioning","row-metadata"],"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"}