Interface IExtractStage<TSource>

Namespace
Wolfgang.Etl.Abstractions
Assembly
Wolfgang.Etl.Abstractions.dll

Represents the extractor stage of a fluent ETL pipeline for items of type TSource. Call one of the Transform overloads to append a transformer, or one of the Load overloads to terminate the chain with a loader.

public interface IExtractStage<TSource> where TSource : notnull

Type Parameters

TSource

The type of item produced by the extractor.

Remarks

Stages are obtained from a Pipeline Extract overload. Each stage is a thin, compile-time-typed wrapper that defers execution until RunAsync() is invoked.

Methods

Load(ILoadAsync<TSource>)

Terminates the chain with a loader that supports neither progress nor cancellation. The pipeline's CancellationToken will not be forwarded into this stage.

IPipeline Load(ILoadAsync<TSource> loader)

Parameters

loader ILoadAsync<TSource>

The loader that consumes the pipeline output.

Returns

IPipeline

A runnable IPipeline.

Exceptions

ArgumentNullException

loader is null.

Load(ILoadWithCancellationAsync<TSource>)

Terminates the chain with a loader that supports cancellation but does not report progress.

IPipeline Load(ILoadWithCancellationAsync<TSource> loader)

Parameters

loader ILoadWithCancellationAsync<TSource>

The loader that consumes the pipeline output.

Returns

IPipeline

A runnable IPipeline.

Exceptions

ArgumentNullException

loader is null.

Load<TProgress>(ILoadWithProgressAndCancellationAsync<TSource, TProgress>)

Terminates the chain with a progress-reporting loader that also supports cancellation. The returned pipeline exposes WithProgress(IProgress<TProgress>).

IPipelineWithLoadProgress<TProgress> Load<TProgress>(ILoadWithProgressAndCancellationAsync<TSource, TProgress> loader) where TProgress : notnull

Parameters

loader ILoadWithProgressAndCancellationAsync<TSource, TProgress>

The loader that consumes the pipeline output.

Returns

IPipelineWithLoadProgress<TProgress>

A runnable IPipelineWithLoadProgress<TProgress>.

Type Parameters

TProgress

The type of progress report emitted by the loader.

Exceptions

ArgumentNullException

loader is null.

Load<TProgress>(ILoadWithProgressAsync<TSource, TProgress>)

Terminates the chain with a progress-reporting loader that does not support cancellation. The returned pipeline exposes WithProgress(IProgress<TProgress>).

IPipelineWithLoadProgress<TProgress> Load<TProgress>(ILoadWithProgressAsync<TSource, TProgress> loader) where TProgress : notnull

Parameters

loader ILoadWithProgressAsync<TSource, TProgress>

The loader that consumes the pipeline output.

Returns

IPipelineWithLoadProgress<TProgress>

A runnable IPipelineWithLoadProgress<TProgress>.

Type Parameters

TProgress

The type of progress report emitted by the loader.

Exceptions

ArgumentNullException

loader is null.

Transform<TDestination>(ITransformAsync<TSource, TDestination>)

Appends a transformer that supports neither progress nor cancellation. The pipeline's CancellationToken will not be forwarded into this stage.

ITransformStage<TDestination> Transform<TDestination>(ITransformAsync<TSource, TDestination> transformer) where TDestination : notnull

Parameters

transformer ITransformAsync<TSource, TDestination>

The transformer to append.

Returns

ITransformStage<TDestination>

The next stage in the chain, producing TDestination.

Type Parameters

TDestination

The type of item produced by the transformer.

Exceptions

ArgumentNullException

transformer is null.

Transform<TDestination>(ITransformWithCancellationAsync<TSource, TDestination>)

Appends a transformer that supports cancellation but does not report progress.

ITransformStage<TDestination> Transform<TDestination>(ITransformWithCancellationAsync<TSource, TDestination> transformer) where TDestination : notnull

Parameters

transformer ITransformWithCancellationAsync<TSource, TDestination>

The transformer to append.

Returns

ITransformStage<TDestination>

The next stage in the chain, producing TDestination.

Type Parameters

TDestination

The type of item produced by the transformer.

Exceptions

ArgumentNullException

transformer is null.

Transform<TDestination, TProgress>(ITransformWithProgressAndCancellationAsync<TSource, TDestination, TProgress>)

Appends a progress-reporting transformer that also supports cancellation. The returned stage exposes WithProgress(IProgress<TProgress>).

ITransformStageWithProgress<TDestination, TProgress> Transform<TDestination, TProgress>(ITransformWithProgressAndCancellationAsync<TSource, TDestination, TProgress> transformer) where TDestination : notnull where TProgress : notnull

Parameters

transformer ITransformWithProgressAndCancellationAsync<TSource, TDestination, TProgress>

The transformer to append.

Returns

ITransformStageWithProgress<TDestination, TProgress>

The next stage in the chain, producing TDestination.

Type Parameters

TDestination

The type of item produced by the transformer.

TProgress

The type of progress report emitted by the transformer.

Exceptions

ArgumentNullException

transformer is null.

Transform<TDestination, TProgress>(ITransformWithProgressAsync<TSource, TDestination, TProgress>)

Appends a progress-reporting transformer that does not support cancellation. The pipeline's CancellationToken will not be forwarded into this stage.

ITransformStageWithProgress<TDestination, TProgress> Transform<TDestination, TProgress>(ITransformWithProgressAsync<TSource, TDestination, TProgress> transformer) where TDestination : notnull where TProgress : notnull

Parameters

transformer ITransformWithProgressAsync<TSource, TDestination, TProgress>

The transformer to append.

Returns

ITransformStageWithProgress<TDestination, TProgress>

The next stage in the chain, producing TDestination.

Type Parameters

TDestination

The type of item produced by the transformer.

TProgress

The type of progress report emitted by the transformer.

Exceptions

ArgumentNullException

transformer is null.