Customer Portal

merge data flows based on row order

Comments 3

  • Avatar
    twaller
    0
    Comment actions Permalink
    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
  • Avatar
    twaller
    0
    Comment actions Permalink
    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
  • Avatar
    dnrickner
    0
    Comment actions Permalink
    Thank you for the suggestions. I should be able to get this working now. :).

Please sign in to leave a comment.