Search Results for

    Show / Hide Table of Contents

    Class MulticastTransformFactory

    Factory methods that create a MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    With a single output port, the incoming rows are simply forwarded to the output port.

    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 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>).

    Inheritance
    Object
    MulticastTransformFactory
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public static class MulticastTransformFactory

    Methods

    MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Action<IColumnMapperCommand>, Int32)

    Initializes a new instance of the MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    Outputs[0] will receive the original (i.e. not copied) rows, all additional outputs will receive copies of the original rows, created with CreateDeepCloneFunc().

    Note: All mapped column data types must support multi-copy, unless there is only a single output port.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static MulticastTransform<TInputOutput> MulticastTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, Action<IColumnMapperCommand> columnMapperCommandAction, int numberOfOutputs)
        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 "__".

    Action<IColumnMapperCommand> columnMapperCommandAction

    Sets the column mapping to only copy certain columns, e.g. to avoid failing on SingleShallow data types. Can be null, in which case all columns are mapped, i.e. cb => cb.AutoName(). See Dataflow Column Mapping for details.

    Unmapped columns will retain their default value in the output rows, except for the first port which outputs the original rows.

    Column name matching is ordinal case insensitive, but a case sensitive match takes precedence over a case insensitive match.

    Int32 numberOfOutputs

    The number of outputs.

    Returns
    Type Description
    MulticastTransform<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of each incoming and outgoing 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?

    MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Action<IColumnMapperCommand>, String[])

    Initializes a new instance of the MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    Outputs[0] will receive the original (i.e. not copied) rows, all additional outputs will receive copies of the original rows, created with CreateDeepCloneFunc().

    Note: All mapped column data types must support multi-copy, unless there is only a single output port.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static MulticastTransform<TInputOutput> MulticastTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, Action<IColumnMapperCommand> columnMapperCommandAction, params string[] outputNames)
        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 "__".

    Action<IColumnMapperCommand> columnMapperCommandAction

    Sets the column mapping to only copy certain columns, e.g. to avoid failing on SingleShallow data types. Can be null, in which case all columns are mapped, i.e. cb => cb.AutoName(). See Dataflow Column Mapping for details.

    Unmapped columns will retain their default value in the output rows, except for the first port which outputs the original rows.

    Column name matching is ordinal case insensitive, but a case sensitive match takes precedence over a case insensitive match.

    String[] outputNames

    The output port names.

    Returns
    Type Description
    MulticastTransform<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of each incoming and outgoing 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 '__'.
    ArgumentException

    outputNames: Must specify at least one output port name. Use a different overload to specify 0 output ports.

    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?

    MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Func<TInputOutput, TInputOutput>, Int32)

    Initializes a new instance of the MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    Outputs[0] will receive the original (i.e. not copied) rows, all additional outputs will receive copies of the original rows, created with the specified copying function.

    Supplying a custom copy function allows e.g. performing partial or shallow copies (as opposed to the default full and where needed deep copy function). While this in rare cases can be useful, partial or shallow copies are also more prone to coding bugs, and should be avoided unless strictly needed.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static MulticastTransform<TInputOutput> MulticastTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, Func<TInputOutput, TInputOutput> copyFunc, int numberOfOutputs)
        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 "__".

    Func<TInputOutput, TInputOutput> copyFunc

    A function to perform the copy of each row. Often used to perform a partial or complete deep copy of objects.

    Note: Since Outputs[0] contains the original rows, it will not have copyFunc applied to its rows.

    Note: Ensure your function adheres to the Row Ownership rules.

    Can be null, in which case the default CreateDeepCloneFunc()) is used. All column data types must then support multi-copy, unless there is only a single output port.

    Int32 numberOfOutputs

    The number of outputs.

    Returns
    Type Description
    MulticastTransform<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of each incoming and outgoing 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?

    MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Func<TInputOutput, TInputOutput>, String[])

    Initializes a new instance of the MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    Outputs[0] will receive the original (i.e. not copied) rows, all additional outputs will receive copies of the original rows, created with the specified copying function.

    Supplying a custom copy function allows e.g. performing partial or shallow copies (as opposed to the default full and where needed deep copy function). While this in rare cases can be useful, partial or shallow copies are also more prone to coding bugs, and should be avoided unless strictly needed.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static MulticastTransform<TInputOutput> MulticastTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, Func<TInputOutput, TInputOutput> copyFunc, params string[] outputNames)
        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 "__".

    Func<TInputOutput, TInputOutput> copyFunc

    A function to perform the copy of each row. Often used to perform a partial or complete deep copy of objects.

    Note: Since Outputs[0] contains the original rows, it will not have copyFunc applied to its rows.

    Note: Ensure your function adheres to the Row Ownership rules.

    Can be null, in which case the default CreateDeepCloneFunc()) is used. All column data types must then support multi-copy, unless there is only a single output port.

    String[] outputNames

    The output port names.

    Returns
    Type Description
    MulticastTransform<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of each incoming and outgoing 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 '__'.
    ArgumentException

    outputNames: Must specify at least one output port name. Use a different overload to specify 0 output ports.

    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?

    MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Int32)

    Initializes a new instance of the MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    Outputs[0] will receive the original (i.e. not copied) rows, all additional outputs will receive copies of the original rows, created with CreateDeepCloneFunc().

    Note: All column data types must support multi-copy, unless there is only a single output port.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static MulticastTransform<TInputOutput> MulticastTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, int numberOfOutputs)
        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 "__".

    Int32 numberOfOutputs

    The number of outputs.

    Returns
    Type Description
    MulticastTransform<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of each incoming and outgoing 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?

    MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, String[])

    Initializes a new instance of the MulticastTransform<TInputOutput> dataflow worker, with one input port and one or more output ports, all of the same type, that sends all input rows to all output ports.

    Outputs[0] will receive the original (i.e. not copied) rows, all additional outputs will receive copies of the original rows, created with CreateDeepCloneFunc().

    Note: All column data types must support multi-copy, unless there is only a single output port.

    The Input port is linked to (if available) the upstream output or error output port specified by the factory.

    Declaration
    public static MulticastTransform<TInputOutput> MulticastTransform<TInputOutput>(this in DownstreamFactory<TInputOutput> downstreamFactory, string workerName, params string[] outputNames)
        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 "__".

    String[] outputNames

    The output port names.

    Returns
    Type Description
    MulticastTransform<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of each incoming and outgoing 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 '__'.
    ArgumentException

    outputNames: Must specify at least one output port name. Use a different overload to specify 0 output ports.

    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

    MulticastTransform<TInputOutput>
    TypeColumnCopier<TFrom, TTo>
    Dataflow Columns
    In This Article
    • Methods
      • MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Action<IColumnMapperCommand>, Int32)
      • MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Action<IColumnMapperCommand>, String[])
      • MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Func<TInputOutput, TInputOutput>, Int32)
      • MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Func<TInputOutput, TInputOutput>, String[])
      • MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, Int32)
      • MulticastTransform<TInputOutput>(in DownstreamFactory<TInputOutput>, String, String[])
    • See Also
    Back to top Copyright © 2023 Envobi Ltd