pentaho/pentaho-kettle · error · KettleStepException
TableCompareMeta.Exception.NrErrorsRightJoinFieldNotSpecifie…
Error message
TableCompareMeta.Exception.NrErrorsRightJoinFieldNotSpecified
What it means
Sixth check in TableCompareMeta.getFields(): the 'nr errors right join' output field (nrErrorsRightJoinField) is not specified. It is the last required-field validation before the step appends its output value metadata.
Solutions
- Set the 'nr errors right join field' in the step dialog (e.g. 'nr_errors_right').
- In code, call meta.setNrErrorsRightJoinField("nr_errors_right").
- Fix the .ktr XML <nr_errors_right_join_field> tag.
Example fix
// before meta.setNrErrorsInnerJoinField( "nr_errors_inner" ); // after meta.setNrErrorsInnerJoinField( "nr_errors_inner" ); meta.setNrErrorsRightJoinField( "nr_errors_right" );
Defensive patterns
Strategy: validation
Validate before calling
if ( meta.getNrErrorsRightJoinField() == null || meta.getNrErrorsRightJoinField().isEmpty() ) {
meta.setNrErrorsRightJoinField( "nr_errors_right" );
} Try / catch
try {
meta.getFields( ... );
} catch ( KettleStepException e ) {
if ( e.getMessage().contains( "NrErrorsRightJoinFieldNotSpecified" ) ) {
meta.setNrErrorsRightJoinField( "nr_errors_right" );
}
} Prevention
- Remember the right-join field is the last required one; validate all six before execution.
- Add an assertion-style preflight that calls getFields() on a scratch RowMeta during deployment.
- Document required TableCompareMeta setters in team templates.
When it happens
Trigger: getFields(...) invoked with nrErrorsRightJoinField null/empty — thrown at TableCompareMeta.java:393 after all preceding checks pass.
Common situations: Programmatic construction missing the final setter; hand-edited .ktr XML; generated transformations from outdated templates.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- GetTableNames.Log.NoSchemaField
- TableCompareMeta.Exception.NrRecordsReferenceFieldNotSpecifi…
- TableCompareMeta.Exception.NrErrorsInnerJoinFieldNotSpecifie…
- TableCompareMeta.Exception.NrErrorsFieldIsNotSpecified
- TableCompareMeta.Exception.NrErrorsLeftJoinFieldNotSpecified
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c547eaac8e44d66a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java:393
}
if ( Utils.isEmpty( nrRecordsReferenceField ) ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "TableCompareMeta.Exception.NrRecordsReferenceFieldNotSpecified" ) );
}
if ( Utils.isEmpty( nrRecordsCompareField ) ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "TableCompareMeta.Exception.NrRecordsCompareFieldNotSpecified" ) );
}
if ( Utils.isEmpty( nrErrorsLeftJoinField ) ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "TableCompareMeta.Exception.NrErrorsLeftJoinFieldNotSpecified" ) );
}
if ( Utils.isEmpty( nrErrorsInnerJoinField ) ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "TableCompareMeta.Exception.NrErrorsInnerJoinFieldNotSpecified" ) );
}
if ( Utils.isEmpty( nrErrorsRightJoinField ) ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "TableCompareMeta.Exception.NrErrorsRightJoinFieldNotSpecified" ) );
}
ValueMetaInterface nrErrorsValueMeta = new ValueMetaInteger( nrErrorsField );
nrErrorsValueMeta.setLength( 9 );
nrErrorsValueMeta.setOrigin( origin );
inputRowMeta.addValueMeta( nrErrorsValueMeta );
ValueMetaInterface nrRecordsReference =
new ValueMetaInteger( nrRecordsReferenceField );
nrRecordsReference.setLength( 9 );
nrRecordsReference.setOrigin( origin );
inputRowMeta.addValueMeta( nrRecordsReference );
ValueMetaInterface nrRecordsCompare = new ValueMetaInteger( nrRecordsCompareField );
nrRecordsCompare.setLength( 9 );
nrRecordsCompare.setOrigin( origin );
inputRowMeta.addValueMeta( nrRecordsCompare );View on GitHub (pinned to f3058517a1)