Pig, mail # user - Re: Storing time in Pig - 2014-06-27, 13:08
 Search Hadoop and all its subprojects:
Copy link to this message
-
Re: Storing time in Pig
Assuming data is the alias which has start_time and end_time as fields.

data2 = foreach data generate ToDate(Start_time, 'HH:mm:ss') as startDate,
ToDate(End_time, 'HH:mm:ss') as endDate;
data3 = foreach data2 generate SecondsBetween(endDate,startDate) as seconds;

You can find more such functions at
https://github.com/apache/pig/tree/trunk/src/org/apache/pig/builtin
On Fri, Jun 27, 2014 at 4:07 PM, Chhaya Vishwakarma <
[EMAIL PROTECTED]> wrote:
Regards,
Abhishek Agarwal

 
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