Class FixedWidthReport
- Namespace
- Wolfgang.Etl.FixedWidth
- Assembly
- Wolfgang.Etl.FixedWidth.dll
A progress report for fixed-width extract and load operations. Extends Wolfgang.Etl.Abstractions.Report with additional diagnostic properties specific to fixed-width file processing.
public record FixedWidthReport : Report, IEquatable<Report>, IEquatable<FixedWidthReport>
- Inheritance
-
ReportFixedWidthReport
- Implements
-
IEquatable<Report>
- Inherited Members
-
Report.ToString()Report.GetHashCode()Report.Equals(Report)Report.<Clone>$()Report.EqualityContractReport.CurrentItemCountReport.StartedAtReport.ElapsedReport.TotalItemCountReport.ItemsPerSecondReport.PercentCompleteReport.EstimatedRemaining
Remarks
CurrentLineNumber reflects the physical line currently being processed — the same number shown in an editor such as Notepad++. It is updated before a line is parsed or written so that if an exception is thrown, the reported line number points directly to the offending line in the file.
For the extractor, CurrentLineNumber includes header lines, the separator line, and all data lines. For the loader, it includes the header line, the separator line, and all data lines written so far.
Constructors
FixedWidthReport(int, int, int, int, long)
Initializes a new instance of FixedWidthReport.
[Obsolete("Use the FixedWidthReportOptions constructor, which names each count at the call site. This overload will be removed in a future release.")]
public FixedWidthReport(int currentCount, int currentSkippedItemCount, int currentRejectedItemCount, int currentFilteredLineCount, long currentLineNumber)
Parameters
currentCountintThe number of data records processed so far.
currentSkippedItemCountintThe number of records skipped by the skip budget so far.
currentRejectedItemCountintThe number of records rejected so far (extractor only).
currentFilteredLineCountintThe number of non-record lines read so far (extractor only).
currentLineNumberlongThe 1-based physical line number currently being processed in the file.
FixedWidthReport(int, int, long)
Initializes a new instance of FixedWidthReport with the rejected and filtered counts defaulted to zero.
[Obsolete("Use the FixedWidthReportOptions constructor, which names each count at the call site. This overload will be removed in a future release.")]
public FixedWidthReport(int currentCount, int currentSkippedItemCount, long currentLineNumber)
Parameters
currentCountintThe number of data records processed so far.
currentSkippedItemCountintThe number of records skipped by the skip budget so far.
currentLineNumberlongThe 1-based physical line number currently being processed in the file.
FixedWidthReport(FixedWidthReportOptions)
Initializes a new instance of FixedWidthReport from a FixedWidthReportOptions, naming each count at the call site.
public FixedWidthReport(FixedWidthReportOptions options)
Parameters
optionsFixedWidthReportOptionsThe counts to report. Unset members default to zero.
Exceptions
- ArgumentNullException
optionsis null.
Properties
CurrentFilteredLineCount
(Extractor only.) The number of physical lines read that did not produce a
record and were neither skipped by the budget nor rejected: header lines, the
separator line, blank lines dropped per BlankLineHandling, lines
dropped by LineFilter, and the line that triggered early termination.
With CurrentLineNumber this closes the line accounting:
CurrentLineNumber = CurrentItemCount + CurrentSkippedItemCount +
CurrentRejectedItemCount + CurrentFilteredLineCount. Always 0 for the loader.
public int CurrentFilteredLineCount { get; }
Property Value
CurrentLineNumber
The 1-based physical line number of the line currently being processed. Matches the line number shown in a text editor — no adjustment is needed for header or separator lines. If an exception is thrown during processing, this value points to the line that caused it.
public long CurrentLineNumber { get; }
Property Value
CurrentRejectedItemCount
(Extractor only.) The number of parsed records rejected so far: records
discarded via Skip and records rejected
by RecordValidator. Always 0 for the loader.
public int CurrentRejectedItemCount { get; }
Property Value
CurrentSkippedItemCount
The number of records skipped by the SkipItemCount budget (pagination)
so far. This does not include records rejected for content or data
quality — see CurrentRejectedItemCount — nor non-record lines —
see CurrentFilteredLineCount. For the loader, includes records
skipped by the skip budget.
public int CurrentSkippedItemCount { get; }