Re: help with Map Type

2012-06-19 Thread Chun Yang
On 6/19/12 12:27 PM, "Mohit Anchlia" wrote: > On Tue, Jun 19, 2012 at 10:46 AM, Subir S wrote: > >> I think content in the end of this link >> >> http://elasticmapreduce.s3.amazonaws.com/samples/pig-apache/do-reports.pigwil>> l >> help you!! >> >> thanks! I get 404 when I click on that li

Re: help with Map Type

2012-06-19 Thread Mohit Anchlia
On Tue, Jun 19, 2012 at 10:46 AM, Subir S wrote: > I think content in the end of this link > > http://elasticmapreduce.s3.amazonaws.com/samples/pig-apache/do-reports.pigwill > help you!! > > thanks! I get 404 when I click on that link. > On Tue, Jun 19, 2012 at 10:50 PM, Subir S > wrote: > >

Re: help with Map Type

2012-06-19 Thread Subir S
I suggest you load with 2 fields. (uri, query) split at '?' delimiter. Then use regex_extract to extract abc.com and regex_extract_all to extract query parameters. Use foreach...generate to make query into a map. On Tue, Jun 19, 2012 at 3:33 AM, Mohit Anchlia wrote: > sorry that wasn't a link.

Re: help with Map Type

2012-06-19 Thread Subir S
I think content in the end of this link http://elasticmapreduce.s3.amazonaws.com/samples/pig-apache/do-reports.pigwill help you!! On Tue, Jun 19, 2012 at 10:50 PM, Subir S wrote: > I suggest you load with 2 fields. (uri, query) split at '?' delimiter. > > Then use regex_extract to extract abc.co

Re: help with Map Type

2012-06-18 Thread Mohit Anchlia
sorry that wasn't a link. It's my input to the pig. Basically what's inside params.dat. When I run those 3 pig lines I get empty output. What I want is something like this: http://abc.com/?a=v1&b=v2 broken down into a map and also be able to preserve abc.com. Otherwise if it's complex I can write

Re: help with Map Type

2012-06-18 Thread Subir S
I think link Mohit mentioned was his input. Not sure if i understood correctly. I suspect something related to the schema. http://pig.apache.org/docs/r0.9.1/basic.html#map-schema http://stackoverflow.com/a/8238591 So when you load with delimiter '&', what will happen to the first field? and how

Re: help with Map Type

2012-06-18 Thread Jonathan Coveney
Your link does not work, I recommend using pastebin. 2012/6/18 Mohit Anchlia > I am trying to parse URL using map type of pig. My query string is: > > https://mail.google.com/mail/?tab=wm#drafts/13800c4ea3d11511&mail=123 > > My very simple script for testing is this. But when I look at the part