Re: Using PIG with complex SQL Statement

2014-11-05 Thread Vineet Mishra
d); -- 0,1,2, 3 > C1 = FOREACH C0 GENERATE $0 AS id, $1 AS category_id, $2 AS category_name; > C = DISTINCT C1; > > D0 = FILTER C BY (category_id == 1); > D1 = GROUP D0 BY (category_id, category_name); > D = FOREACH D1 GENERATE FLATTEN(group) AS (category_id, category_name), > (i

Re: Using PIG with complex SQL Statement

2014-10-30 Thread Vineet Mishra
ategory_name; > C = DISTINCT C1; > > D0 = FILTER C BY (category_id == 1); > D1 = GROUP D0 BY (category_id, category_name); > D = FOREACH D1 GENERATE FLATTEN(group) AS (category_id, category_name), > (int)COUNT(D0) AS cat_id_1_count:int; > > > Hope this helps, -Dan > &g

Re: Using PIG with complex SQL Statement

2014-10-30 Thread Vineet Mishra
9 AM, Lorand Bendig wrote: > > > Hi Vineet, > > > > I'd recommend you have a look at these excellent resources: > > > > http://hortonworks.com/blog/pig-eye-for-the-sql-guy/ > > http://mortar-public-site-content.s3-website-us-east-1. > > amazonaws.c

Re: Using PIG with complex SQL Statement

2014-10-28 Thread Vineet Mishra
nc > > Hope this helps, -Dan > > > On Tue, Oct 28, 2014 at 10:09 AM, Lorand Bendig wrote: > > > Hi Vineet, > > > > I'd recommend you have a look at these excellent resources: > > > > http://hortonworks.com/blog/pig-eye-for-the-sql-guy/ > > h

Using PIG with complex SQL Statement

2014-10-28 Thread Vineet Mishra
Hi, I was looking out to transform SQL statement which is consisting of multiple clause in the same query specifically, a JOIN followed by some condition(WHERE) and finally grouping on some fields(GROUP BY). Can I have a link or some briefing which can guide me how can I implement this k/o of comp