Skip to content

refactor: EtlPipeline entry via Create() instance seed (Option 2) - #280

Merged
Chris-Wolfgang merged 3 commits into
vNextfrom
feat/etlpipeline-create-entry
Jul 20, 2026
Merged

refactor: EtlPipeline entry via Create() instance seed (Option 2)#280
Chris-Wolfgang merged 3 commits into
vNextfrom
feat/etlpipeline-create-entry

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Summary

Switches the EtlPipeline entry point from the static-class + Source sentinel design to the instance seed design we settled on (Option 2), so it can ship with 0.16.0.

// before (Option 1 — sentinel)
await EtlPipeline.From(records).Through(...).To(loader).RunAsync();
await EtlPipeline.Source.CsvExtractor<Order>("orders.csv")...   // format factory on the sentinel

// after (Option 2 — Create() seed)
await EtlPipeline.Create().From(records).Through(...).To(loader).RunAsync();
await EtlPipeline.Create().CsvExtractor<Order>("orders.csv")... // format factory on the instance

Changes

  • EtlPipeline: public static classpublic sealed class with a private ctor and static Create(); the From factories become instance methods.
  • Removed EtlPipelineSource — the EtlPipeline instance is now the extension receiver for format-package source factories (this EtlPipeline), so the separate sentinel is obsolete.
  • Updated PublicAPI.Shipped.txt, Example8-EtlPipeline (net4.8 + net8.0), the EtlPipeline unit tests, and the CHANGELOG 0.16.0 entry.

Unchanged

The pipeline core is untouched — IEtlPipeline<T> (Through/To/AsAsyncEnumerable), IEtlPipelineSink, EtlPipelineImpl, EtlPipelineProgress, run-state. Only the entry point changed.

Why

Create() returning a fresh instance reads honestly as "start a pipeline," removes the .Source naming/asymmetry wart, keeps the unified EtlPipeline prefix, and gives pipeline-level config a natural home on the seed if ever needed. One type instead of two.

Test plan

  • dotnet build -c Release clean across all 11 TFMs
  • Unit tests green (277) — From/Through/To/cancellation/progress + new Create_returns_a_new_instance_each_call
  • Example8 (net4.8 + net8.0) compiles against Create()
  • CI Stage 1/2/3 + Detect .NET Projects green

Note on operators

Per the core's own design (and this PR's docs), the LINQ operators (Where/Select/Distinct) live in Wolfgang.Etl.Transformers as extensions on Through, not here — out of scope for this entry-point change.

🤖 Generated with Claude Code

…n 2)

Replaces the static EtlPipeline class + EtlPipelineSource sentinel with a
sealed instance class: EtlPipeline.Create() returns a fresh seed, and the
From factories become instance methods. Format packages now extend the
EtlPipeline instance directly (this EtlPipeline) instead of a separate
sentinel type, e.g. EtlPipeline.Create().CsvExtractor<Order>("orders.csv").

Removes EtlPipelineSource, updates PublicAPI, Example8 (net4.8 + net8.0),
the EtlPipeline unit tests, and the CHANGELOG 0.16.0 entry. Pipeline core
(IEtlPipeline<T> Through/To, IEtlPipelineSink, impl) is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 20, 2026 17:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread examples/Net4.8/Example8-EtlPipeline/Program.cs Outdated
Chris-Wolfgang and others added 2 commits July 20, 2026 13:13
Addresses review feedback on #280.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Consistency with the Example8 formatting requested in #280 review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants