Search Results for

    Show / Hide Table of Contents

    Class PortPassThroughSource<TOutput>

    A dataflow worker that passes rows from an upstream input port belonging to a different worker (normally residing under a different parent), to the Output port on this worker. This is mainly used when encapsulating a child dataflow worker with an input port (i.e. a transform or target) inside a parent dataflow worker, and passing the parent input port rows to the child input 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 for each port to pass from parent to a child worker, and a PortPassThroughTarget<TInputOutput> for each port to pass from a child worker to the parent. Use both PortPassThroughSource and PortPassThroughTarget to create a parent transform.

    Note that the parent must await the completion of the PortPassThroughSource worker before it itself completes, otherwise the parent input port will not be completely emptied and will raise an exception.

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

    Inheritance
    Object
    WorkerParent
    WorkerBase
    WorkerBase<PortPassThroughSource<TOutput>>
    PortPassThroughSource<TOutput>
    Implements
    IDisposeOnFinished
    Inherited Members
    WorkerBase<PortPassThroughSource<TOutput>>.AddCompletedCallback(Func<PortPassThroughSource<TOutput>, OutcomeStatus, Task<OutcomeStatus>>)
    WorkerBase<PortPassThroughSource<TOutput>>.AddRanCallback(Func<PortPassThroughSource<TOutput>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
    WorkerBase<PortPassThroughSource<TOutput>>.AddStartingCallback(Func<PortPassThroughSource<TOutput>, Task<ProgressStatus>>)
    WorkerBase.AddCompletedCallback(Func<WorkerBase, OutcomeStatus, Task<OutcomeStatus>>)
    WorkerBase.AddRanCallback(Func<WorkerBase, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
    WorkerBase.AddStartingCallback(Func<WorkerBase, Task<ProgressStatus>>)
    WorkerBase.DefaultIsStartable()
    WorkerBase.ErroredPortErrorsWorkerProtected
    WorkerBase.ErrorOutputs
    WorkerBase.EscalateError
    WorkerBase.Inputs
    WorkerBase.IsStartable
    WorkerBase.Outputs
    WorkerBase.Parent
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(TLastWorker)
    WorkerParent.AddChildCompletedCallback(Action<WorkerBase>)
    WorkerParent.AddStartingChildrenCallback(Func<WorkerParent, Task<ProgressStatus>>)
    WorkerParent.BytesPerRowBuffer
    WorkerParent.Children
    WorkerParent.DisposeOnFinished<TDisposable>(TDisposable)
    WorkerParent.GetDownstreamFactory<TInput>()
    WorkerParent.HasChildren
    WorkerParent.IsCanceled
    WorkerParent.IsCompleted
    WorkerParent.IsCreated
    WorkerParent.IsError
    WorkerParent.IsFailed
    WorkerParent.IsFatal
    WorkerParent.IsRunning
    WorkerParent.IsSucceeded
    WorkerParent.KeepChildrenLevels
    WorkerParent.Locator
    WorkerParent.LogFactory
    WorkerParent.Logger
    WorkerParent.MaxRunningChildren
    WorkerParent.Name
    WorkerParent.RemoveChildren()
    WorkerParent.RescheduleChildren()
    WorkerParent.RunChildrenAsync(Boolean)
    WorkerParent.RunChildrenAsync()
    WorkerParent.Status
    WorkerParent.Item[String]
    WorkerParent.ToString()
    WorkerParent.WorkerSystem
    WorkerParent.DebugCommands
    WorkerParent.AggregateErrorOutputRows
    WorkerParent.AggregateOutputRows
    WorkerParent.AggregateWorkersCompleted
    WorkerParent.InstantCompleted
    WorkerParent.InstantCreated
    WorkerParent.InstantStarted
    WorkerParent.RunningDuration
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public class PortPassThroughSource<TOutput> : WorkerBase<PortPassThroughSource<TOutput>>, IDisposeOnFinished where TOutput : class
    Type Parameters
    Name Description
    TOutput

    The type of each row.

    Constructors

    PortPassThroughSource(WorkerParent, String, InputPort<TOutput>)

    Initializes a new instance of the PortPassThroughSource<TOutput> dataflow worker that pass rows from an upstream input port belonging to a different worker, to the Output port on this worker. This is mainly used when encapsulating a child dataflow worker with an input port (i.e. a transform or target) inside a parent dataflow worker, and passing the parent input port rows to the child input port.

    Declaration
    public PortPassThroughSource(WorkerParent parentWorker, string workerName, InputPort<TOutput> inputPort)
    Parameters
    Type Name Description
    WorkerParent parentWorker

    The parent worker. Cannot be null.

    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 "__".

    InputPort<TOutput> inputPort

    The upstream (non-sibling worker) input port to take rows from.

    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?

    Properties

    Output

    Gets the output port for sending rows to downstream workers.

    Declaration
    public OutputPort<TOutput> Output { get; }
    Property Value
    Type Description
    OutputPort<TOutput>

    PassThroughInput

    Gets or sets the input port belonging to a different worker, from which to take and pass-through rows.

    Declaration
    public InputPort<TOutput> PassThroughInput { get; set; }
    Property Value
    Type Description
    InputPort<TOutput>

    The pass-through input port.

    Methods

    RunAsync()

    This method can be overridden to add custom functionality to the derived worker that runs before and after the main processing. In this case, the base class base.RunAsync() must be called for the worker to function correctly.

    Typically, this worker is used without overriding this method.

    Declaration
    protected override async Task<OutcomeStatus> RunAsync()
    Returns
    Type Description
    Task<OutcomeStatus>

    A Task describing the success or failure of the worker. An asynchronous async implementation would e.g. return OutcomeStatus.Succeeded on success, while a synchronous implementation would return OutcomeStatus.SucceededTask.

    Overrides
    WorkerParent.RunAsync()

    Implements

    IDisposeOnFinished
    In This Article
    Back to top Copyright © 2023 Envobi Ltd