Class FileHelperStreamTargetFactory
Factory methods that create a FileHelperStreamTarget<TInput> dataflow worker, which consumes incoming rows and writes them as delimited (e.g. CSV) or fixed format records to a Stream.
Please see CSV Delimited and Fixed Format for how to specify the data format. Internally, this worker uses the http://www.filehelpers.net/ library to read the data, specifically the FileHelperAsyncEngine class.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Get the factory from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>).
Namespace: actionETL.FileHelper
Assembly: actionETL.dll
Syntax
public static class FileHelperStreamTargetFactory
Methods
FileHelperStreamTarget<TInput>(in DownstreamFactory<TInput>, String, TextWriter)
Initializes a new instance of the FileHelperStreamTarget<TInput> dataflow worker, which consumes incoming rows and writes them as delimited (e.g. CSV) or fixed format records to a Stream.
The Input
port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
[CLSCompliant(false)]
public static FileHelperStreamTarget<TInput> FileHelperStreamTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, TextWriter textWriter)
where TInput : class
Parameters
Type | Name | Description |
---|---|---|
Downstream |
downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port to link the "first" input port of this dataflow worker to. Get it from Link when the upstream port is known ahead of time (which is usually the case). Otherwise get it from GetDownstreamFactory<TInput>(), and link the transform or target explicitly using LinkTo(InputPort<TOutput>) or LinkFrom(OutputPortBase<TInput>). |
String | workerName | Name of the worker.
Set to a prefix plus a trailing
While less useful, set to
The name cannot otherwise contain |
Text |
textWriter | The text writer to write the rows to. |
Returns
Type | Description |
---|---|
File |
The newly created and (optionally) linked worker. |
Type Parameters
Name | Description |
---|---|
TInput | The type of the input rows. |
Exceptions
Type | Condition |
---|---|
Argument |
|
Argument |
|
Invalid |
|