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.  How to match previous record with next record of same column

    Employee
    Posted 04-13-2014 00:20

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

    Originally posted by: techm_aritra

    Hi,

    I am trying to match the previous record of one column with next record of the that same column and also find the difference of those records. After doing this for a while I want to match all the differences with each other. If those differences are same then I want publish the record.

    Problem is i could not find any looping operator for this in LAE 4.6. Please let me know if you have specific node for this. Also if I want to check if any new data is there in a data source in a given interval. if there is then it will process the data and keep on processing the data after a specific interval for real time detection.

    Please let me know how this can be achieved with the nodes and brain script of LAE 4.6


  • 2.  RE: How to match previous record with next record of same column

    Employee
    Posted 12-16-2015 08:27

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

    Originally posted by: mgajdosik

    Hi,

    you can do something like this in a filter node, which will allow you to keep the value of previous record. With similar approach you can tackle the rest of your problem. Id should be replaced with your compared field... This is based on integer value. You can use static data node to test it.

    if execCount==1 then {
    previousValue = int(null)
    difference = int(null)
    } else {
    difference = id - previousValue
    }
    previousValue = id
    emit *, difference

    Marek