Class EtlPipelineJsonSinkExtensions
Class-named JSON sink terminators for the fluent Wolfgang.Etl.Abstractions.EtlPipeline chain. Each terminator
constructs the matching loader and terminates the pipeline, enabling
… .JsonLineLoader<Person>("people.jsonl").
public static class EtlPipelineJsonSinkExtensions
- Inheritance
-
EtlPipelineJsonSinkExtensions
- Inherited Members
Remarks
Path-based terminators own the file stream they create and dispose it after the run completes (success or failure). Stream-based terminators do not dispose — the caller owns the stream.
Methods
JsonLineLoader<T>(IEtlPipeline<T>, Stream, JsonSerializerOptions?)
Terminates the pipeline, writing each record as a line of JSONL to a stream. The caller owns the stream.
[RequiresUnreferencedCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipelineSink JsonLineLoader<T>(this IEtlPipeline<T> pipeline, Stream stream, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
streamStreamThe stream to write JSONL to.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorstreamis null.
JsonLineLoader<T>(IEtlPipeline<T>, string, JsonSerializerOptions?)
Terminates the pipeline, writing each record as a line of JSONL to a file.
[RequiresUnreferencedCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipelineSink JsonLineLoader<T>(this IEtlPipeline<T> pipeline, string path, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
pathstringThe path of the JSONL file to write.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorpathis null.
JsonSingleStreamLoader<T>(IEtlPipeline<T>, Stream, JsonSerializerOptions?)
Terminates the pipeline, writing all records as a single JSON array to a stream. The caller owns the stream.
[RequiresUnreferencedCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipelineSink JsonSingleStreamLoader<T>(this IEtlPipeline<T> pipeline, Stream stream, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
streamStreamThe stream to write the JSON array to.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorstreamis null.
JsonSingleStreamLoader<T>(IEtlPipeline<T>, string, JsonSerializerOptions?)
Terminates the pipeline, writing all records as a single JSON array to a file.
[RequiresUnreferencedCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
[RequiresDynamicCode("JSON serialization of unknown types may require types that cannot be statically analyzed.")]
public static IEtlPipelineSink JsonSingleStreamLoader<T>(this IEtlPipeline<T> pipeline, string path, JsonSerializerOptions? options = null) where T : notnull
Parameters
pipelineIEtlPipeline<T>The pipeline to terminate.
pathstringThe path of the JSON array file to write.
optionsJsonSerializerOptionsOptional serializer options.
Returns
- IEtlPipelineSink
A runnable Wolfgang.Etl.Abstractions.IEtlPipelineSink.
Type Parameters
TThe record type to serialize.
Exceptions
- ArgumentNullException
pipelineorpathis null.