diff --git a/ETL-Abstractions.ico b/ETL-Abstractions.ico new file mode 100644 index 0000000..933d3bf Binary files /dev/null and b/ETL-Abstractions.ico differ diff --git a/ETL-Abstractions.png b/ETL-Abstractions.png new file mode 100644 index 0000000..a02eeb0 Binary files /dev/null and b/ETL-Abstractions.png differ diff --git a/ETL.png b/ETL.png deleted file mode 100644 index 2970f9e..0000000 Binary files a/ETL.png and /dev/null differ diff --git a/examples/Net8.0/Example1-BasicETL/Example1-BasicETL.csproj b/examples/Net8.0/Example1-BasicETL/Example1-BasicETL.csproj index 0bb7c75..97c51f3 100644 --- a/examples/Net8.0/Example1-BasicETL/Example1-BasicETL.csproj +++ b/examples/Net8.0/Example1-BasicETL/Example1-BasicETL.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example2-WithCancellationToken/Example2-WithCancellationToken.csproj b/examples/Net8.0/Example2-WithCancellationToken/Example2-WithCancellationToken.csproj index c7472aa..9ebbdff 100644 --- a/examples/Net8.0/Example2-WithCancellationToken/Example2-WithCancellationToken.csproj +++ b/examples/Net8.0/Example2-WithCancellationToken/Example2-WithCancellationToken.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example3-WithGracefulCancellation/Example3-WithGracefulCancellation.csproj b/examples/Net8.0/Example3-WithGracefulCancellation/Example3-WithGracefulCancellation.csproj index a80a4b7..50c3a53 100644 --- a/examples/Net8.0/Example3-WithGracefulCancellation/Example3-WithGracefulCancellation.csproj +++ b/examples/Net8.0/Example3-WithGracefulCancellation/Example3-WithGracefulCancellation.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example4a-WithExtractorProgress/Example4a-WithExtractorProgress.csproj b/examples/Net8.0/Example4a-WithExtractorProgress/Example4a-WithExtractorProgress.csproj index 9d1f6e0..7496cb4 100644 --- a/examples/Net8.0/Example4a-WithExtractorProgress/Example4a-WithExtractorProgress.csproj +++ b/examples/Net8.0/Example4a-WithExtractorProgress/Example4a-WithExtractorProgress.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example4b-WithTransformerProgress/Example4b-WithTransformerProgress.csproj b/examples/Net8.0/Example4b-WithTransformerProgress/Example4b-WithTransformerProgress.csproj index c965d78..b0bef5b 100644 --- a/examples/Net8.0/Example4b-WithTransformerProgress/Example4b-WithTransformerProgress.csproj +++ b/examples/Net8.0/Example4b-WithTransformerProgress/Example4b-WithTransformerProgress.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example4c-WithLoaderProgress/Example4c-WithLoaderProgress.csproj b/examples/Net8.0/Example4c-WithLoaderProgress/Example4c-WithLoaderProgress.csproj index 27474bb..4a08436 100644 --- a/examples/Net8.0/Example4c-WithLoaderProgress/Example4c-WithLoaderProgress.csproj +++ b/examples/Net8.0/Example4c-WithLoaderProgress/Example4c-WithLoaderProgress.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Example5a-ExtractorWithProgressAndCancellation.csproj b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Example5a-ExtractorWithProgressAndCancellation.csproj index 192e917..580576f 100644 --- a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Example5a-ExtractorWithProgressAndCancellation.csproj +++ b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Example5a-ExtractorWithProgressAndCancellation.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/Example6-ReducingDuplicateCode.csproj b/examples/Net8.0/Example6-ReducingDuplicateCode/Example6-ReducingDuplicateCode.csproj index 86f1c34..143c04d 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/Example6-ReducingDuplicateCode.csproj +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/Example6-ReducingDuplicateCode.csproj @@ -7,6 +7,7 @@ enable enable 1.0.0 + Copyright {copyright year} {author} diff --git a/src/Wolfgang.Etl.Abstractions/ETL-Abstractions.ico b/src/Wolfgang.Etl.Abstractions/ETL-Abstractions.ico new file mode 100644 index 0000000..933d3bf Binary files /dev/null and b/src/Wolfgang.Etl.Abstractions/ETL-Abstractions.ico differ diff --git a/src/Wolfgang.Etl.Abstractions/ETL-Abstractions.png b/src/Wolfgang.Etl.Abstractions/ETL-Abstractions.png new file mode 100644 index 0000000..a02eeb0 Binary files /dev/null and b/src/Wolfgang.Etl.Abstractions/ETL-Abstractions.png differ diff --git a/src/Wolfgang.Etl.Abstractions/LoaderBase.cs b/src/Wolfgang.Etl.Abstractions/LoaderBase.cs index 52bccb4..faadf79 100644 --- a/src/Wolfgang.Etl.Abstractions/LoaderBase.cs +++ b/src/Wolfgang.Etl.Abstractions/LoaderBase.cs @@ -77,8 +77,7 @@ protected set } } - - + /// /// The maximum number of items to load. Once the loader has reached this limit, diff --git a/src/Wolfgang.Etl.Abstractions/Report.cs b/src/Wolfgang.Etl.Abstractions/Report.cs new file mode 100644 index 0000000..02dc5b4 --- /dev/null +++ b/src/Wolfgang.Etl.Abstractions/Report.cs @@ -0,0 +1,36 @@ +using System; + +namespace Wolfgang.Etl.Abstractions; + +/// +/// Provides a report of the current count in an ETL process. +/// +/// +/// This class can be used as a base class for other progress reports and expanded +/// with additional information such as total count, count remaining, etc. +/// +public record Report +{ + /// + /// Constructs a new instance of the class with the specified current count. + /// + /// + /// + public Report(int currentCount) + { + if (currentCount < 0) + { + throw new ArgumentOutOfRangeException(nameof(currentCount), "Current count cannot be less than 0."); + } + + CurrentCount = currentCount; + } + + + + /// + /// The number of items that have been processed so far in the ETL process. + /// + public int CurrentCount { get; } + +} \ No newline at end of file diff --git a/src/Wolfgang.Etl.Abstractions/TransformerBase.cs b/src/Wolfgang.Etl.Abstractions/TransformerBase.cs index 94e8f0a..d2840c7 100644 --- a/src/Wolfgang.Etl.Abstractions/TransformerBase.cs +++ b/src/Wolfgang.Etl.Abstractions/TransformerBase.cs @@ -273,6 +273,16 @@ CancellationToken token + /// + /// The worker method that performs the actual transformation. + /// + /// + /// IAsyncEnumerable<TSource> - A list of 0 or more items to be transformed + /// + /// + /// A CancellationToken to observe while waiting for the task to complete. + /// + /// protected abstract IAsyncEnumerable TransformWorkerAsync ( IAsyncEnumerableitems, @@ -281,6 +291,12 @@ CancellationToken token + /// + /// Creates a progress report object of type TProgress. + /// + /// + /// TProgress - A new instance of the progress report object. + /// protected abstract TProgress CreateProgressReport(); diff --git a/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj b/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj index af0608c..9138167 100644 --- a/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj +++ b/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj @@ -2,28 +2,36 @@ - net462;net472;net48;net481; - netstandard2.0;netstandard2.1; - net8.0;net9.0 +net462;net472;net48;net481; +netstandard2.0;netstandard2.1; +net8.0;net9.0 latest - 0.5.0 + 0.6.0 False $(AssemblyName) Chris Wolfgang Contains interfaces and base classes used to build ETL applications - 2025 - https://github.com/Chris-Wolfgang/ETL-Abstractions + Copyright {copyright year} {author} + https://github.com/Chris-Wolfgang/ETL-Abstractions README.md https://github.com/Chris-Wolfgang/ETL-Abstractions 1.0.0 MIT True - ETL.png + ETL-Abstractions.png + ETL-Abstractions.ico + True + False + ETL;Extract-Transform-Load; - + + + + + True \ diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/Wolfgang.Etl.Abstractions.Tests.Unit.csproj b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/Wolfgang.Etl.Abstractions.Tests.Unit.csproj index 786a0d6..6a7d6ee 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/Wolfgang.Etl.Abstractions.Tests.Unit.csproj +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/Wolfgang.Etl.Abstractions.Tests.Unit.csproj @@ -15,6 +15,8 @@ false true + Copyright {copyright year} {author} +