pentaho/pentaho-kettle · error · KettleStepException

TableCompareMeta.Exception.NrErrorsInnerJoinFieldNotSpecifie…

Error message

TableCompareMeta.Exception.NrErrorsInnerJoinFieldNotSpecified

What it means

Field-validation chain in TableCompareMeta.getFields: the step configuration is missing the Nr of errors-inner-join field name. getFields validates all output field settings up front and throws this KettleStepException before any rows flow.

Solutions

  1. Set the 'nr errors inner join field' in the step dialog (e.g. 'nr_errors_inner').
  2. In code, call meta.setNrErrorsInnerJoinField("nr_errors_inner").
  3. Fix the .ktr XML <nr_errors_inner_join_field> tag.

Example fix

// before
meta.setNrErrorsLeftJoinField( "nr_errors_left" );
// after
meta.setNrErrorsLeftJoinField( "nr_errors_left" );
meta.setNrErrorsInnerJoinField( "nr_errors_inner" );
Defensive patterns

Strategy: validation

Validate before calling

if ( meta.getNrErrorsInnerJoinField() == null || meta.getNrErrorsInnerJoinField().isEmpty() ) {
  meta.setNrErrorsInnerJoinField( "nr_errors_inner" );
}

Try / catch

try {
  meta.getFields( ... );
} catch ( KettleStepException e ) {
  if ( e.getMessage().contains( "NrErrorsInnerJoinFieldNotSpecified" ) ) {
    meta.setNrErrorsInnerJoinField( "nr_errors_inner" );
  }
}

Prevention

When it happens

Trigger: getFields(...) invoked with nrErrorsInnerJoinField null/empty — thrown at TableCompareMeta.java:389.

Common situations: Programmatic metadata construction skipping this setter; hand-edited .ktr XML; template-based transformation generation missing join-count fields.

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


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/46dad8523b2fe8eb. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java:389

    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 );
    nrRecordsReference.setLength( 9 );
    nrRecordsReference.setOrigin( origin );
    inputRowMeta.addValueMeta( nrRecordsReference );

View on GitHub (pinned to f3058517a1)