Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> pig question


Hi,
  I have data of format

id1,id2, value
1 , abc, 2993
1, dhu, 9284
1,dus,2389
2, acs,29392

and so on

For each id1, I want to find the maximum value and then divide value by
max_value
so in example above:

1,abc, 2993/9284
1,dhu ,9284/9284
1,dus, 2389/9284
2,acs, 29392/max_value_for_this id

How do i do this in pig?
Thanks
+
Russell Jurney 2013-04-27, 09:41
+
abhishek 2013-05-07, 02:52
+
Jonathan Coveney 2013-05-07, 08:33
+
abhishek 2013-05-07, 13:48
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB