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.  Minimum and Maximum of a IP range based on date/timestamp

    Employee
    Posted 07-22-2012 19:38

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

    Originally posted by: kevin_chuah

    Input data as per below

    DateReg IPAddress
    2012-07-20 10:25:12 1.122.213.54
    2012-07-20 10:26:10 1.122.213.54
    2012-07-20 10:27:05 1.122.213.54
    2012-07-20 10:51:54 102.170.42.162
    2012-07-20 10:56:10 102.170.42.162
    2012-07-20 11:07:33 102.170.42.162


    Have used an Agg Ex node but it's not reliably returning the right results.

    Should return
    IP,MinActTime,MaxActTime
    1.122.213.54,2012-07-20 10:25:12,2012-07-20 10:27:05
    102.170.42.162,2012-07-20 10:51:54,2012-07-20 11:07:33


    Script in the nodes currentl look like

    MinActTime=min(DateRego)
    emit referencedFields(1,{{^GroupBy^}}),MinActTime
    where lastInGroup


    and


    MaxActTime=max(DateRego)
    emit referencedFields(1,{{^GroupBy^}}),MaxActTime
    where lastInGroup


  • 2.  RE: Minimum and Maximum of a IP range based on date/timestamp

    Employee
    Posted 07-22-2012 20:11

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

    Originally posted by: stonysmith

    You can do both in a single node... but use groupMin and groupMax instead.

    MinActTime=groupMin(DateRego)
    MaxActTime=groupMax(DateRego)
    emit referencedFields(1,{{^GroupBy^}}),MinActTime,MaxAc tTime
    where lastInGroup


  • 3.  RE: Minimum and Maximum of a IP range based on date/timestamp

    Employee
    Posted 07-23-2012 18:04

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

    Originally posted by: kevin_chuah

    thank you it works!