Customer Portal

remove duplicate records and sorting in DEDUP??

Comments 3

  • Avatar
    achan
    0
    Comment actions Permalink
    anyone has any idea of a better solution than putting all 2000 fields in the "key"?

    this is an urgent matter for me, so any help/suggestion would be greatly appreciated :-)

    al
  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    only idea I have is to use Partition instead of Dedup component: in partiotion function you can compare current record with previous

    int getOutputPort(DataRecord record){
    if (record.compareTo(previous) != 0) {
    previous = record;
    return 0;
    }else {
    return 1;
    }
    }

    and then on port 0 you will have only distinct records.
  • Avatar
    achan
    0
    Comment actions Permalink
    Thanks for the suggestion :-)

    I had to fix one thing: change
    "previous = record;" to "previous = record.duplicate();"...

    if not, the previous value will always be the current record since they are basically the same "pointer" or "address"...

Please sign in to leave a comment.