Class LeftJoinMergeSortedTransformFactory
Factory methods that create a
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output
port, that performs a
Left Merge-join on the two presorted inputs.
Note that both inputs must be presorted according to the order specified by these overloads, including collation order for textual columns, where in the order any nulls appear, and if nulls are equal to each other or not etc.
This worker is
partially blocking
on the RightInput
input port:
when a join is found, it will buffer all rows from the RightInput
port that compare equal
to the join rows. This consumes "Number of RightInput rows comparing equal" multiplied by
"Memory per RightInput row". To conserve memory, link RightInput
to the upstream
output with the expected smallest memory consumption.
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 LeftJoinMergeSortedTransformFactory
Methods
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Comparison<TLeftInput, TRightInput>, Action<IRowMapperCommand>, Action<IRowMapperCommand>)
Initializes a new instance of the
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output
port, that performs a
Left Merge-join on the two presorted inputs.
Note that both inputs must be presorted according to the order specified by the provided Comparison<T>, including collation order for textual columns, where in the order any nulls appear, and if nulls are equal to each other or not etc.
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 LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Comparison<TLeftInput, TRightInput> comparison, 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 |
Comparison<TLeftInput, TRightInput> | comparison | The function that compares the left and right input rows with each other. |
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 |
---|---|
LeftJoinMergeSortedTransform<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 |
|
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Comparison<TLeftInput, TRightInput>, Func<TLeftInput, TRightInput, TOutput>)
Initializes a new instance of the
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output
port, that performs a
Left Merge-join on the two presorted inputs.
Note that both inputs must be presorted according to the order specified by the provided Comparison<T>, including collation order for textual columns, where in the order any nulls appear, and if nulls are equal to each other or not etc.
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 LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Comparison<TLeftInput, TRightInput> comparison, 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 |
Comparison<TLeftInput, TRightInput> | comparison | The function that compares the left and right input rows with each other. |
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. Note: If the right row is non-null, it should be included in the output. |
Returns
Type | Description |
---|---|
LeftJoinMergeSortedTransform<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 |
|
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Action<IRowComparerCommand<TLeftInput, TRightInput>>, Action<IRowMapperCommand>, Action<IRowMapperCommand>)
Initializes a new instance of the
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output
port, that performs a
Left Merge-join on the two presorted inputs.
Note that both inputs must be presorted according to the order specified by the provided IRowComparerCommand<TLeft, TRight>, including collation order for textual columns, where in the order any nulls appear, and if nulls are equal to each other or not etc.
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 LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Action<IRowComparerCommand<TLeftInput, TRightInput>> rowComparerCommandAction, 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<IRowComparerCommand<TLeftInput, TRightInput>> | rowComparerCommandAction | Defines how to compare left and right input rows, such as which columns to compare, ascending vs. descending etc., e.g.:
Can be |
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 |
---|---|
LeftJoinMergeSortedTransform<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 |
|
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Action<IRowComparerCommand<TLeftInput, TRightInput>>, Func<TLeftInput, TRightInput, TOutput>)
Initializes a new instance of the
LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
dataflow worker, with two input ports and one Output
port, that performs a
Left Merge-join on the two presorted inputs.
Note that both inputs must be presorted according to the order specified by the provided IRowComparerCommand<TLeft, TRight>, including collation order for textual columns, where in the order any nulls appear, and if nulls are equal to each other or not etc.
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 LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> LeftJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(this in DownstreamFactory<TLeftInput> downstreamFactory, string workerName, OutputPortBase<TRightInput> rightInputFrom, Action<IRowComparerCommand<TLeftInput, TRightInput>> rowComparerCommandAction, 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 |
Action<IRowComparerCommand<TLeftInput, TRightInput>> | rowComparerCommandAction | Defines how to compare left and right input rows, such as which columns to compare, ascending vs. descending etc., e.g.:
Can be |
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. Note: If the right row is non-null, it should be included in the output. |
Returns
Type | Description |
---|---|
LeftJoinMergeSortedTransform<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 |
|