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
Report
FixedWidthReport
Implements
IEquatable<Report>
Inherited Members
Report.ToString()
Report.GetHashCode()
Report.Equals(Report)
Report.<Clone>$()
Report.EqualityContract
Report.CurrentItemCount
Report.StartedAt
Report.Elapsed
Report.TotalItemCount
Report.ItemsPerSecond
Report.PercentComplete
Report.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

currentCount int

The number of data records processed so far.

currentSkippedItemCount int

The number of records skipped by the skip budget so far.

currentRejectedItemCount int

The number of records rejected so far (extractor only).

currentFilteredLineCount int

The number of non-record lines read so far (extractor only).

currentLineNumber long

The 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

currentCount int

The number of data records processed so far.

currentSkippedItemCount int

The number of records skipped by the skip budget so far.

currentLineNumber long

The 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

options FixedWidthReportOptions

The counts to report. Unset members default to zero.

Exceptions

ArgumentNullException

options is 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

int

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

long

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

int

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; }

Property Value

int