Quick NPATH question

Aster
Enthusiast

Quick NPATH question

Hi guys,

I have been searching around and cannot seem to get a straight answer to my question. Thanks in advance for the time!

I had a quick question about Npath.  When one uses Npath, with a Date column without times (ie. ‘2014-07-31’ as opposed to ‘2014-07-32 00:00:00’), if you use the followed by operator (which is “.”) in the pattern of the query, if an event has the same datestamp (ie. Both records have ‘2014-07-31’ as the Date), will the event be counted as a proceeding event (ie. Counted as a match to the pattern)? Basically does Npath use “>” or “>=” when evaluating timestamps natively.  I could not find an answer in the manual.

Best,

Justin

Tags (1)
1 REPLY
Enthusiast

Re: Quick NPATH question

Having duplicate dates (or even date times) would not cause rows to be skipped. Be aware, however, that the order of the output is not guaranteed. Let's look at some example data:

 

other_column date_column

A                    2014-07-31

B                    2014-07-31

C                    2014-07-30

 

If you order by the date_column the output of other_column could be either C B A or C A B.  So if you were looking for 'A.B' this data may or may provide that result. I'm guessing that the order will at least be deterministic but without knowing exactly how the sort algorithm functions you wouldn't be able to predict which row would come first. As such I definitely do NOT recommend ordering by a column or set of columns that is not unique or at least very very close to unique. If you can add another column to the date in your order statement I would recommend doing so.