pentaho/pentaho-kettle · error · KettleStepException
DenormaliserMeta.Exception.RequiredTargetFieldName
DenormaliserMeta.Exception.RequiredTargetFieldName
Error message
DenormaliserMeta.Exception.RequiredTargetFieldName
What it means
In DenormaliserMeta.getFields, every configured target field must have a non-empty field name, because the step removes those source columns from the row before re-adding the denormalized (pivoted) targets. If the i-th target field's name is null or empty, a KettleStepException identifies the offending entry by ordinal (i+1).
Solutions
- Open the Denormaliser dialog and fill in the missing target field name (the message tells you which entry number is blank).
- Delete blank/unused rows from the target fields table.
- If injecting metadata, ensure every target-field row includes a non-empty field name.
- In code, always call setFieldName(...) on each DenormaliserTargetField before use.
Example fix
// before
targets[2].setFieldName(null);
// after
targets[2].setFieldName("amount"); Defensive patterns
Strategy: validation
Validate before calling
for (int i = 0; i < targets.length; i++) {
if (targets[i].getFieldName() == null || targets[i].getFieldName().isEmpty()) {
throw new IllegalArgumentException("Target field " + (i + 1) + " has no name");
}
} Try / catch
try { transMeta.getFields(...); } catch (KettleStepException e) { log.error("Denormaliser target field #? blank: {}", e.getMessage()); } Prevention
- Fill in every column of the target-fields grid or delete unused rows.
- Validate metadata injection mappings cover field names for all rows.
- Set fieldName programmatically whenever constructing DenormaliserTargetField objects.
When it happens
Trigger: getFields iterates denormaliserTargetField and encounters an entry whose getFieldName() is null or "" — thrown with the 1-based index of the bad entry.
Common situations: A partially filled target-field row in the Denormaliser dialog (name left blank but other settings entered); metadata injection mapping that skips a field name; programmatic construction of DenormaliserMeta with a default-constructed target field.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- DenormaliserMeta.Exception.RequiredKeyField
- GPBulkLoaderMeta.Exception.TableNotSpecified
- A connection of type PALO is expected
- A connection of type PALO is expected
- A server socket allocation always has to accompanied by a…
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/ec71f629b14cc9d3.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/denormaliser/DenormaliserMeta.java:182
throw new KettleStepException( BaseMessages.getString(
PKG, "DenormaliserMeta.Exception.UnableToLocateKeyField", keyField ) );
}
row.removeValueMeta( idx );
} else {
throw new KettleStepException( BaseMessages.getString( PKG, "DenormaliserMeta.Exception.RequiredKeyField" ) );
}
// Remove all field value(s) (there will be different entries for each output row)
//
for ( int i = 0; i < denormaliserTargetField.length; i++ ) {
String fieldname = denormaliserTargetField[i].getFieldName();
if ( fieldname != null && fieldname.length() > 0 ) {
int idx = row.indexOfValue( fieldname );
if ( idx >= 0 ) {
row.removeValueMeta( idx );
}
} else {
throw new KettleStepException( BaseMessages.getString(
PKG, "DenormaliserMeta.Exception.RequiredTargetFieldName", ( i + 1 ) + "" ) );
}
}
// Re-add the target fields
for ( int i = 0; i < denormaliserTargetField.length; i++ ) {
DenormaliserTargetField field = denormaliserTargetField[i];
try {
ValueMetaInterface target =
ValueMetaFactory.createValueMeta( field.getTargetName(), field.getTargetType() );
target.setOrigin( name );
target.setConversionMask( field.getTargetFormat() );
target.setLength( field.getTargetLength(), field.getTargetPrecision() );
target.setCurrencySymbol( field.getTargetCurrencySymbol() );
target.setDecimalSymbol( field.getTargetDecimalSymbol() );
target.setGroupingSymbol( field.getTargetGroupingSymbol() );
row.addValueMeta( target );
} catch ( Exception e ) {View on GitHub (pinned to f3058517a1)