CE-1955 Add info summary line re: number of records processed; also return early if all records have mapping errors... this could lead to some spoon feeding, but, is working better now, so.

This commit is contained in:
2025-01-07 11:22:49 -06:00
parent 5171af1c95
commit bcedb566ff

View File

@ -241,8 +241,10 @@ public class BulkInsertTransformStep extends AbstractTransformStep
{ {
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// skip the rest of this method if there aren't any records w/o errors in them // // skip the rest of this method if there aren't any records w/o errors in them //
// but, advance our counter before we return. //
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
this.rowsProcessed += recordsInThisPage; this.rowsProcessed += recordsInThisPage;
return;
} }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -508,6 +510,15 @@ public class BulkInsertTransformStep extends AbstractTransformStep
ArrayList<ProcessSummaryLineInterface> rs = new ArrayList<>(); ArrayList<ProcessSummaryLineInterface> rs = new ArrayList<>();
String tableLabel = table == null ? "" : table.getLabel(); String tableLabel = table == null ? "" : table.getLabel();
ProcessSummaryLine recordsProcessedLine = new ProcessSummaryLine(Status.INFO);
recordsProcessedLine.setCount(rowsProcessed);
rs.add(recordsProcessedLine);
recordsProcessedLine.withMessageSuffix(" processed from the file.");
recordsProcessedLine.withSingularFutureMessage("record was");
recordsProcessedLine.withSingularPastMessage("record was");
recordsProcessedLine.withPluralFutureMessage("records were");
recordsProcessedLine.withPluralPastMessage("records were");
String noWarningsSuffix = processSummaryWarningsAndErrorsRollup.countWarnings() == 0 ? "" : " with no warnings"; String noWarningsSuffix = processSummaryWarningsAndErrorsRollup.countWarnings() == 0 ? "" : " with no warnings";
okSummary.setSingularFutureMessage(tableLabel + " record will be inserted" + noWarningsSuffix + "."); okSummary.setSingularFutureMessage(tableLabel + " record will be inserted" + noWarningsSuffix + ".");
okSummary.setPluralFutureMessage(tableLabel + " records will be inserted" + noWarningsSuffix + "."); okSummary.setPluralFutureMessage(tableLabel + " records will be inserted" + noWarningsSuffix + ".");