Merge data flows based on row order

How can I merge fields from 2 data flows into 1 row containing all fields from both data flows when there is no join key field that will match between the 2 flows, just the fact that row 1 of flow A should be combined with row 1 of flow B.

inuput:

flow A
fieldA fieldB fieldC

flow B
fieldD fieldE fieldF

Output:
fieldA fieldB fieldC fieldD fieldE fieldF

Again, no field matches any other field so I can’t use any of the standard Joiners since they all require a join key.

Hello,

To join these records as requested, you need to create Join key. It can be done in Readers or in Reformats.

In Readers, you can use one of the autofilling functions - global_row_count. Create an integer field in metadata (in addition to those existing) and set this field to Autofilling - global_row_count in the right pane of Metadata Editor. This way, the field will be filled with integer numbers starting from 0. If you do the same in both Readers, you can join such records using this additional field in Joiners (ExtHashJoin or ExtMergeJoin).

If you want to create Join key in Reformats, you need to create one additional integer field on the output of each Reformat that will serve for such a key, you need to create two sequences and assign values of one sequence to the additional field in one Reformat and of the other in the other Reformat. By using two Reformats, you will fill the additional field with integer numbers in the same way (sequences should have the same start value, step, and cache) in either Reformat. This key can be used to join these records in the same way as in case of Readers (ExtHashJoin or ExtMergeJoin).

In one Reformat, you will have the following assignment for the additional field:
$0.JoinKey := sequence(Sequence0).next;
in the other:
$0.JoinKey := sequence(Sequence1).next;

all other fields will be mapped as follows in both Reformats:

$0.anyfield1 := $0.anyfield1;

$0.anyfieldN := $anyfieldN;

Best regards,

Tomas Waller

For information about the right pane of Metadata Editor (where Autofilling functions are described) see:
http://www.cloveretl.com/documentation/UserGuide/topic/com.cloveretl.gui.docs/docs/details-pane.html?path=0_4_2_6_2_1#field-details

Regards,

Tomas Waller

Thank you for the suggestions. I should be able to get this working now. :).