{"record":{"id":"857d8e7f242f685a","repo":"pentaho/pentaho-kettle","slug":"tablecomparemeta-exception-nrerrorsleftjoinfieldnotspecified","errorCode":null,"errorMessage":"TableCompareMeta.Exception.NrErrorsLeftJoinFieldNotSpecified","messagePattern":"TableCompareMeta\\.Exception\\.NrErrorsLeftJoinFieldNotSpecified","errorType":"validation","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java","lineNumber":385,"sourceCode":"\n  @Override\n  public void getFields( Bowl bowl, RowMetaInterface inputRowMeta, String origin, RowMetaInterface[] info,\n    StepMeta nextStep, VariableSpace space, Repository repository, IMetaStore metaStore ) throws KettleStepException {\n\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 );","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/tablecompare/TableCompareMeta.java#L367-L403","documentation":"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.","triggerScenarios":"getFields(...) invoked with nrErrorsLeftJoinField null/empty — thrown at TableCompareMeta.java:385 after the first three checks pass.","commonSituations":"Programmatic construction setting only the main count fields; hand-edited .ktr XML; generated transformations from templates predating the join-error outputs.","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."],"exampleFix":"// before\nmeta.setNrRecordsCompareField( \"nr_records_compare\" );\n// after\nmeta.setNrRecordsCompareField( \"nr_records_compare\" );\nmeta.setNrErrorsLeftJoinField( \"nr_errors_left\" );","handlingStrategy":"validation","validationCode":"if ( meta.getNrErrorsLeftJoinField() == null || meta.getNrErrorsLeftJoinField().isEmpty() ) {\n  meta.setNrErrorsLeftJoinField( \"nr_errors_left\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  meta.getFields( ... );\n} catch ( KettleStepException e ) {\n  if ( e.getMessage().contains( \"NrErrorsLeftJoinFieldNotSpecified\" ) ) {\n    meta.setNrErrorsLeftJoinField( \"nr_errors_left\" );\n  }\n}","preventionTips":["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."],"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"}