Re: First/last in npath

2013-08-21 Thread Justin Workman
Confirmed, that this does not work. I get the following error " Non-constant expressions for array indexes not supported" FWIW, I think I have written a UDF that will work for what I want. I still have some work to do to make sure it gets and returns the correct data type of the field being retur

Re: First/last in npath

2013-08-21 Thread Justin Workman
I believe I tried that, both in the return argument and the outer query. If memory serves me, I got an error about the array index needing to be a constant value. I will try again when I get back to a computer. Sent from my iPhone On Aug 21, 2013, at 6:48 PM, Harish Butani wrote: Can you try t

Re: First/last in npath

2013-08-21 Thread Harish Butani
Can you try this: select search_terms, productid, clicks_to_product from npath ( on clicks distributed by sessionid sort by timestamp arg1('SEARCH.NOTPRODUCT*.PRODUCT'), arg2('SEARCH'), arg3(page = 'SEARCH'), arg4('PRODUCT'), arg5(p

Re: First/last in npath

2013-08-21 Thread Justin Workman
Assuming click stream type of data I want to get the search terms from the first search request, and return the product id that was eventually viewed and the number of clicks to the product. So something like this select search_terms, productid, clicks_to_product from npath ( on clicks

Re: First/last in npath

2013-08-21 Thread Harish Butani
Can you provide details on what you want to do. You maybe able to express this by stacking queries: execute npath in a SubQuery in the from clause and then do windowing in an outer select. Also you get the 'path' object back from npath, so you can apply array indexing on it. regards, Harish. On

Re: First/last in npath

2013-08-21 Thread Edward Capriolo
If you can find no open jira issue on this functionality then that means no one is currently working on it. On Wed, Aug 21, 2013 at 1:43 AM, Justin Workman wrote: > When is it expect to support lead/lag/first_value/last_value in the > npath result statement? > > Thanks > > > Sent from my iPhone

First/last in npath

2013-08-20 Thread Justin Workman
When is it expect to support lead/lag/first_value/last_value in the npath result statement? Thanks Sent from my iPhone