Hi,
I like to know how I can transform a query sql to a script pig especially when
I have a query like that :
selectp_brand,p_type,p_size,count(distinct ps_suppkey) as
supplier_cntfrompartsupp,partwherep_partkey = ps_partkeyand p_brand <>
'[BRAND]'and p_type not like '[TYPE]%'and p_size in ([SIZE1], [SIZE2], [SIZE3],
[SIZE4], [SIZE5], [SIZE6], [SIZE7], [SIZE8])and ps_suppkey not in
(selects_suppkeyfromsupplierwheres_comment like '%Customer%Complaints%')group
byp_brand,p_type,p_sizeorder bysupplier_cnt desc,p_brand,p_type,p_size;
or like that:
selectc_count, count(*) as custdistfrom
(selectc_custkey,count(o_orderkey)fromcustomer left outer join orders
onc_custkey = o_custkeyand o_comment not like ‘%[WORD1]%[WORD2]%’group
byc_custkey)as c_orders (c_custkey, c_count)group byc_countorder bycustdist
desc,c_count desc;
and I like to know how I transform the clause exists, in or not in to a pig
operator and thank you ?