Class CrossJoinTransformFactory
Factory methods that create a
CrossJoinTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output port, that performs a
Cross Join on the two inputs.
This worker is
fully blocking
on the RightInput input port, and will buffer all its rows.
Therefore, to conserve memory, link RightInput to the upstream
output where the rows will consume the least amount of memory (i.e. the smallest
numberOfRows * memoryPerRow).
The "first" LeftInput 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 CrossJoinTransformFactory
Methods
CrossJoinTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Action<IRowMapperCommand>, Action<IRowMapperCommand>)
Initializes a new instance of the
CrossJoinTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output port, that performs a
Cross Join on the two inputs.
The output rows are created by specifying which columns (or whole row) to copy to the output, using IRowMapperCommand. Also see Dataflow Column Mapping.
The "first" LeftInput port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static CrossJoinTransform<TLeftInput, TRightInput, TOutput> CrossJoinTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Action<IRowMapperCommand> leftRowMapperCommandAction, Action<IRowMapperCommand> rightRowMapperCommandAction)
where TLeftInput : class where TRightInput : class where TOutput : class, new()
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TLeftInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port
to link the "first" 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 |
| OutputPortBase<TRightInput> | rightInputFrom | Output port on upstream worker to link to this worker's |
| Action<IRowMapperCommand> | leftRowMapperCommandAction | Defines which columns (or whole row) to copy from the left input rows to the output rows, e.g.:
Note: All mapped columns must have a data type that supports multi-copy.
Can be Column name matching is ordinal case insensitive, but a case sensitive match takes precedence over a case insensitive match. |
| Action<IRowMapperCommand> | rightRowMapperCommandAction | Defines which columns (or whole row) to copy from the right input rows to the output rows, e.g.:
Note: All mapped columns must have a data type that supports multi-copy.
Can be Column name matching is ordinal case insensitive, but a case sensitive match takes precedence over a case insensitive match. |
Returns
| Type | Description |
|---|---|
| CrossJoinTransform<TLeftInput, TRightInput, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TLeftInput | The type of each |
| TRightInput | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|
CrossJoinTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Func<TLeftInput, TRightInput, TOutput>)
Initializes a new instance of the
CrossJoinTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output port, that performs a
Cross Join on the two inputs.
A callback function creates the output row.
The "first" LeftInput port is linked to (if available) the upstream
output or error output port specified by the factory.
Declaration
public static CrossJoinTransform<TLeftInput, TRightInput, TOutput> CrossJoinTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Func<TLeftInput, TRightInput, TOutput> outputFunc)
where TLeftInput : class where TRightInput : class where TOutput : class, new()
Parameters
| Type | Name | Description |
|---|---|---|
| DownstreamFactory<TLeftInput> | downstreamFactory | The downstream factory, which specifies the parent worker and (optionally) the upstream port
to link the "first" 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 |
| OutputPortBase<TRightInput> | rightInputFrom | Output port on upstream worker to link to this worker's |
| Func<TLeftInput, TRightInput, TOutput> | outputFunc | A function that, given left and right input rows, must return the joined row to output,
or Do ensure the function adheres to the Row Ownership rules. Note that since a single input row can join to multiple rows on the other input, any column values copied to the output must be deep copied, unless they are pure value types or immutable. |
Returns
| Type | Description |
|---|---|
| CrossJoinTransform<TLeftInput, TRightInput, TOutput> | The newly created and (optionally) linked worker. |
Type Parameters
| Name | Description |
|---|---|
| TLeftInput | The type of each |
| TRightInput | The type of each |
| TOutput | The type of each |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
| ArgumentNullException |
|
| InvalidOperationException |
|