LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Identifying Duplicate Values

    Employee
    Posted 10-01-2015 08:54

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sozdemir

    Hello experts,

    I have the below data-set:

    ID
    1001A
    1001A
    1001B
    1001B

    What I would like to do essentially, just mark the first values as duplicates:

    ID, Flag
    1001A, dup
    1001A, keep
    1001B, dup
    1001B, keep

    Any help is much appreciated.

    Thank you.


  • 2.  RE: Identifying Duplicate Values

    Employee
    Posted 10-01-2015 09:08

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    I am going to assume that if there were 3 of the "A" records, you'd only want the last one to say "keep"

    Setup an AGGex node with this code:

    emit ID
    if lastInGroup then Flag="keep" else Flag="dup"
    emit Flag

    then set GroupBy=ID
    (you'll also need to set the node to SortInput)


  • 3.  RE: Identifying Duplicate Values

    Employee
    Posted 10-01-2015 10:04

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: sozdemir

    Thank you.

    It works like a charm.