Search Results for

    Show / Hide Table of Contents

    Class PortPassThroughTargetFactory

    Factory methods that create a PortPassThroughTarget<TInputOutput> dataflow worker, which passes rows from the Input port on this worker, to an output port on a downstream worker (normally residing under a different parent compared to this worker). This is mainly used when encapsulating a child dataflow worker with an output port (i.e. a source or transform) inside a parent dataflow worker, and passing the child output rows to the parent output port. This allows using dataflow (and other) workers as building blocks when creating new dataflow workers.

    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
    PortPassThroughTargetFactory
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public static class PortPassThroughTargetFactory

    Methods

    PortPassThroughTarget<TInputOutput>(in DownstreamFactory<TInputOutput>, String, OutputPort<TInputOutput>)

    Initializes a new instance of the PortPassThroughTarget<TInputOutput> dataflow worker, which passes rows from the Input port on this worker, to an output port on a downstream worker (normally residing under a different parent compared to this worker). This is mainly used when encapsulating a child dataflow worker with an output port (i.e. a source or transform) inside a parent dataflow worker, and passing the child output rows to the parent output port. This allows using dataflow (and other) workers as building blocks when creating new dataflow workers.

    The parent worker can have any number of input and output ports, as well as any number of child workers, and would add a PortPassThroughSource<TOutput> for each port to pass from parent to child worker, and a PortPassThroughTarget for each port to pass from child to parent worker. Use both PortPassThroughSource and PortPassThroughTarget to create a parent transform.

    Note that the parent must await the completion of the PortPassThroughTarget worker before it itself completes, otherwise the parent output port will not have completed and will raise an exception.

    Please also see the Compose Source with Pass-through example.

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

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

    OutputPort<TInputOutput> passThroughDownstreamOutputPort

    The downstream (non-sibling worker) output port to pass rows to.

    Returns
    Type Description
    PortPassThroughTarget<TInputOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TInputOutput

    The type of the input and output rows.

    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

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