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>).
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
Create
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 |
|---|---|---|
| Downstream |
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 |
| Action<IColumn |
columnMapperCommandAction | Sets the column mapping to only copy certain columns, e.g. to avoid failing on
Single 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 |
|---|---|
| Multicast |
The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and outgoing row. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
|
| Invalid |
|
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
Create
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 |
|---|---|---|
| Downstream |
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 |
| Action<IColumn |
columnMapperCommandAction | Sets the column mapping to only copy certain columns, e.g. to avoid failing on
Single 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 |
|---|---|
| Multicast |
The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and outgoing row. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
|
| Argument |
|
| Invalid |
|
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 |
|---|---|---|
| Downstream |
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 |
| 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 Note: Ensure your function adheres to the Row Ownership rules.
Can be |
| Int32 | numberOfOutputs | The number of outputs. |
Returns
| Type | Description |
|---|---|
| Multicast |
The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and outgoing row. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
|
| Invalid |
|
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 |
|---|---|---|
| Downstream |
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 |
| 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 Note: Ensure your function adheres to the Row Ownership rules.
Can be |
| String[] | outputNames | The output port names. |
Returns
| Type | Description |
|---|---|
| Multicast |
The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and outgoing row. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
|
| Argument |
|
| Invalid |
|
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
Create
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 |
|---|---|---|
| Downstream |
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 |
| Int32 | numberOfOutputs | The number of outputs. |
Returns
| Type | Description |
|---|---|
| Multicast |
The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and outgoing row. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
|
| Invalid |
|
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
Create
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 |
|---|---|---|
| Downstream |
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 |
| String[] | outputNames | The output port names. |
Returns
| Type | Description |
|---|---|
| Multicast |
The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TInputOutput | The type of each incoming and outgoing row. |
Exceptions
| Type | Condition |
|---|---|
| Argument |
|
| Argument |
|
| Argument |
|
| Invalid |
|