Class UnionAllTransformFactory
Factory methods that create a
UnionAllTransform<TInputOutput>
dataflow worker, with multiple input ports and one Output port, all of the same type,
that sends all incoming rows to the single output. Any duplicates are preserved.
Ports will automatically get a Limited buffering mode, unless the user explicitly sets it to Full.
Note that input ports can be added after the worker is created (but before it or its siblings have started) by repeatedly calling Create<TInput>(String, OutputPortBase<TInput>). This can be particularly useful when generating workers in a loop.
Rows are consumed in a round-robin order among the inputs that have rows available, taking up to RowsPerBuffer rows at a time.
The "first" input port (i.e. TypedInputs[0]) is linked to (if available) the upstream
output or error output port specified by the factory.
If changing input port row buffer sizes, best performance is achieved by keeping them all to the same size, e.g. by setting BytesPerRowBuffer on this instance.
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>).
Note: To instead concatenate the input rows, i.e. to exhaust each input fully before forwarding any rows from other inputs, in a predefined order, use MergeSortedTransform<TInputOutput> and ensure that the sort key range for each input does not overlap with the sort key range for any other input, and that the sort key values matches your desired input port row order. One simple option is to add a constant integer property to each input row type, and use that as the sort key.
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public static class UnionAllTransformFactory
Methods
UnionAllTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, OutputPortBase<TInputOutput>[])
Initializes a new instance of the
UnionAllTransform<TInputOutput>
dataflow worker,with multiple input ports and one Output port, all of the same type,
that sends all incoming rows to the single output. Any duplicates are preserved.
The "first" input port is linked to (if available) the upstream output or error output port specified by the factory.
Declaration
public static UnionAllTransform<TInputOutput> UnionAllTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, params OutputPortBase<TInputOutput>[] inputsFrom)
where TInputOutput : class
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TInputOutput> | 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 |
| OutputPortBase<TInputOutput>[] | inputsFrom | The upstream output ports to create input ports for and link from. |
Returns
| Type | Description |
|---|---|
| UnionAllTransform<TInputOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|