Class EtlPipelineJsonSourceExtensions

Namespace
Wolfgang.Etl.Json
Assembly
Wolfgang.Etl.Json.dll

Class-named JSON source factories for the fluent Wolfgang.Etl.Abstractions.EtlPipeline chain. Each factory constructs the matching extractor and seeds the pipeline, enabling EtlPipeline.Create().JsonLineExtractor<Person>("people.jsonl").

public static class EtlPipelineJsonSourceExtensions
Inheritance
EtlPipelineJsonSourceExtensions
Inherited Members

Remarks

Path-based factories own the file stream they open and dispose it when the pipeline finishes enumerating. Stream-based factories do not dispose — the caller owns the stream's lifetime.

Methods

JsonLineExtractor<T>(EtlPipeline, Stream, JsonSerializerOptions?)

Starts a pipeline that reads JSONL records from an existing stream. The caller owns the stream.

[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonLineExtractor<T>(this EtlPipeline pipeline, Stream stream, JsonSerializerOptions? options = null) where T : notnull

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

stream Stream

The stream to read JSONL from.

options JsonSerializerOptions

Optional serializer options.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or stream is null.

JsonLineExtractor<T>(EtlPipeline, string, JsonSerializerOptions?)

Starts a pipeline that reads JSONL (JSON Lines / NDJSON) records from a file.

[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonLineExtractor<T>(this EtlPipeline pipeline, string path, JsonSerializerOptions? options = null) where T : notnull

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

path string

The path of the JSONL file to read.

options JsonSerializerOptions

Optional serializer options.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or path is null.

JsonSingleStreamExtractor<T>(EtlPipeline, Stream, JsonSerializerOptions?)

Starts a pipeline that reads records from a single JSON array stream. The caller owns the stream.

[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonSingleStreamExtractor<T>(this EtlPipeline pipeline, Stream stream, JsonSerializerOptions? options = null) where T : notnull

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

stream Stream

The stream to read the JSON array from.

options JsonSerializerOptions

Optional serializer options.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or stream is null.

JsonSingleStreamExtractor<T>(EtlPipeline, string, JsonSerializerOptions?)

Starts a pipeline that reads records from a single JSON array file.

[RequiresUnreferencedCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON deserialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipeline<T> JsonSingleStreamExtractor<T>(this EtlPipeline pipeline, string path, JsonSerializerOptions? options = null) where T : notnull

Parameters

pipeline EtlPipeline

The pipeline seed from Wolfgang.Etl.Abstractions.EtlPipeline.Create().

path string

The path of the JSON array file to read.

options JsonSerializerOptions

Optional serializer options.

Returns

IEtlPipeline<T>

An Wolfgang.Etl.Abstractions.IEtlPipeline<T> for chaining.

Type Parameters

T

The record type to deserialize.

Exceptions

ArgumentNullException

pipeline or path is null.