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.  Sequence number generation

    Employee
    Posted 04-22-2014 04:43

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

    Originally posted by: sree

    Hi Team,
    My source data is like this

    Comment_Data_ID
    10056503
    10056503
    10335244
    10335244
    10453520
    10152206
    10152206
    i want in out file like this.
    Comment Row count
    10056503 1
    10056503 1
    10335244 2
    10335244 2
    10453520 3
    10152206 4
    10152206 4
    ie. if one records came more than once in source,based on one column, in target file need to load that same column and rowcount.
    How can i achieve this,using which logic in mapping.
    Thanks for your all support.

    Regards,
    Sree.


  • 2.  RE: Sequence number generation

    Employee
    Posted 04-22-2014 11:38

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

    Originally posted by: DanRosenblatt

    Hi Sree- you can accomplish this by running your data through the Remove Duplicates node (which is part of the Lavastorm Analytic Library-- you can download it from here if you haven't already) and a Filter node with the recordNumber() BRAINscript function to create the key for each row. Adding a lookup node to correlate the key with your original data will then achieve the result you specified.

    Someone else may be able to find a better way of doing this, but the attached graph should at least get you started in the right direction.
    Attachments:
    SequenceNumber.brg