CrossJoin<TInput1, TInput2, TOutput>
Class CrossJoin<TInput1, TInput2, TOutput>
The CrossJoin allows you to combine every record from one input with every record from the other input. The input for the first table will be loaded into memory before join starts. Then every incoming row will be joined with every row of the InMemory-Table using the CrossJoinFunc function. The InMemory target should always be the target of the smaller amount of data to reduce memory consumption and processing time.
Implements
Inherited Members
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
Type Parameters
Name | Description |
---|---|
TInput1 | Type of data for in memory input block. |
TInput2 | Type of data for processing input block. |
TOutput | Type of output data. |
Examples
CrossJoin<InputType1, InputType2, OutputType> crossJoin = new CrossJoin<InputType1, InputType2, OutputType>();
crossJoin.CrossJoinFunc = (inmemoryRow, passingRow) => {
return new OutputType() {
Result = leftRow.Value1 + rightRow.Value2
};
});
source1.LinkTo(join.InMemoryTarget);
source2.LinkTo(join.PassingTarget);
join.LinkTo(dest);
Constructors
CrossJoin()
Declaration
CrossJoin(Func<TInput1, TInput2, TOutput>)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Func<TInput1, TInput2, TOutput> | crossJoinFunc | Sets the CrossJoinFunc |
Properties
Buffer
Declaration
Property Value
Type | Description |
---|---|
BufferBlock<TOutput> |
CrossJoinFunc
The cross join function that describes how records from the both target can be joined.
Declaration
Property Value
Type | Description |
---|---|
Func<TInput1, TInput2, TOutput> |
InMemoryTarget
The in-memory target of the CrossJoin. This will block processing until all data is received that is designated for this target. Always have the smaller amount of data flown into this target.
Declaration
Property Value
Type | Description |
---|---|
CrossJoin<TInput1, TInput2, TOutput>.InMemoryDestination<TInput1> |
PassingTarget
Every row that the PassingTarget receives is joined with all data from the InMemoryData.
Declaration
Property Value
Type | Description |
---|---|
JoinTarget<TInput2> |
SourceBlock
SourceBlock from the underlying TPL.Dataflow which is used as output buffer for the component.
Declaration
Property Value
Type | Description |
---|---|
ISourceBlock<TOutput> |
Overrides
Methods
CheckParameter()
Declaration
Overrides
CleanUpOnFaulted(Exception)
Declaration
Parameters
Type | Name | Description |
---|---|---|
Exception | e |