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>).
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
While less useful, set to
The name cannot otherwise contain |
| 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 |
|
| ArgumentNullException |
|
| InvalidOperationException |
|