Search Results for

    Show / Hide Table of Contents

    Class InnerJoinMergeSortedTransformFactory

    Factory methods that create a InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> dataflow worker, with two input ports and one Output port, that performs a Inner 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>).

    Inheritance
    Object
    InnerJoinMergeSortedTransformFactory
    Namespace: actionETL
    Assembly: actionETL.dll
    Syntax
    public static class InnerJoinMergeSortedTransformFactory

    Methods

    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Comparison<TLeftInput, TRightInput>, Action<IRowMapperCommand>, Action<IRowMapperCommand>)

    Initializes a new instance of the InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> dataflow worker, with two input ports and one Output port, that performs a Inner 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 InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> InnerJoinMergeSortedTransform<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" LeftInput 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 "/" (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 "__".

    OutputPortBase<TRightInput> rightInputFrom

    Output port on upstream worker to link to this worker's RightInput port.

    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.:

    clb => clb.Name("ProductId").Name("ProductName")

    Note: All mapped columns must have a data type that supports multi-copy.

    Can be null, although either one or both of leftRowMapperCommandAction and rightRowMapperCommandAction must be set.

    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.:

    crb => crb.Name("ProductWeight").Name("ProductPrice")

    Note: All mapped columns must have a data type that supports multi-copy.

    Can be null, although either one or both of leftRowMapperCommandAction and rightRowMapperCommandAction must be set.

    Column name matching is ordinal case insensitive, but a case sensitive match takes precedence over a case insensitive match.

    Returns
    Type Description
    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TLeftInput

    The type of each LeftInput row.

    TRightInput

    The type of each RightInput row.

    TOutput

    The type of each Output row.

    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?

    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Comparison<TLeftInput, TRightInput>, Func<TLeftInput, TRightInput, TOutput>)

    Initializes a new instance of the InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> dataflow worker, with two input ports and one Output port, that performs a Inner 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 InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> InnerJoinMergeSortedTransform<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" LeftInput 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 "/" (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 "__".

    OutputPortBase<TRightInput> rightInputFrom

    Output port on upstream worker to link to this worker's RightInput port.

    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 null to not output a row. The function can either create the output row by allocating a new row and setting its columns, or by returning one of the input rows, after optionally modifying some of its columns.

    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: The input rows are guaranteed to be not null.

    Returns
    Type Description
    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TLeftInput

    The type of each LeftInput row.

    TRightInput

    The type of each RightInput row.

    TOutput

    The type of each Output row.

    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?

    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Action<IRowComparerCommand<TLeftInput, TRightInput>>, Action<IRowMapperCommand>, Action<IRowMapperCommand>)

    Initializes a new instance of the InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> dataflow worker, with two input ports and one Output port, that performs a Inner 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 InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> InnerJoinMergeSortedTransform<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" LeftInput 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 "/" (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 "__".

    OutputPortBase<TRightInput> rightInputFrom

    Output port on upstream worker to link to this worker's RightInput port.

    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.:

    cb => cb.Asc("ProductId").Asc("VersionId")

    Can be null, in which case the Comparison property must be set. Also see Compare Dataflow Columns.

    Action<IRowMapperCommand> leftRowMapperCommandAction

    Defines which columns (or whole row) to copy from the left input rows to the output rows, e.g.:

    clb => clb.Name("ProductId").Name("ProductName")

    Note: All mapped columns must have a data type that supports multi-copy.

    Can be null, although either one or both of leftRowMapperCommandAction and rightRowMapperCommandAction must be set.

    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.:

    crb => crb.Name("ProductWeight").Name("ProductPrice")

    Note: All mapped columns must have a data type that supports multi-copy.

    Can be null, although either one or both of leftRowMapperCommandAction and rightRowMapperCommandAction must be set.

    Column name matching is ordinal case insensitive, but a case sensitive match takes precedence over a case insensitive match.

    Returns
    Type Description
    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TLeftInput

    The type of each LeftInput row.

    TRightInput

    The type of each RightInput row.

    TOutput

    The type of each Output row.

    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?

    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>(in DownstreamFactory<TLeftInput>, String, OutputPortBase<TRightInput>, Action<IRowComparerCommand<TLeftInput, TRightInput>>, Func<TLeftInput, TRightInput, TOutput>)

    Initializes a new instance of the InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> dataflow worker, with two input ports and one Output port, that performs a Inner 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 InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput> InnerJoinMergeSortedTransform<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" LeftInput 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 "/" (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 "__".

    OutputPortBase<TRightInput> rightInputFrom

    Output port on upstream worker to link to this worker's RightInput port.

    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.:

    cb => cb.Asc("ProductId").Asc("VersionId")

    Can be null, in which case the Comparison property must be set. Also see Compare Dataflow Columns.

    Func<TLeftInput, TRightInput, TOutput> outputFunc

    A function that, given left and right input rows, must return the joined row to output, or null to not output a row. The function can either create the output row by allocating a new row and setting its columns, or by returning one of the input rows, after optionally modifying some of its columns.

    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: The input rows are guaranteed to be not null.

    Returns
    Type Description
    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>

    The newly created and (optionally) linked worker.

    Type Parameters
    Name Description
    TLeftInput

    The type of each LeftInput row.

    TRightInput

    The type of each RightInput row.

    TOutput

    The type of each Output row.

    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?

    See Also

    InnerJoinMergeSortedTransform<TLeftInput, TRightInput, TOutput>
    In This Article
    Back to top Copyright © 2023 Envobi Ltd