Skip to content

Commit 8b51be9

Browse files
fix: removed record rejection from the error reports
1 parent b8c0b17 commit 8b51be9

3 files changed

Lines changed: 7 additions & 14 deletions

File tree

‎src/dve/pipeline/pipeline.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@ def error_report(
825825

826826
if not submission_status.number_of_records:
827827
sub_stats = None
828+
828829
else:
829830
err_types = {
830831
rw.get("Type"): rw.get("Count")
@@ -852,7 +853,11 @@ def error_report(
852853
summary_items = er.SummaryItems(
853854
submission_status=submission_status,
854855
summary_dict=summary_dict,
855-
row_headings=[e.reporting_name for e in ErrorReportCategories],
856+
row_headings=[
857+
e.reporting_name
858+
for e in ErrorReportCategories
859+
if e != ErrorReportCategories.RECORD_REJECTION
860+
],
856861
)
857862

858863
workbook = er.ExcelFormat(

‎src/dve/reporting/excel_report.py‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,7 @@ def _add_submission_info(self, status: str, summary: Worksheet):
153153
), # pylint: disable=C0301
154154
]
155155
)
156-
if status not in (
157-
ErrorReportStatus.PROCESSING_FAILED,
158-
ErrorReportStatus.FILE_REJECTION,
159-
):
160-
summary.append(
161-
[
162-
"",
163-
"Total Number of Records Rejected",
164-
self.submission_status.number_of_records_rejected,
165-
]
166-
)
156+
167157
summary.append(["", ""])
168158

169159

‎tests/test_pipeline/test_spark_pipeline.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,7 @@ def test_error_report_where_report_is_expected( # pylint: disable=redefined-out
440440
("File Name", "doesnotmatter"),
441441
("File Extension", "json"),
442442
("Total Number of Records Processed", "9"),
443-
("Total Number of Records Rejected", "2"),
444443
("File Rejection", "0"),
445-
("Record Rejection", "2"),
446444
("Warning", "0"),
447445
]
448446

0 commit comments

Comments
 (0)