first file contain the following
cl_id date TM c_id c_val
10201 2015-4-15 01:00:00 56707065 0
10201 2015-4-15 01:00:00 56707066 1
10201 2015-4-15 01:00:00 56707067 200
like wise there are multiple cl_id and for each cl_id the c_id is different and the c_value is different.
similarly in the second file
cl_id dt tm c_id c_val
10201 2015-4-15 01:00:00 56707065 300
10201 2015-4-15 01:00:00 56707066 60
10201 2015-4-15 01:00:00 56707067 20
All the values are same in the file one and file two only the counter value changes as per the c_id so I want the third file which contains the sum of c_val i.e for cl_id 10201 & for the c_id 56707065 i want the result like this
10201 2015-4-15 01:00:00 56707065 0+300 =300
so finally the output in third file will be,
10201 2015-4-15 01:00:00 56707065 300
similarly for c_id 56707066,56707067
aggregate the result and put it into third file.
please suggest me the pig script how i can do that.