pentaho/pentaho-kettle · error · KettleStepException
TableCompareMeta.Exception.NrErrorsLeftJoinFieldNotSpecified
Error message
TableCompareMeta.Exception.NrErrorsLeftJoinFieldNotSpecified
What it means
Fourth check in TableCompareMeta.getFields(): the 'nr errors left join' output field (nrErrorsLeftJoinField) is not specified. The step reports left-join mismatch counts and needs this output field name.
Solutions
- Set the 'nr errors left join field' in the step dialog (e.g. 'nr_errors_left').
- In code, call meta.setNrErrorsLeftJoinField("nr_errors_left").
- Fix the .ktr XML <nr_errors_left_join_field> tag.
Example fix
// before meta.setNrRecordsCompareField( "nr_records_compare" ); // after meta.setNrRecordsCompareField( "nr_records_compare" ); meta.setNrErrorsLeftJoinField( "nr_errors_left" );
Defensive patterns
Strategy: validation
Validate before calling
if ( meta.getNrErrorsLeftJoinField() == null || meta.getNrErrorsLeftJoinField().isEmpty() ) {
meta.setNrErrorsLeftJoinField( "nr_errors_left" );
} Try / catch
try {
meta.getFields( ... );
} catch ( KettleStepException e ) {
if ( e.getMessage().contains( "NrErrorsLeftJoinFieldNotSpecified" ) ) {
meta.setNrErrorsLeftJoinField( "nr_errors_left" );
}
} Prevention
- Configure join-error fields together with the count fields, never separately.
- Keep a canonical TableCompareMeta factory in code for generated transformations.
- Review .ktr diffs for dropped tags after merges.
When it happens
Trigger: getFields(...) invoked with nrErrorsLeftJoinField null/empty — thrown at TableCompareMeta.java:385 after the first three checks pass.
Common situations: Programmatic construction setting only the main count fields; hand-edited .ktr XML; generated transformations from templates predating the join-error outputs.
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.NrErrorsRightJoinFieldNotSpecifie…
- TableCompareMeta.Exception.NrErrorsFieldIsNotSpecified
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/857d8e7f242f685a.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java:385
@Override
public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String origin, RowMetaInterface[] info,
StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {
if ( Utils.isEmpty( nrErrorsField ) ) {
throw new KettleStepException( BaseMessages.getString(
PKG, "TableCompareMeta.Exception.NrErrorsFieldIsNotSpecified" ) );
}
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 );View on GitHub (pinned to f3058517a1)