Class SplitTransformFactory
Factory methods that create a SplitTransform<TInputOutputError> dataflow worker, with one input, one or more outputs, and one error output port, all of the same type, that sends each incoming row to one of several output ports, or to the error output port, or discards the row, based on a supplied function.
Note that output ports can be added after the worker is created (but before it or its siblings have started) by repeatedly calling Create<TOutput>(String). This can be particularly useful when generating the downstream workers in a loop.
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
Assembly: actionETL.dll
Syntax
public static class SplitTransformFactory
Methods
SplitTransform<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<TInputOutputError, Int32>, Int32)
Initializes a new instance of the SplitTransform<TInputOutputError> dataflow worker, with one input, one or more outputs, and one error output port, all of the same type, that sends each incoming row to one of several output ports, or to the error output port, or discards the row, based on a supplied function.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static SplitTransform<TInputOutputError> SplitTransform<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<TInputOutputError, int> splitFunc, int numberOfOutputs)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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 |
| Func<TInputOutputError, Int32> | splitFunc | A function that returns the output port number (from
Consider creating an |
| Int32 | numberOfOutputs | The number of output ports. |
Returns
| Type | Description |
|---|---|
| SplitTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
SplitTransform<TInputOutputError>(in DownstreamFactory<TInputOutputError>, String, Func<TInputOutputError, Int32>, String[])
Initializes a new instance of the SplitTransform<TInputOutputError> dataflow worker, with one input, one or more outputs, and one error output port, all of the same type, that sends each incoming row to one of several output ports, or to the error output port, or discards the row, based on a supplied function.
The Input port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static SplitTransform<TInputOutputError> SplitTransform<TInputOutputError>(this in DownstreamFactory<TInputOutputError> downstreamFactory, string workerName, Func<TInputOutputError, int> splitFunc, params string[] outputNames)
where TInputOutputError : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutputError> | 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 |
| Func<TInputOutputError, Int32> | splitFunc | A function that returns the output port number (from
Consider creating an |
| String[] | outputNames | The output port names. |
Returns
| Type | Description |
|---|---|
| SplitTransform<TInputOutputError> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutputError | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|