I have data in csv
format with columns "movie name", price
My output should be Under
5 : 5200
5-10 : 500
10-15 : 5140
and so on
I tried below code
A = LOAD '/root/pig-0.13.0/scripts/dvd_data/dvd_csv.txt' using PigStorage(',');
B = foeach A generate REPLACE($0, '\\"', ''),$2,$6
I am unable to identify the logic to get the desired output.I am looking some help to get it.
If the use case is to get the count of movies under a fixed set of price buckets (lt5, gt5 to lt10, gt10 to lt15) etc.. then we can make use of bincond operator.
Pig Script :
Sample Input : a.csv :
Output : DUMP D :