{"record":{"id":"46dad8523b2fe8eb","repo":"pentaho/pentaho-kettle","slug":"tablecomparemeta-exception-46dad8","errorCode":null,"errorMessage":"TableCompareMeta.Exception.NrErrorsInnerJoinFieldNotSpecified","messagePattern":"TableCompareMeta\\.Exception\\.NrErrorsInnerJoinFieldNotSpecified","errorType":"validation","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java","lineNumber":389,"sourceCode":"\n    if ( Utils.isEmpty( nrErrorsField ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"TableCompareMeta.Exception.NrErrorsFieldIsNotSpecified\" ) );\n    }\n    if ( Utils.isEmpty( nrRecordsReferenceField ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"TableCompareMeta.Exception.NrRecordsReferenceFieldNotSpecified\" ) );\n    }\n    if ( Utils.isEmpty( nrRecordsCompareField ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"TableCompareMeta.Exception.NrRecordsCompareFieldNotSpecified\" ) );\n    }\n    if ( Utils.isEmpty( nrErrorsLeftJoinField ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"TableCompareMeta.Exception.NrErrorsLeftJoinFieldNotSpecified\" ) );\n    }\n    if ( Utils.isEmpty( nrErrorsInnerJoinField ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"TableCompareMeta.Exception.NrErrorsInnerJoinFieldNotSpecified\" ) );\n    }\n    if ( Utils.isEmpty( nrErrorsRightJoinField ) ) {\n      throw new KettleStepException( BaseMessages.getString(\n        PKG, \"TableCompareMeta.Exception.NrErrorsRightJoinFieldNotSpecified\" ) );\n    }\n\n    ValueMetaInterface nrErrorsValueMeta = new ValueMetaInteger( nrErrorsField );\n    nrErrorsValueMeta.setLength( 9 );\n    nrErrorsValueMeta.setOrigin( origin );\n    inputRowMeta.addValueMeta( nrErrorsValueMeta );\n\n    ValueMetaInterface nrRecordsReference =\n      new ValueMetaInteger( nrRecordsReferenceField );\n    nrRecordsReference.setLength( 9 );\n    nrRecordsReference.setOrigin( origin );\n    inputRowMeta.addValueMeta( nrRecordsReference );\n","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java#L371-L407","documentation":"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.","triggerScenarios":"getFields(...) invoked with nrErrorsInnerJoinField null/empty — thrown at TableCompareMeta.java:389.","commonSituations":"Programmatic metadata construction skipping this setter; hand-edited .ktr XML; template-based transformation generation missing join-count fields.","solutions":["Set the 'nr errors inner join field' in the step dialog (e.g. 'nr_errors_inner').","In code, call meta.setNrErrorsInnerJoinField(\"nr_errors_inner\").","Fix the .ktr XML <nr_errors_inner_join_field> tag."],"exampleFix":"// before\nmeta.setNrErrorsLeftJoinField( \"nr_errors_left\" );\n// after\nmeta.setNrErrorsLeftJoinField( \"nr_errors_left\" );\nmeta.setNrErrorsInnerJoinField( \"nr_errors_inner\" );","handlingStrategy":"validation","validationCode":"if ( meta.getNrErrorsInnerJoinField() == null || meta.getNrErrorsInnerJoinField().isEmpty() ) {\n  meta.setNrErrorsInnerJoinField( \"nr_errors_inner\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.getFields( ... );\n} catch ( KettleStepException e ) {\n  if ( e.getMessage().contains( \"NrErrorsInnerJoinFieldNotSpecified\" ) ) {\n    meta.setNrErrorsInnerJoinField( \"nr_errors_inner\" );\n  }\n}","preventionTips":["Set all six field names in a single builder call sequence.","Run transformation metadata validation in CI for generated .ktr files.","Avoid partial copies of step XML between transformations."],"tags":["kettle","configuration","validation","missing-field"],"backgroundTag":"empty-required-field","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"}