Class FileHelperFileTargetFactory
Factory methods that create a FileHelperFileTarget<TInput> dataflow worker, which consumes incoming rows and writes them to a delimited (e.g. CSV) or fixed format file.
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 FileHelperFileTargetFactory
Methods
FileHelperFileTarget<TInput>(in DownstreamFactory<TInput>, String, String)
Initializes a new instance of the FileHelperFileTarget<TInput> dataflow worker, which consumes incoming rows and writes them to a delimited (e.g. CSV) or fixed format file.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
[CLSCompliant(false)]
public static FileHelperFileTarget<TInput> FileHelperFileTarget<TInput>(this in DownstreamFactory<TInput> downstreamFactory, string workerName, string fileName)
where TInput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInput> | 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 |
| String | fileName | The filename (including optional path) to write to. |
Returns
| Type | Description |
|---|---|
| FileHelperFileTarget<TInput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInput | The type of the input rows. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|