Class UnionAllTransform<TInputOutput>
A 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.
Note: Use the factory methods in UnionAllTransformFactory to create instances of this class.
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 BufferCapacity rows at a time.
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.
Implements
Inherited Members
Namespace: actionETL
Assembly: actionETL.dll
Syntax
public class UnionAllTransform<TInputOutput> : WorkerBase<UnionAllTransform<TInputOutput>>, IDisposeOnFinished where TInputOutput : class
Type Parameters
Name | Description |
---|---|
TInputOutput | The type of each incoming and |
Properties
Output
Gets the output port for sending rows to the downstream worker.
Declaration
public OutputPort<TInputOutput> Output { get; }
Property Value
Type | Description |
---|---|
OutputPort<TInputOutput> |
TypedInputs
Gets the typed input ports.
Declaration
public InputPortCollection<TInputOutput> TypedInputs { get; }
Property Value
Type | Description |
---|---|
InputPortCollection<TInputOutput> |
Methods
RunAsync()
This method can be overridden to add custom functionality to the derived worker that runs before
and after the row processing. In this case, the base class base.RunAsync()
must
be called for the worker to function correctly.
Note however that the worker uses a
AddStartingChildrenCallback(Func<WorkerParent, Task<ProgressStatus>>)
callback to set port buffering modes, which runs before RunAsync()
.
Typically, this worker is used without overriding this method.
Declaration
protected override async Task<OutcomeStatus> RunAsync()
Returns
Type | Description |
---|---|
Task<OutcomeStatus> | A |