Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    Object
    UnionAllTransformFactory
    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 "/" (e.g. "MyPrefix-/") to generate a unique name from the prefix plus an increasing number starting at 1.

    While less useful, set to null, whitespace or "/" to generate a unique name from the worker type plus an increasing number starting at 1.

    The name cannot otherwise contain "/", and cannot start with double underscore "__".

    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 Output row.

    Exceptions
    Type Condition
    ArgumentException

    workerName:

    • Workers with the same parent must have unique names.
    • Worker and worker system names cannot contain '/' or start with double underscore '__'.
    ArgumentNullException

    workerParent - All workers must have a parent. The top level workers have the worker system as parent.

    InvalidOperationException
    • Cannot add child worker to parent which has completed. Are you adding it to the correct parent?
    • Cannot add worker to parent, since its children have been started. Are you adding it to the correct parent?

    See Also

    UnionAllTransform<TInputOutput>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd